diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs index be4446982ec..7bd62350c9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs @@ -60,22 +60,22 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo continue; } - if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null)) + if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -146,16 +146,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClusters, value.Clusters, null, null); - writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null); - writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs index e3713e3ef6e..44ce685e483 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -129,15 +129,15 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); writer.WriteProperty(options, PropResponse, value.Response, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs index 983f2108868..6fc45f4873f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -320,7 +320,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -335,7 +335,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -355,7 +355,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -370,7 +370,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -400,12 +400,12 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -440,7 +440,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -450,7 +450,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -460,7 +460,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -518,35 +518,35 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExt, value.Ext, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropKnn, value.Knn, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPit, value.Pit, null, null); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSlice, value.Slice, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStats, value.Stats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs index c61794f4dc4..a553ee35b9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -129,15 +129,15 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); writer.WriteProperty(options, PropResponse, value.Response, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs index 46ea213ae05..455f6d459c2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs @@ -342,6 +342,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// The request will only wait for those three shards to refresh. /// The other two shards that make up the index do not participate in the _bulk request at all. /// +/// +/// You might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests. +/// Refer to the linked documentation for step-by-step instructions using the index settings API. +/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.BulkRequestConverter))] public partial class BulkRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -668,6 +672,10 @@ internal BulkRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructor /// The request will only wait for those three shards to refresh. /// The other two shards that make up the index do not participate in the _bulk request at all. /// +/// +/// You might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests. +/// Refer to the linked documentation for step-by-step instructions using the index settings API. +/// /// public readonly partial struct BulkRequestDescriptor { @@ -1143,6 +1151,10 @@ public Elastic.Clients.Elasticsearch.BulkRequestDescriptor RequestConfiguration( /// The request will only wait for those three shards to refresh. /// The other two shards that make up the index do not participate in the _bulk request at all. /// +/// +/// You might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests. +/// Refer to the linked documentation for step-by-step instructions using the index settings API. +/// /// public readonly partial struct BulkRequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs index 366c541b6dc..c93dabef493 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.BulkResponse Read(ref System.Text. continue; } - if (propIngestTook.TryReadProperty(ref reader, options, PropIngestTook, null)) + if (propIngestTook.TryReadProperty(ref reader, options, PropIngestTook, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropErrors, value.Errors, null, null); - writer.WriteProperty(options, PropIngestTook, value.IngestTook, null, null); + writer.WriteProperty(options, PropIngestTook, value.IngestTook, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropItems, value.Items, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs index 5e9716147d5..db7838ba6d0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainRequest R continue; } - if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, null)) + if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShard.TryReadProperty(ref reader, options, PropShard, null)) + if (propShard.TryReadProperty(ref reader, options, PropShard, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,8 +107,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCurrentNode, value.CurrentNode, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimary, value.Primary, null, null); - writer.WriteProperty(options, PropShard, value.Shard, null, null); + writer.WriteProperty(options, PropPrimary, value.Primary, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShard, value.Shard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -120,6 +120,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// For unassigned shards, it provides an explanation for why the shard is unassigned. /// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. /// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. +/// Refer to the linked documentation for examples of how to troubleshoot allocation issues using this API. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.AllocationExplainRequestConverter))] @@ -206,6 +207,7 @@ internal AllocationExplainRequest(Elastic.Clients.Elasticsearch.Serialization.Js /// For unassigned shards, it provides an explanation for why the shard is unassigned. /// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. /// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. +/// Refer to the linked documentation for examples of how to troubleshoot allocation issues using this API. /// /// public readonly partial struct AllocationExplainRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs index 3e6df5c86a5..f06a745222c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs @@ -91,22 +91,22 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propAllocationDelayInMillis.TryReadProperty(ref reader, options, PropAllocationDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAllocationDelayInMillis.TryReadProperty(ref reader, options, PropAllocationDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propCanAllocate.TryReadProperty(ref reader, options, PropCanAllocate, null)) + if (propCanAllocate.TryReadProperty(ref reader, options, PropCanAllocate, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCanMoveToOtherNode.TryReadProperty(ref reader, options, PropCanMoveToOtherNode, null)) + if (propCanMoveToOtherNode.TryReadProperty(ref reader, options, PropCanMoveToOtherNode, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCanRebalanceCluster.TryReadProperty(ref reader, options, PropCanRebalanceCluster, null)) + if (propCanRebalanceCluster.TryReadProperty(ref reader, options, PropCanRebalanceCluster, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,7 +116,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propCanRebalanceToOtherNode.TryReadProperty(ref reader, options, PropCanRebalanceToOtherNode, null)) + if (propCanRebalanceToOtherNode.TryReadProperty(ref reader, options, PropCanRebalanceToOtherNode, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,7 +126,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propCanRemainOnCurrentNode.TryReadProperty(ref reader, options, PropCanRemainOnCurrentNode, null)) + if (propCanRemainOnCurrentNode.TryReadProperty(ref reader, options, PropCanRemainOnCurrentNode, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,7 +141,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propConfiguredDelayInMillis.TryReadProperty(ref reader, options, PropConfiguredDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propConfiguredDelayInMillis.TryReadProperty(ref reader, options, PropConfiguredDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -191,7 +191,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propRemainingDelayInMillis.TryReadProperty(ref reader, options, PropRemainingDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propRemainingDelayInMillis.TryReadProperty(ref reader, options, PropRemainingDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -251,17 +251,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllocateExplanation, value.AllocateExplanation, null, null); writer.WriteProperty(options, PropAllocationDelay, value.AllocationDelay, null, null); - writer.WriteProperty(options, PropAllocationDelayInMillis, value.AllocationDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropCanAllocate, value.CanAllocate, null, null); - writer.WriteProperty(options, PropCanMoveToOtherNode, value.CanMoveToOtherNode, null, null); - writer.WriteProperty(options, PropCanRebalanceCluster, value.CanRebalanceCluster, null, null); + writer.WriteProperty(options, PropAllocationDelayInMillis, value.AllocationDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCanAllocate, value.CanAllocate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCanMoveToOtherNode, value.CanMoveToOtherNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCanRebalanceCluster, value.CanRebalanceCluster, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCanRebalanceClusterDecisions, value.CanRebalanceClusterDecisions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropCanRebalanceToOtherNode, value.CanRebalanceToOtherNode, null, null); + writer.WriteProperty(options, PropCanRebalanceToOtherNode, value.CanRebalanceToOtherNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCanRemainDecisions, value.CanRemainDecisions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropCanRemainOnCurrentNode, value.CanRemainOnCurrentNode, null, null); + writer.WriteProperty(options, PropCanRemainOnCurrentNode, value.CanRemainOnCurrentNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClusterInfo, value.ClusterInfo, null, null); writer.WriteProperty(options, PropConfiguredDelay, value.ConfiguredDelay, null, null); - writer.WriteProperty(options, PropConfiguredDelayInMillis, value.ConfiguredDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropConfiguredDelayInMillis, value.ConfiguredDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropCurrentNode, value.CurrentNode, null, null); writer.WriteProperty(options, PropCurrentState, value.CurrentState, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); @@ -271,7 +271,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPrimary, value.Primary, null, null); writer.WriteProperty(options, PropRebalanceExplanation, value.RebalanceExplanation, null, null); writer.WriteProperty(options, PropRemainingDelay, value.RemainingDelay, null, null); - writer.WriteProperty(options, PropRemainingDelayInMillis, value.RemainingDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropRemainingDelayInMillis, value.RemainingDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropShard, value.Shard, null, null); writer.WriteProperty(options, PropUnassignedInfo, value.UnassignedInfo, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs index c9f07e19eaf..87cb38e5618 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs @@ -94,15 +94,32 @@ internal GetClusterSettingsResponse(Elastic.Clients.Elasticsearch.Serialization. _ = sentinel; } + /// + /// + /// The default setting values. + /// + /// public System.Collections.Generic.IReadOnlyDictionary? Defaults { get; set; } + + /// + /// + /// The settings that persist after the cluster restarts. + /// + /// public #if NET7_0_OR_GREATER - required + required #endif - System.Collections.Generic.IReadOnlyDictionary Persistent { get; set; } + System.Collections.Generic.IReadOnlyDictionary Persistent { get; set; } + + /// + /// + /// The settings that do not persist after the cluster restarts. + /// + /// public #if NET7_0_OR_GREATER - required + required #endif - System.Collections.Generic.IReadOnlyDictionary Transient { get; set; } + System.Collections.Generic.IReadOnlyDictionary Transient { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs index c966445a8ee..829b40743a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateReques LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateReques continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateReques public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs index 7be6879be5c..dccc0dc7325 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CreateResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs index a789ac6515b..6c44dc9c71a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs @@ -89,17 +89,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowRequ continue; } - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowRequ continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,7 +124,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowRequ continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -183,14 +183,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreamName, value.DataStreamName, null, null); writer.WriteProperty(options, PropLeaderIndex, value.LeaderIndex, null, null); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteProperty(options, PropRemoteCluster, value.RemoteCluster, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs index a77e49be32e..c67f8f4a7c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs @@ -86,17 +86,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.PutAutoFol continue; } - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.PutAutoFol continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.PutAutoFol continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -182,14 +182,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFollowIndexPattern, value.FollowIndexPattern, null, null); writer.WriteProperty(options, PropLeaderIndexExclusionPatterns, value.LeaderIndexExclusionPatterns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropLeaderIndexPatterns, value.LeaderIndexPatterns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteProperty(options, PropRemoteCluster, value.RemoteCluster, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs index 53b3077bbb4..474e5aad32a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs @@ -61,17 +61,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll LocalJsonValue propReadPollTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,14 +139,14 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFollowRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs index e11295bfb1c..fc4bda3ee80 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs @@ -262,7 +262,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst LocalJsonValue propSlice = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -298,7 +298,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.DeleteByQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSlice, value.Slice, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs index 15d7f83b15b..ff5cd28c6f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys LocalJsonValue propVersionConflicts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBatches.TryReadProperty(ref reader, options, PropBatches, null)) + if (propBatches.TryReadProperty(ref reader, options, PropBatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,12 +78,12 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propNoops.TryReadProperty(ref reader, options, PropNoops, null)) + if (propNoops.TryReadProperty(ref reader, options, PropNoops, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, null)) + if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,7 +108,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -118,27 +118,27 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null)) + if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,22 +177,22 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.DeleteByQueryResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBatches, value.Batches, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropBatches, value.Batches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNoops, value.Noops, null, null); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropNoops, value.Noops, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetries, value.Retries, null, null); - writer.WriteProperty(options, PropSliceId, value.SliceId, null, null); + writer.WriteProperty(options, PropSliceId, value.SliceId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTask, value.Task, null, null); writer.WriteProperty(options, PropThrottled, value.Throttled, null, null); - writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropThrottledUntil, value.ThrottledUntil, null, null); - writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null); + writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs index b474a093846..139eb39770e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.DeleteResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs index a3ebea57b32..a18dabbe78b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlGetResponse Read(re continue; } - if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null)) + if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null)) + if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlGetResponse Read(re continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropHits, value.Hits, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); - writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); + writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShardFailures, value.ShardFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs index edadd293dce..326334e9db0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -78,17 +78,17 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst LocalJsonValue propWaitForCompletionTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null)) + if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAllowPartialSequenceResults.TryReadProperty(ref reader, options, PropAllowPartialSequenceResults, null)) + if (propAllowPartialSequenceResults.TryReadProperty(ref reader, options, PropAllowPartialSequenceResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseSensitive.TryReadProperty(ref reader, options, PropCaseSensitive, null)) + if (propCaseSensitive.TryReadProperty(ref reader, options, PropCaseSensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null)) + if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, null)) + if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSamplesPerKey.TryReadProperty(ref reader, options, PropMaxSamplesPerKey, null)) + if (propMaxSamplesPerKey.TryReadProperty(ref reader, options, PropMaxSamplesPerKey, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,7 +133,7 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propResultPosition.TryReadProperty(ref reader, options, PropResultPosition, null)) + if (propResultPosition.TryReadProperty(ref reader, options, PropResultPosition, static Elastic.Clients.Elasticsearch.Eql.ResultPosition? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -143,7 +143,7 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -198,20 +198,20 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, null); - writer.WriteProperty(options, PropAllowPartialSequenceResults, value.AllowPartialSequenceResults, null, null); - writer.WriteProperty(options, PropCaseSensitive, value.CaseSensitive, null, null); + writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAllowPartialSequenceResults, value.AllowPartialSequenceResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseSensitive, value.CaseSensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropEventCategoryField, value.EventCategoryField, null, null); - writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null); + writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); - writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, null); - writer.WriteProperty(options, PropMaxSamplesPerKey, value.MaxSamplesPerKey, null, null); + writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSamplesPerKey, value.MaxSamplesPerKey, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropResultPosition, value.ResultPosition, null, null); + writer.WriteProperty(options, PropResultPosition, value.ResultPosition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Eql.ResultPosition? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTiebreakerField, value.TiebreakerField, null, null); writer.WriteProperty(options, PropTimestampField, value.TimestampField, null, null); writer.WriteProperty(options, PropWaitForCompletionTimeout, value.WaitForCompletionTimeout, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs index a4add7b80ee..49826436b1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchResponse Read continue; } - if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null)) + if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null)) + if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchResponse Read continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropHits, value.Hits, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); - writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); + writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShardFailures, value.ShardFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs index b0d6fb139fd..d3f2094068f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse Read(ref LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null)) + if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse Read(ref continue; } - if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null); - writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); - writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs index d3b14129965..916fb7e1438 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs @@ -47,24 +47,6 @@ public sealed partial class AsyncQueryRequestParameters : Elastic.Transport.Requ /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } - - /// - /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. - /// - /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } } internal sealed partial class AsyncQueryRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -72,6 +54,8 @@ internal sealed partial class AsyncQueryRequestConverter : System.Text.Json.Seri private static readonly System.Text.Json.JsonEncodedText PropColumnar = System.Text.Json.JsonEncodedText.Encode("columnar"); private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata = System.Text.Json.JsonEncodedText.Encode("include_ccs_metadata"); + private static readonly System.Text.Json.JsonEncodedText PropKeepAlive = System.Text.Json.JsonEncodedText.Encode("keep_alive"); + private static readonly System.Text.Json.JsonEncodedText PropKeepOnCompletion = System.Text.Json.JsonEncodedText.Encode("keep_on_completion"); private static readonly System.Text.Json.JsonEncodedText PropLocale = System.Text.Json.JsonEncodedText.Encode("locale"); private static readonly System.Text.Json.JsonEncodedText PropParams = System.Text.Json.JsonEncodedText.Encode("params"); private static readonly System.Text.Json.JsonEncodedText PropProfile = System.Text.Json.JsonEncodedText.Encode("profile"); @@ -84,6 +68,8 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy LocalJsonValue propColumnar = default; LocalJsonValue propFilter = default; LocalJsonValue propIncludeCcsMetadata = default; + LocalJsonValue propKeepAlive = default; + LocalJsonValue propKeepOnCompletion = default; LocalJsonValue propLocale = default; LocalJsonValue?> propParams = default; LocalJsonValue propProfile = default; @@ -91,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy LocalJsonValue propWaitForCompletionTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, null)) + if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +87,17 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy continue; } - if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, null)) + if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propKeepAlive.TryReadProperty(ref reader, options, PropKeepAlive, null)) + { + continue; + } + + if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -146,6 +142,8 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy Columnar = propColumnar.Value, Filter = propFilter.Value, IncludeCcsMetadata = propIncludeCcsMetadata.Value, + KeepAlive = propKeepAlive.Value, + KeepOnCompletion = propKeepOnCompletion.Value, Locale = propLocale.Value, Params = propParams.Value, Profile = propProfile.Value, @@ -157,12 +155,14 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropColumnar, value.Columnar, null, null); + writer.WriteProperty(options, PropColumnar, value.Columnar, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, null); + writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); + writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropWaitForCompletionTimeout, value.WaitForCompletionTimeout, null, null); writer.WriteEndObject(); @@ -236,44 +236,44 @@ internal AsyncQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. /// /// - public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + public bool? Columnar { get; set; } /// /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. /// /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } /// /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// object with information about the clusters that participated in the search along with info such as shards + /// count. /// /// - public bool? Columnar { get; set; } + public bool? IncludeCcsMetadata { get; set; } /// /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// The period for which the query and its results are stored in the cluster. + /// The default period is five days. + /// When this period expires, the query and its results are deleted, even if the query is still ongoing. + /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } + public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get; set; } /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters - /// object with information about the clusters that participated in the search along with info such as shards - /// count. + /// Indicates whether the query and its results are stored in the cluster. + /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. /// /// - public bool? IncludeCcsMetadata { get; set; } + public bool? KeepOnCompletion { get; set; } public string? Locale { get; set; } /// @@ -377,32 +377,6 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Format(Ela return this; } - /// - /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. - /// - /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.KeepAlive = value; - return this; - } - - /// - /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. - /// - /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) - { - Instance.KeepOnCompletion = value; - return this; - } - /// /// /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. @@ -460,6 +434,32 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor IncludeCcs return this; } + /// + /// + /// The period for which the query and its results are stored in the cluster. + /// The default period is five days. + /// When this period expires, the query and its results are deleted, even if the query is still ongoing. + /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.KeepAlive = value; + return this; + } + + /// + /// + /// Indicates whether the query and its results are stored in the cluster. + /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) + { + Instance.KeepOnCompletion = value; + return this; + } + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Locale(string? value) { Instance.Locale = value; @@ -642,73 +642,73 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor /// /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Columnar(bool? value = true) { - Instance.KeepAlive = value; + Instance.Columnar = value; return this; } /// /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) { - Instance.KeepOnCompletion = value; + Instance.Filter = value; return this; } /// /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Columnar(bool? value = true) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(System.Action> action) { - Instance.Columnar = value; + Instance.Filter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); return this; } /// /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// object with information about the clusters that participated in the search along with info such as shards + /// count. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor IncludeCcsMetadata(bool? value = true) { - Instance.Filter = value; + Instance.IncludeCcsMetadata = value; return this; } /// /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// The period for which the query and its results are stored in the cluster. + /// The default period is five days. + /// When this period expires, the query and its results are deleted, even if the query is still ongoing. + /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(System.Action> action) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) { - Instance.Filter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); + Instance.KeepAlive = value; return this; } /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters - /// object with information about the clusters that participated in the search along with info such as shards - /// count. + /// Indicates whether the query and its results are stored in the cluster. + /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor IncludeCcsMetadata(bool? value = true) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) { - Instance.IncludeCcsMetadata = value; + Instance.KeepOnCompletion = value; return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs index 68a186e87bc..3d51c67f8c2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, null)) + if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys continue; } - if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, null)) + if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,7 +95,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,12 +130,12 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropColumnar, value.Columnar, null, null); + writer.WriteProperty(options, PropColumnar, value.Columnar, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, null); + writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs index e9f0a87b85a..cc410e53478 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.GetResponse Read(ref Sy continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.GetResponse Read(ref Sy continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.GetResponse Read(ref Sy continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,11 +134,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIgnored, value.Ignored, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs index 422b2d9bcbc..624165f5504 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.HealthReportResponse Read(ref Syst continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropClusterName, value.ClusterName, null, null); writer.WriteProperty(options, PropIndicators, value.Indicators, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs index e4139deac79..9b4a72817bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AnalyzeIndexReques continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,7 +128,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropAttributes, value.Attributes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropCharFilter, value.CharFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropNormalizer, value.Normalizer, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs index 6665bfe081e..c7fdc6108ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.FieldUsageStatsRes } propStats ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex value, null, null); + reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propStats[key] = value; } @@ -60,7 +60,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Stats) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs index dba8e30ee07..7935e65f7a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.GetDataLifecycleSt continue; } - if (propLastRunDurationInMillis.TryReadProperty(ref reader, options, PropLastRunDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propLastRunDurationInMillis.TryReadProperty(ref reader, options, PropLastRunDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTimeBetweenStartsInMillis.TryReadProperty(ref reader, options, PropTimeBetweenStartsInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTimeBetweenStartsInMillis.TryReadProperty(ref reader, options, PropTimeBetweenStartsInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreamCount, value.DataStreamCount, null, null); writer.WriteProperty(options, PropDataStreams, value.DataStreams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropLastRunDurationInMillis, value.LastRunDurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTimeBetweenStartsInMillis, value.TimeBetweenStartsInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropLastRunDurationInMillis, value.LastRunDurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimeBetweenStartsInMillis, value.TimeBetweenStartsInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs index 7c092fbfd45..db19e3f8358 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.GetMigrateReindexS continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -134,7 +134,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropException, value.Exception, null, null); writer.WriteProperty(options, PropInProgress, value.InProgress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPending, value.Pending, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeMillis, value.StartTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropSuccesses, value.Successes, null, null); writer.WriteProperty(options, PropTotalIndicesInDataStream, value.TotalIndicesInDataStream, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs index 1af2e90b105..a9f6190a39f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutAliasRequest Re continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs index faaabbc3a33..2ed8b9dffb3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,7 +104,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 1e5ac240245..1fcacf215ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, null)) + if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe continue; } - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -154,16 +154,16 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, null); + writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropComposedOf, value.ComposedOf, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDataStream, value.DataStream, null, null); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIgnoreMissingComponentTemplates, value.IgnoreMissingComponentTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndexPatterns, value.IndexPatterns, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs index 092f7376244..b4633761195 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs @@ -115,10 +115,50 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// /// To revert a setting to the default value, use a null value. -/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. +/// The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. /// To preserve existing settings from being updated, set the preserve_existing parameter to true. /// /// +/// For performance optimization during bulk indexing, you can disable the refresh interval. +/// Refer to disable refresh interval for an example. +/// There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: +/// +/// +/// { +/// "number_of_replicas": 1 +/// } +/// +/// +/// Or you can use an index setting object: +/// +/// +/// { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// +/// +/// Or you can use dot annotation: +/// +/// +/// { +/// "index.number_of_replicas": 1 +/// } +/// +/// +/// Or you can embed any of the aforementioned options in a settings object. For example: +/// +/// +/// { +/// "settings": { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// } +/// +/// /// NOTE: You can only define new analyzers on closed indices. /// To add an analyzer, you must close the index, define the analyzer, and reopen the index. /// You cannot close the write index of a data stream. @@ -127,6 +167,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// This affects searches and any new data added to the stream after the rollover. /// However, it does not affect the data stream's backing indices or their existing data. /// To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it. +/// Refer to updating analyzers on existing indices for step-by-step examples. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.PutIndicesSettingsRequestConverter))] @@ -265,10 +306,50 @@ internal PutIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serialization.J /// /// /// To revert a setting to the default value, use a null value. -/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. +/// The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. /// To preserve existing settings from being updated, set the preserve_existing parameter to true. /// /// +/// For performance optimization during bulk indexing, you can disable the refresh interval. +/// Refer to disable refresh interval for an example. +/// There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: +/// +/// +/// { +/// "number_of_replicas": 1 +/// } +/// +/// +/// Or you can use an index setting object: +/// +/// +/// { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// +/// +/// Or you can use dot annotation: +/// +/// +/// { +/// "index.number_of_replicas": 1 +/// } +/// +/// +/// Or you can embed any of the aforementioned options in a settings object. For example: +/// +/// +/// { +/// "settings": { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// } +/// +/// /// NOTE: You can only define new analyzers on closed indices. /// To add an analyzer, you must close the index, define the analyzer, and reopen the index. /// You cannot close the write index of a data stream. @@ -277,6 +358,7 @@ internal PutIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serialization.J /// This affects searches and any new data added to the stream after the rollover. /// However, it does not affect the data stream's backing indices or their existing data. /// To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it. +/// Refer to updating analyzers on existing indices for step-by-step examples. /// /// public readonly partial struct PutIndicesSettingsRequestDescriptor @@ -514,10 +596,50 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutIndicesSettingsRequestDe /// /// /// To revert a setting to the default value, use a null value. -/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. +/// The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. /// To preserve existing settings from being updated, set the preserve_existing parameter to true. /// /// +/// For performance optimization during bulk indexing, you can disable the refresh interval. +/// Refer to disable refresh interval for an example. +/// There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: +/// +/// +/// { +/// "number_of_replicas": 1 +/// } +/// +/// +/// Or you can use an index setting object: +/// +/// +/// { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// +/// +/// Or you can use dot annotation: +/// +/// +/// { +/// "index.number_of_replicas": 1 +/// } +/// +/// +/// Or you can embed any of the aforementioned options in a settings object. For example: +/// +/// +/// { +/// "settings": { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// } +/// +/// /// NOTE: You can only define new analyzers on closed indices. /// To add an analyzer, you must close the index, define the analyzer, and reopen the index. /// You cannot close the write index of a data stream. @@ -526,6 +648,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutIndicesSettingsRequestDe /// This affects searches and any new data added to the stream after the rollover. /// However, it does not affect the data stream's backing indices or their existing data. /// To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it. +/// Refer to updating analyzers on existing indices for step-by-step examples. /// /// public readonly partial struct PutIndicesSettingsRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs index ebccfe90c59..2bf017fba6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, null)) + if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,7 +134,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest continue; } - if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, null)) + if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -188,13 +188,13 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDynamicDateFormats, value.DynamicDateFormats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDynamicTemplates, value.DynamicTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropFieldNames, value.FieldNames, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNumericDetection, value.NumericDetection, null, null); + writer.WriteProperty(options, PropNumericDetection, value.NumericDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropRuntime, value.Runtime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs index be23a48f4d8..ae4d415aa00 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutTemplateRequest continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutTemplateRequest continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,9 +125,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAliases, value.Aliases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropIndexPatterns, value.IndexPatterns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMappings, value.Mappings, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSettings, value.Settings, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index b2c35221491..fa9459662dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, null)) + if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe continue; } - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,7 +117,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,7 +127,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,16 +160,16 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, null); + writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropComposedOf, value.ComposedOf, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDataStream, value.DataStream, null, null); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIgnoreMissingComponentTemplates, value.IgnoreMissingComponentTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndexPatterns, value.IndexPatterns, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs index 49baf101077..7876d9bb30d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs index e8813c17772..5fb77690aa4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs @@ -55,10 +55,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// It only works with the chat_completion task type for openai and elastic inference services. /// /// -/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. -/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. -/// -/// /// NOTE: The chat_completion task type is only available within the _stream API and only supports streaming. /// The Chat completion inference API and the Stream inference API differ in their response structure and capabilities. /// The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. @@ -131,10 +127,6 @@ internal ChatCompletionUnifiedRequest(Elastic.Clients.Elasticsearch.Serializatio /// It only works with the chat_completion task type for openai and elastic inference services. /// /// -/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. -/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. -/// -/// /// NOTE: The chat_completion task type is only available within the _stream API and only supports streaming. /// The Chat completion inference API and the Stream inference API differ in their response structure and capabilities. /// The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs index 227f5e0d8de..7ebf3c21e32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs @@ -97,7 +97,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// Create an Amazon Bedrock inference endpoint. /// /// -/// Creates an inference endpoint to perform an inference task with the amazonbedrock service. +/// Create an inference endpoint to perform an inference task with the amazonbedrock service. /// /// /// info @@ -198,7 +198,7 @@ internal PutAmazonbedrockRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// Create an Amazon Bedrock inference endpoint. /// /// -/// Creates an inference endpoint to perform an inference task with the amazonbedrock service. +/// Create an inference endpoint to perform an inference task with the amazonbedrock service. /// /// /// info diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs index e3821f127f7..45e10e9608a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockResponse LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutAmazonbedrockResponse(Elastic.Clients.Elasticsearch.Serialization.Js #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs index 6363b51dfb6..3da47ef778e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutAnthropicResponse Rea LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutAnthropicResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs index 2ba6b24f432..11926916ac4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioResponse LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutAzureaistudioResponse(Elastic.Clients.Elasticsearch.Serialization.Js #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs index c092479a798..274008ee416 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiResponse R LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutAzureopenaiResponse(Elastic.Clients.Elasticsearch.Serialization.Json #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs index d04af5a4c56..9a82f4d5baa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutCohereResponse Read(r LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutCohereResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs index 199c5f88133..fd06c7770a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutElasticsearchResponse LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutElasticsearchResponse(Elastic.Clients.Elasticsearch.Serialization.Js #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs index 826965b7f3d..00ad4488b0f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutElserResponse Read(re LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutElserResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs index f1c54653693..d555cedad88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRespons LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutGoogleaistudioResponse(Elastic.Clients.Elasticsearch.Serialization.J #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs index 0497196f15b..63b3c736048 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRespons LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutGooglevertexaiResponse(Elastic.Clients.Elasticsearch.Serialization.J #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs index 82f5edf1e93..dde2ab04e17 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceResponse R LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutHuggingFaceResponse(Elastic.Clients.Elasticsearch.Serialization.Json #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs index d9cff4d8225..d1ddf6c04eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs @@ -49,6 +49,91 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. /// +/// +/// The following integrations are available through the inference API. You can find the available task types next to the integration name: +/// +/// +/// +/// +/// AlibabaCloud AI Search (completion, rerank, sparse_embedding, text_embedding) +/// +/// +/// +/// +/// Amazon Bedrock (completion, text_embedding) +/// +/// +/// +/// +/// Anthropic (completion) +/// +/// +/// +/// +/// Azure AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Azure OpenAI (completion, text_embedding) +/// +/// +/// +/// +/// Cohere (completion, rerank, text_embedding) +/// +/// +/// +/// +/// Elasticsearch (rerank, sparse_embedding, text_embedding - this service is for built-in models and models uploaded through Eland) +/// +/// +/// +/// +/// ELSER (sparse_embedding) +/// +/// +/// +/// +/// Google AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Google Vertex AI (rerank, text_embedding) +/// +/// +/// +/// +/// Hugging Face (text_embedding) +/// +/// +/// +/// +/// Mistral (text_embedding) +/// +/// +/// +/// +/// OpenAI (chat_completion, completion, text_embedding) +/// +/// +/// +/// +/// VoyageAI (text_embedding, rerank) +/// +/// +/// +/// +/// Watsonx inference integration (text_embedding) +/// +/// +/// +/// +/// JinaAI (text_embedding, rerank) +/// +/// +/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestConverter))] public sealed partial class PutInferenceRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -108,7 +193,7 @@ internal PutInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// - /// The task type + /// The task type. Refer to the integration list in the API description for the available task types. /// /// public Elastic.Clients.Elasticsearch.Inference.TaskType? TaskType { get => P("task_type"); set => PO("task_type", value); } @@ -128,6 +213,91 @@ internal PutInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. /// +/// +/// The following integrations are available through the inference API. You can find the available task types next to the integration name: +/// +/// +/// +/// +/// AlibabaCloud AI Search (completion, rerank, sparse_embedding, text_embedding) +/// +/// +/// +/// +/// Amazon Bedrock (completion, text_embedding) +/// +/// +/// +/// +/// Anthropic (completion) +/// +/// +/// +/// +/// Azure AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Azure OpenAI (completion, text_embedding) +/// +/// +/// +/// +/// Cohere (completion, rerank, text_embedding) +/// +/// +/// +/// +/// Elasticsearch (rerank, sparse_embedding, text_embedding - this service is for built-in models and models uploaded through Eland) +/// +/// +/// +/// +/// ELSER (sparse_embedding) +/// +/// +/// +/// +/// Google AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Google Vertex AI (rerank, text_embedding) +/// +/// +/// +/// +/// Hugging Face (text_embedding) +/// +/// +/// +/// +/// Mistral (text_embedding) +/// +/// +/// +/// +/// OpenAI (chat_completion, completion, text_embedding) +/// +/// +/// +/// +/// VoyageAI (text_embedding, rerank) +/// +/// +/// +/// +/// Watsonx inference integration (text_embedding) +/// +/// +/// +/// +/// JinaAI (text_embedding, rerank) +/// +/// +/// /// public readonly partial struct PutInferenceRequestDescriptor { @@ -175,7 +345,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor Inf /// /// - /// The task type + /// The task type. Refer to the integration list in the API description for the available task types. /// /// public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.TaskType? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs index 99c51afe541..bcd6474e3d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutMistralResponse Read( LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutMistralResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs index 9e147977087..db078f1af21 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutOpenaiResponse Read(r LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutOpenaiResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs index 929cafb70b3..11d657906c1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutVoyageaiResponse Read LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutVoyageaiResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs index eac8b5e6efb..314fe323f1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutWatsonxResponse Read( LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutWatsonxResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs index c199bde3d89..507c6e82465 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,12 +121,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProcessors, value.Processors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs index ca8db273d91..8350f33c90d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.PostStartBasicRe continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); writer.WriteProperty(options, PropBasicWasStarted, value.BasicWasStarted, null, null); writer.WriteProperty(options, PropErrorMessage, value.ErrorMessage, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs index 66145dadcc6..a0b2f6ee026 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.PostStartTrialRe continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); writer.WriteProperty(options, PropErrorMessage, value.ErrorMessage, null, null); writer.WriteProperty(options, PropTrialWasStarted, value.TrialWasStarted, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs index 819f68b0e26..d8faf8a4b68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CloseJobRequest Re LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, null)) + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propForce.TryReadProperty(ref reader, options, PropForce, null)) + if (propForce.TryReadProperty(ref reader, options, PropForce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,8 +77,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CloseJobRequest Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.CloseJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, null); - writer.WriteProperty(options, PropForce, value.Force, null, null); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropForce, value.Force, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs index 28d63c49ca4..a10b531ead9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DeleteExpiredDataR LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DeleteExpiredDataR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DeleteExpiredDataRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs index f1cb6cf3eb4..7d4b4499bd8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAn LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAn continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,12 +117,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAn public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs index 34bdf48e8b2..26d21bfab0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs @@ -45,27 +45,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FlushJobRequest Re LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdvanceTime.TryReadProperty(ref reader, options, PropAdvanceTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propAdvanceTime.TryReadProperty(ref reader, options, PropAdvanceTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCalcInterim.TryReadProperty(ref reader, options, PropCalcInterim, null)) + if (propCalcInterim.TryReadProperty(ref reader, options, PropCalcInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propSkipTime.TryReadProperty(ref reader, options, PropSkipTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propSkipTime.TryReadProperty(ref reader, options, PropSkipTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -93,11 +93,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FlushJobRequest Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.FlushJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdvanceTime, value.AdvanceTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropCalcInterim, value.CalcInterim, null, null); - writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropSkipTime, value.SkipTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropAdvanceTime, value.AdvanceTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCalcInterim, value.CalcInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropSkipTime, value.SkipTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs index 24655c04dcf..ea1d8c49ff1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FlushJobResponse R continue; } - if (propLastFinalizedBucketEnd.TryReadProperty(ref reader, options, PropLastFinalizedBucketEnd, null)) + if (propLastFinalizedBucketEnd.TryReadProperty(ref reader, options, PropLastFinalizedBucketEnd, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlushed, value.Flushed, null, null); - writer.WriteProperty(options, PropLastFinalizedBucketEnd, value.LastFinalizedBucketEnd, null, null); + writer.WriteProperty(options, PropLastFinalizedBucketEnd, value.LastFinalizedBucketEnd, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs index 9874c668109..e3c68ca89b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs @@ -64,27 +64,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAnomalyScore.TryReadProperty(ref reader, options, PropAnomalyScore, null)) + if (propAnomalyScore.TryReadProperty(ref reader, options, PropAnomalyScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDesc.TryReadProperty(ref reader, options, PropDesc, null)) + if (propDesc.TryReadProperty(ref reader, options, PropDesc, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, null)) + if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExpand.TryReadProperty(ref reader, options, PropExpand, null)) + if (propExpand.TryReadProperty(ref reader, options, PropExpand, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -130,14 +130,14 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAnomalyScore, value.AnomalyScore, null, null); - writer.WriteProperty(options, PropDesc, value.Desc, null, null); - writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, null); - writer.WriteProperty(options, PropExpand, value.Expand, null, null); + writer.WriteProperty(options, PropAnomalyScore, value.AnomalyScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDesc, value.Desc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExpand, value.Expand, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPage, value.Page, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs index 4b73272b113..6c01ea208ba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsR LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDesc.TryReadProperty(ref reader, options, PropDesc, null)) + if (propDesc.TryReadProperty(ref reader, options, PropDesc, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -78,7 +78,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsR continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -106,11 +106,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDesc, value.Desc, null, null); - writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropDesc, value.Desc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropPage, value.Page, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs index c49129b12ed..61c4da75b8e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, null)) + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, null)) + if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,13 +109,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, null); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBucketSpan, value.BucketSpan, null, null); - writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, null); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOverallScore, value.OverallScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); - writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs index d289c9cb6eb..4fa2e8f1838 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs @@ -62,17 +62,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDesc.TryReadProperty(ref reader, options, PropDesc, null)) + if (propDesc.TryReadProperty(ref reader, options, PropDesc, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, null)) + if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest continue; } - if (propRecordScore.TryReadProperty(ref reader, options, PropRecordScore, null)) + if (propRecordScore.TryReadProperty(ref reader, options, PropRecordScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -122,13 +122,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDesc, value.Desc, null, null); - writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, null); + writer.WriteProperty(options, PropDesc, value.Desc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPage, value.Page, null, null); - writer.WriteProperty(options, PropRecordScore, value.RecordScore, null, null); + writer.WriteProperty(options, PropRecordScore, value.RecordScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs index 9b2a1656266..df7d200cb83 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyt LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,7 +87,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyt continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,13 +141,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyt public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); writer.WriteProperty(options, PropHeaders, value.Headers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs index 2747076cc86..319bdf6f8de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRequest continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,7 +160,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRequest continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,12 +205,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -221,7 +221,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. /// You can associate only one datafeed with each anomaly detection job. /// The datafeed contains a query that runs at a defined interval (frequency). -/// If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query: {"match_all": {"boost": 1}}`. +/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. +/// By default, the datafeed uses the following query: {"match_all": {"boost": 1}}. /// /// /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had @@ -423,7 +424,8 @@ internal PutDatafeedRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. /// You can associate only one datafeed with each anomaly detection job. /// The datafeed contains a query that runs at a defined interval (frequency). -/// If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query: {"match_all": {"boost": 1}}`. +/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. +/// By default, the datafeed uses the following query: {"match_all": {"boost": 1}}. /// /// /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had @@ -1031,7 +1033,8 @@ public Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRequestDescripto /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. /// You can associate only one datafeed with each anomaly detection job. /// The datafeed contains a query that runs at a defined interval (frequency). -/// If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query: {"match_all": {"boost": 1}}`. +/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. +/// By default, the datafeed uses the following query: {"match_all": {"boost": 1}}. /// /// /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs index 41185acb78c..643e754eeed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs @@ -106,7 +106,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRespons continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,7 +178,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs index 9c44893f119..52d994fbc07 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs @@ -124,7 +124,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read LocalJsonValue propResultsRetentionDays = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, null)) + if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -149,7 +149,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, null)) + if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,12 +184,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, null)) + if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -199,7 +199,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -238,22 +238,22 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, null); + writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysisConfig, value.AnalysisConfig, null, null); writer.WriteProperty(options, PropAnalysisLimits, value.AnalysisLimits, null, null); writer.WriteProperty(options, PropBackgroundPersistInterval, value.BackgroundPersistInterval, null, null); writer.WriteProperty(options, PropCustomSettings, value.CustomSettings, null, null); - writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, null); + writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataDescription, value.DataDescription, null, null); writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropGroups, value.Groups, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); - writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs index 58e51bc043d..c756fdc7537 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs @@ -156,7 +156,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse Rea continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -166,7 +166,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse Rea continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -226,9 +226,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs index 9592c96c54e..1371d4826c0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs @@ -103,12 +103,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelReq continue; } - if (propModelSizeBytes.TryReadProperty(ref reader, options, PropModelSizeBytes, null)) + if (propModelSizeBytes.TryReadProperty(ref reader, options, PropModelSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propModelType.TryReadProperty(ref reader, options, PropModelType, null)) + if (propModelType.TryReadProperty(ref reader, options, PropModelType, static Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -163,8 +163,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInput, value.Input, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, null); - writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, null); - writer.WriteProperty(options, PropModelType, value.ModelType, null, null); + writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropModelType, value.ModelType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPlatformArchitecture, value.PlatformArchitecture, null, null); writer.WriteProperty(options, PropPrefixStrings, value.PrefixStrings, null, null); writer.WriteProperty(options, PropTags, value.Tags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs index a165262fac2..3c6407c1877 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelRes continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelRes continue; } - if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, null)) + if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, null)) + if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, null)) + if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,7 +153,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelRes continue; } - if (propModelType.TryReadProperty(ref reader, options, PropModelType, null)) + if (propModelType.TryReadProperty(ref reader, options, PropModelType, static Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -219,12 +219,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCompressedDefinition, value.CompressedDefinition, null, null); writer.WriteProperty(options, PropCreatedBy, value.CreatedBy, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDefaultFieldMap, value.DefaultFieldMap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, null); - writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, null); - writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, null); + writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInput, value.Input, null, null); writer.WriteProperty(options, PropLicenseLevel, value.LicenseLevel, null, null); @@ -233,7 +233,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropModelPackage, value.ModelPackage, null, null); writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, null); - writer.WriteProperty(options, PropModelType, value.ModelType, null, null); + writer.WriteProperty(options, PropModelType, value.ModelType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPlatformArchitecture, value.PlatformArchitecture, null, null); writer.WriteProperty(options, PropPrefixStrings, value.PrefixStrings, null, null); writer.WriteProperty(options, PropTags, value.Tags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs index 32d2b24ea0f..be7e7983d61 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RevertModelSnapsho LocalJsonValue propDeleteInterveningResults = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeleteInterveningResults.TryReadProperty(ref reader, options, PropDeleteInterveningResults, null)) + if (propDeleteInterveningResults.TryReadProperty(ref reader, options, PropDeleteInterveningResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RevertModelSnapsho public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.RevertModelSnapshotRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeleteInterveningResults, value.DeleteInterveningResults, null, null); + writer.WriteProperty(options, PropDeleteInterveningResults, value.DeleteInterveningResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs index 363246da72b..427591dfaa0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StartDatafeedReque LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -77,8 +77,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StartDatafeedReque public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StartDatafeedRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs index 621908a8803..a8bb1a53d6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StopDatafeedReques LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, null)) + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propForce.TryReadProperty(ref reader, options, PropForce, null)) + if (propForce.TryReadProperty(ref reader, options, PropForce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,8 +77,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StopDatafeedReques public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StopDatafeedRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, null); - writer.WriteProperty(options, PropForce, value.Force, null, null); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropForce, value.Force, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs index 2af12cef3c6..bcdf616f9fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAna LocalJsonValue propModelMemoryLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAna continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,9 +85,9 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAna public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs index 996fc46017f..5e97d3bc24b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs @@ -154,7 +154,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDatafeedRequ continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,7 +179,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDatafeedRequ continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -222,12 +222,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs index 1914a21b5bc..88b1cf9eb76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs @@ -106,7 +106,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDatafeedResp continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,7 +178,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs index 2172625a44f..64bf72cf1b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R LocalJsonValue propResultsRetentionDays = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, null)) + if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R continue; } - if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, null)) + if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,7 +120,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R continue; } - if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, null)) + if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,12 +130,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -173,21 +173,21 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, null); + writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysisLimits, value.AnalysisLimits, null, null); writer.WriteProperty(options, PropBackgroundPersistInterval, value.BackgroundPersistInterval, null, null); writer.WriteProperty(options, PropCategorizationFilters, value.CategorizationFilters, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropCustomSettings, value.CustomSettings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, null); + writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDetectors, value.Detectors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropGroups, value.Groups, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelPruneWindow, value.ModelPruneWindow, null, null); - writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); + writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerPartitionCategorization, value.PerPartitionCategorization, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs index 9779e6f0b75..a9a9ef57522 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs @@ -123,7 +123,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobResponse continue; } - if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -163,7 +163,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobResponse continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -173,7 +173,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobResponse continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -227,7 +227,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDataDescription, value.DataDescription, null, null); writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropGroups, value.Groups, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropJobType, value.JobType, null, null); @@ -235,9 +235,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs index 7e5649a3517..ff2f8f2283f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateModelSnapsho continue; } - if (propRetain.TryReadProperty(ref reader, options, PropRetain, null)) + if (propRetain.TryReadProperty(ref reader, options, PropRetain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropRetain, value.Retain, null, null); + writer.WriteProperty(options, PropRetain, value.Retain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs index 3510350177d..8b1de0e1a88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateTrainedModel continue; } - if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, null)) + if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); - writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, null); + writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs index 9391628c814..dfa936bbd78 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ValidateRequest Re continue; } - if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, null)) + if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,7 +132,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelPlot, value.ModelPlot, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); - writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); + writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs index 32b3fd7e520..60f8de8c4d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryRules.GetRuleResponse Read(re continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropActions, value.Actions, null, null); writer.WriteProperty(options, PropCriteria, value.Criteria, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRuleId, value.RuleId, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs index 070e04c600d..cf36adc3c62 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.QueryRules.PutRuleRequest Read(ref continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,7 +87,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropActions, value.Actions, null, null); writer.WriteProperty(options, PropCriteria, value.Criteria, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs index 86e6d769933..db0e7dc9d3d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs @@ -120,7 +120,7 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, null)) + if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, static Elastic.Clients.Elasticsearch.Conflicts? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,7 +130,7 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,7 +140,7 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -174,11 +174,11 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ReindexRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConflicts, value.Conflicts, null, null); + writer.WriteProperty(options, PropConflicts, value.Conflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Conflicts? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDest, value.Dest, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs index b0f5b8dd4f5..9d122ee93e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs @@ -63,17 +63,17 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te LocalJsonValue propVersionConflicts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBatches.TryReadProperty(ref reader, options, PropBatches, null)) + if (propBatches.TryReadProperty(ref reader, options, PropBatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCreated.TryReadProperty(ref reader, options, PropCreated, null)) + if (propCreated.TryReadProperty(ref reader, options, PropCreated, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te continue; } - if (propNoops.TryReadProperty(ref reader, options, PropNoops, null)) + if (propNoops.TryReadProperty(ref reader, options, PropNoops, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te continue; } - if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, null)) + if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,37 +108,37 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te continue; } - if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, null)) + if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null)) + if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,22 +177,22 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ReindexResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBatches, value.Batches, null, null); - writer.WriteProperty(options, PropCreated, value.Created, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropBatches, value.Batches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCreated, value.Created, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNoops, value.Noops, null, null); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropNoops, value.Noops, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetries, value.Retries, null, null); - writer.WriteProperty(options, PropSliceId, value.SliceId, null, null); + writer.WriteProperty(options, PropSliceId, value.SliceId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTask, value.Task, null, null); - writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropUpdated, value.Updated, null, null); - writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null); + writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpdated, value.Updated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs index 905105bc74f..03b548b8b02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Rollup.RollupSearchRequest Read(re continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAggregations, value.Aggregations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs index b814d9d470e..fb960c48b53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Rollup.RollupSearchResponse r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, null, null); writer.WriteProperty(options, PropHits, value.Hits, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs index ef7eda61322..43a8c7829f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.ScriptsPainlessExecuteRequest Read LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propContext.TryReadProperty(ref reader, options, PropContext, null)) + if (propContext.TryReadProperty(ref reader, options, PropContext, static Elastic.Clients.Elasticsearch.Core.ScriptsPainlessExecute.PainlessContext? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.ScriptsPainlessExecuteRequest Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScriptsPainlessExecuteRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropContext, value.Context, null, null); + writer.WriteProperty(options, PropContext, value.Context, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.ScriptsPainlessExecute.PainlessContext? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContextSetup, value.ContextSetup, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs index 0fca15c87ec..72b5a16956e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.ScrollResponse Read(ref continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.ScrollResponse Read(ref continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs index dfb6b116cf8..4bd8491158e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicatio continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicatio continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs index a6b51fbf99e..92b00795660 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs @@ -68,17 +68,17 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propBuffer.TryReadProperty(ref reader, options, PropBuffer, null)) + if (propBuffer.TryReadProperty(ref reader, options, PropBuffer, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExactBounds.TryReadProperty(ref reader, options, PropExactBounds, null)) + if (propExactBounds.TryReadProperty(ref reader, options, PropExactBounds, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExtent.TryReadProperty(ref reader, options, PropExtent, null)) + if (propExtent.TryReadProperty(ref reader, options, PropExtent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,17 +88,17 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propGridAgg.TryReadProperty(ref reader, options, PropGridAgg, null)) + if (propGridAgg.TryReadProperty(ref reader, options, PropGridAgg, static Elastic.Clients.Elasticsearch.Core.SearchMvt.GridAggregationType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGridPrecision.TryReadProperty(ref reader, options, PropGridPrecision, null)) + if (propGridPrecision.TryReadProperty(ref reader, options, PropGridPrecision, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGridType.TryReadProperty(ref reader, options, PropGridType, null)) + if (propGridType.TryReadProperty(ref reader, options, PropGridType, static Elastic.Clients.Elasticsearch.Core.SearchMvt.GridType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,7 +128,7 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propWithLabels.TryReadProperty(ref reader, options, PropWithLabels, null)) + if (propWithLabels.TryReadProperty(ref reader, options, PropWithLabels, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -166,19 +166,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAggs, value.Aggs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropBuffer, value.Buffer, null, null); - writer.WriteProperty(options, PropExactBounds, value.ExactBounds, null, null); - writer.WriteProperty(options, PropExtent, value.Extent, null, null); + writer.WriteProperty(options, PropBuffer, value.Buffer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExactBounds, value.ExactBounds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExtent, value.Extent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropGridAgg, value.GridAgg, null, null); - writer.WriteProperty(options, PropGridPrecision, value.GridPrecision, null, null); - writer.WriteProperty(options, PropGridType, value.GridType, null, null); + writer.WriteProperty(options, PropGridAgg, value.GridAgg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.SearchMvt.GridAggregationType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGridPrecision, value.GridPrecision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGridType, value.GridType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.SearchMvt.GridType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropWithLabels, value.WithLabels, null, null); + writer.WriteProperty(options, PropWithLabels, value.WithLabels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 29c824eb9fe..177f90ecfe5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -420,7 +420,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -435,7 +435,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -455,7 +455,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -470,7 +470,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -510,12 +510,12 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -550,7 +550,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -560,7 +560,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -570,7 +570,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -630,17 +630,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExt, value.Ext, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropKnn, value.Knn, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPit, value.Pit, null, null); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRank, value.Rank, null, null); writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); @@ -648,19 +648,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSlice, value.Slice, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStats, value.Stats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs index 2f08a074a48..0ac08ea4f11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.SearchResponse Read(ref continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.SearchResponse Read(ref continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs index ba0e0286c88..2de889d5dfa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs @@ -130,7 +130,7 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateRequest Read(ref Sys LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateRequest Read(ref Sys continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,10 +178,10 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateRequest Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SearchTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs index c7b3cbad976..4623dcee401 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateResponse continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateResponse continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropHits, value.Hits, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs index 4da626075f0..e657ccdb837 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Security.ActivateUserProfileRespon continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropDoc, value.Doc, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLabels, value.Labels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropLastSynchronized, value.LastSynchronized, null, null); writer.WriteProperty(options, PropUid, value.Uid, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs index ebabbdda924..eea64e53cbb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.CreateApiKeyResponse Read continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, null)) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropEncoded, value.Encoded, null, null); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, null); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs index 6ab82acc145..9f5762ec039 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.CreateCrossClusterApiKeyR continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropEncoded, value.Encoded, null, null); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs index e246fcb3db7..dd547ea04b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Security.GetTokenRequest Read(ref LocalJsonValue propUsername = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propGrantType.TryReadProperty(ref reader, options, PropGrantType, null)) + if (propGrantType.TryReadProperty(ref reader, options, PropGrantType, static Elastic.Clients.Elasticsearch.Security.AccessTokenGrantType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +101,7 @@ public override Elastic.Clients.Elasticsearch.Security.GetTokenRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetTokenRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropGrantType, value.GrantType, null, null); + writer.WriteProperty(options, PropGrantType, value.GrantType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Security.AccessTokenGrantType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKerberosTicket, value.KerberosTicket, null, null); writer.WriteProperty(options, PropPassword, value.Password, null, null); writer.WriteProperty(options, PropRefreshToken, value.RefreshToken, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs index 0522fde5072..5c60b7aae71 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.GrantApiKeyResponse Read( continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropEncoded, value.Encoded, null, null); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs index c14d2ee4dc8..8802a0031a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Security.InvalidateApiKeyRequest R continue; } - if (propOwner.TryReadProperty(ref reader, options, PropOwner, null)) + if (propOwner.TryReadProperty(ref reader, options, PropOwner, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,7 +104,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIds, value.Ids, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropOwner, value.Owner, null, null); + writer.WriteProperty(options, PropOwner, value.Owner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRealmName, value.RealmName, null, null); writer.WriteProperty(options, PropUsername, value.Username, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs index b3742d58d37..f8dc5cdbadf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest Rea LocalJsonValue?> propRunAs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropRoles, value.Roles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropRoleTemplates, value.RoleTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs index c3f73a4631e..6cf926f6561 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse Re LocalJsonValue propRoleMapping = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCreated.TryReadProperty(ref reader, options, PropCreated, null)) + if (propCreated.TryReadProperty(ref reader, options, PropCreated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCreated, value.Created, null, null); + writer.WriteProperty(options, PropCreated, value.Created, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoleMapping, value.RoleMapping, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs index e9284ae9399..cbc3f4ceb4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutUserRequest Read(ref S continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,7 +125,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropEmail, value.Email, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFullName, value.FullName, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropPassword, value.Password, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs index 59d0944e0e7..8894999dc98 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryApiKeysRequest Read( continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryApiKeysRequest Read( continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,10 +126,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAggregations, value.Aggregations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs index 933af11ae4d..fddff00bc8a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryRoleRequest Read(ref LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryRoleRequest Read(ref continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,10 +93,10 @@ public override Elastic.Clients.Elasticsearch.Security.QueryRoleRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.QueryRoleRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs index 43a85232afd..609995bfda2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryUserRequest Read(ref LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryUserRequest Read(ref continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override Elastic.Clients.Elasticsearch.Security.QueryUserRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.QueryUserRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs index f3668953670..a58e6c84ac7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Security.SuggestUserProfilesReques continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropData, value.Data, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropHint, value.Hint, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs index ccd1c8aa349..983aec71783 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Rea continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,7 +94,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Rea continue; } - if (propPartial.TryReadProperty(ref reader, options, PropPartial, null)) + if (propPartial.TryReadProperty(ref reader, options, PropPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,11 +126,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropExpandWildcards, value.ExpandWildcards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropFeatureStates, value.FeatureStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); - writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, null); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPartial, value.Partial, null, null); + writer.WriteProperty(options, PropPartial, value.Partial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs index dcf3179cbbd..70286996b8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotResponse Re LocalJsonValue propSnapshot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, null)) + if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotResponse Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAccepted, value.Accepted, null, null); + writer.WriteProperty(options, PropAccepted, value.Accepted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSnapshot, value.Snapshot, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs index 41ff80d2630..cc8ae333763 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs @@ -85,17 +85,17 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreRequest Read(ref S continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeAliases.TryReadProperty(ref reader, options, PropIncludeAliases, null)) + if (propIncludeAliases.TryReadProperty(ref reader, options, PropIncludeAliases, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreRequest Read(ref S continue; } - if (propPartial.TryReadProperty(ref reader, options, PropPartial, null)) + if (propPartial.TryReadProperty(ref reader, options, PropPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,12 +155,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFeatureStates, value.FeatureStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIgnoreIndexSettings, value.IgnoreIndexSettings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); - writer.WriteProperty(options, PropIncludeAliases, value.IncludeAliases, null, null); - writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, null); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeAliases, value.IncludeAliases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexSettings, value.IndexSettings, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropPartial, value.Partial, null, null); + writer.WriteProperty(options, PropPartial, value.Partial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRenamePattern, value.RenamePattern, null, null); writer.WriteProperty(options, PropRenameReplacement, value.RenameReplacement, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs index c38e4cd15e3..4856316a416 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreResponse Read(ref LocalJsonValue propSnapshot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, null)) + if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreResponse Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.RestoreResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAccepted, value.Accepted, null, null); + writer.WriteProperty(options, PropAccepted, value.Accepted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSnapshot, value.Snapshot, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs index ce49c9f0a80..0d699acc141 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs @@ -39,7 +39,7 @@ internal sealed partial class GetStatsResponseConverter : System.Text.Json.Seria public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue> propPolicyStats = default; + LocalJsonValue> propPolicyStats = default; LocalJsonValue propRetentionDeletionTime = default; LocalJsonValue propRetentionDeletionTimeMillis = default; LocalJsonValue propRetentionFailed = default; @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetSta LocalJsonValue propTotalSnapshotsTaken = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPolicyStats.TryReadProperty(ref reader, options, PropPolicyStats, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propPolicyStats.TryReadProperty(ref reader, options, PropPolicyStats, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -129,7 +129,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetSta public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetStatsResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPolicyStats, value.PolicyStats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropPolicyStats, value.PolicyStats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropRetentionDeletionTime, value.RetentionDeletionTime, null, null); writer.WriteProperty(options, PropRetentionDeletionTimeMillis, value.RetentionDeletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropRetentionFailed, value.RetentionFailed, null, null); @@ -161,7 +161,7 @@ internal GetStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif - System.Collections.Generic.IReadOnlyCollection PolicyStats { get; set; } + System.Collections.Generic.IReadOnlyCollection PolicyStats { get; set; } public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs index cc232f6c44e..3cfb41e102d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Sql.GetAsyncStatusResponse Read(re LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null)) + if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Sql.GetAsyncStatusResponse Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Sql.GetAsyncStatusResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null); + writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs index d259001539d..95426b306c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -77,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T LocalJsonValue propWaitForCompletionTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null)) + if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,7 +87,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, null)) + if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null)) + if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFieldMultiValueLeniency.TryReadProperty(ref reader, options, PropFieldMultiValueLeniency, null)) + if (propFieldMultiValueLeniency.TryReadProperty(ref reader, options, PropFieldMultiValueLeniency, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propIndexUsingFrozen.TryReadProperty(ref reader, options, PropIndexUsingFrozen, null)) + if (propIndexUsingFrozen.TryReadProperty(ref reader, options, PropIndexUsingFrozen, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,7 +122,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, null)) + if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -197,16 +197,16 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Sql.QueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, null); + writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCatalog, value.Catalog, null, null); - writer.WriteProperty(options, PropColumnar, value.Columnar, null, null); + writer.WriteProperty(options, PropColumnar, value.Columnar, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCursor, value.Cursor, null, null); - writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null); - writer.WriteProperty(options, PropFieldMultiValueLeniency, value.FieldMultiValueLeniency, null, null); + writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFieldMultiValueLeniency, value.FieldMultiValueLeniency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropIndexUsingFrozen, value.IndexUsingFrozen, null, null); + writer.WriteProperty(options, PropIndexUsingFrozen, value.IndexUsingFrozen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); - writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, null); + writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPageTimeout, value.PageTimeout, null, null); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs index 62aff016a21..fa95d0b7f11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryResponse Read(ref System. continue; } - if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null)) + if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null)) + if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,8 +92,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropColumns, value.Columns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropCursor, value.Cursor, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); - writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); + writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs index 9f65c235269..dbe91200e95 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Sql.TranslateRequest Read(ref Syst LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null)) + if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,7 +85,7 @@ public override Elastic.Clients.Elasticsearch.Sql.TranslateRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Sql.TranslateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null); + writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs index 49a6f6631da..922993e9ab5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Sql.TranslateResponse Read(ref Sys continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs index 095bde8f418..df41db89d54 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, null)) + if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,12 +93,12 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, null)) + if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, null)) + if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,7 +108,7 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propPositions.TryReadProperty(ref reader, options, PropPositions, null)) + if (propPositions.TryReadProperty(ref reader, options, PropPositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,17 +118,17 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, null)) + if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,16 +165,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDoc, value.Doc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, null); + writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropOffsets, value.Offsets, null, null); - writer.WriteProperty(options, PropPayloads, value.Payloads, null, null); + writer.WriteProperty(options, PropOffsets, value.Offsets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPayloads, value.Payloads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerFieldAnalyzer, value.PerFieldAnalyzer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPositions, value.Positions, null, null); + writer.WriteProperty(options, PropPositions, value.Positions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -265,6 +265,7 @@ public override System.Text.Json.Serialization.JsonConverter CreateConverter(Sys /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. /// Use routing only to hit a particular shard. +/// Refer to the linked documentation for detailed examples of how to use this API. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TermVectorsRequestConverterFactory))] @@ -522,6 +523,7 @@ internal TermVectorsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. /// Use routing only to hit a particular shard. +/// Refer to the linked documentation for detailed examples of how to use this API. /// /// public readonly partial struct TermVectorsRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs index d38bf955c4b..bdc6e0d2d4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.TermsEnumRequest Read(ref System.T LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.TermsEnumRequest Read(ref System.T continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,11 +109,11 @@ public override Elastic.Clients.Elasticsearch.TermsEnumRequest Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TermsEnumRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIndexFilter, value.IndexFilter, null, null); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropString, value.String, null, null); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs index 490c05e8a19..fe5c21229fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.TextStructure.FindFieldStructureRe continue; } - if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, null)) + if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, static Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,7 +170,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCharset, value.Charset, null, null); - writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, null); + writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldStats, value.FieldStats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropGrokPattern, value.GrokPattern, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs index 638e3913804..890559004a6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.TextStructure.FindMessageStructure continue; } - if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, null)) + if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, static Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,7 +170,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCharset, value.Charset, null, null); - writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, null); + writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldStats, value.FieldStats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropGrokPattern, value.GrokPattern, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs index c4d57cf50b2..4e46a5a7140 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs @@ -279,12 +279,12 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryRequest Read(ref Syst LocalJsonValue propSlice = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, null)) + if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, static Elastic.Clients.Elasticsearch.Conflicts? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -327,8 +327,8 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.UpdateByQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConflicts, value.Conflicts, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); + writer.WriteProperty(options, PropConflicts, value.Conflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Conflicts? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropSlice, value.Slice, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs index 495969e4c2b..d99afaa2a35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys LocalJsonValue propVersionConflicts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBatches.TryReadProperty(ref reader, options, PropBatches, null)) + if (propBatches.TryReadProperty(ref reader, options, PropBatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,12 +78,12 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys continue; } - if (propNoops.TryReadProperty(ref reader, options, PropNoops, null)) + if (propNoops.TryReadProperty(ref reader, options, PropNoops, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys continue; } - if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -113,32 +113,32 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys continue; } - if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, null)) + if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null)) + if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,22 +177,22 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.UpdateByQueryResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBatches, value.Batches, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropBatches, value.Batches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNoops, value.Noops, null, null); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropNoops, value.Noops, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetries, value.Retries, null, null); writer.WriteProperty(options, PropTask, value.Task, null, null); writer.WriteProperty(options, PropThrottled, value.Throttled, null, null); - writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropThrottledUntil, value.ThrottledUntil, null, null); - writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropUpdated, value.Updated, null, null); - writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null); + writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpdated, value.Updated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index fddf0253f30..5b284cfe510 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -138,7 +138,7 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest propUpsert = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDetectNoop.TryReadProperty(ref reader, options, PropDetectNoop, null)) + if (propDetectNoop.TryReadProperty(ref reader, options, PropDetectNoop, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,7 +148,7 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest r.ReadNullableValue(o))) { continue; } @@ -158,7 +158,7 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest r.ReadNullableValue(o))) { continue; } @@ -198,11 +198,11 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDetectNoop, value.DetectNoop, null, null); + writer.WriteProperty(options, PropDetectNoop, value.DetectNoop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDoc, value.Doc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TPartialDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropDocAsUpsert, value.DocAsUpsert, null, null); + writer.WriteProperty(options, PropDocAsUpsert, value.DocAsUpsert, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropScriptedUpsert, value.ScriptedUpsert, null, null); + writer.WriteProperty(options, PropScriptedUpsert, value.ScriptedUpsert, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropUpsert, value.Upsert, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs index ef7df1634d7..123f3171375 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,13 +121,13 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.UpdateResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGet, value.Get, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs index cbf2701dee0..66137cc65a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -52,7 +52,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien internal static void ReadItem(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options, out string name, out Elastic.Clients.Elasticsearch.Aggregations.IAggregate value) { - var key = reader.ReadPropertyName(options, null); + var key = reader.ReadPropertyName(options, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); reader.Read(); var parts = key.Split('#'); if (parts.Length != 2) @@ -144,214 +144,214 @@ internal static void WriteItem(System.Text.Json.Utf8JsonWriter writer, System.Te switch (value) { case Elastic.Clients.Elasticsearch.Aggregations.AdjacencyMatrixAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.AdjacencyMatrixAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.BucketMetricValueAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.BucketMetricValueAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ChildrenAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ChildrenAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DateRangeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DateRangeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.FilterAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.FilterAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.FrequentItemSetsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.FrequentItemSetsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoBoundsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoBoundsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GlobalAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GlobalAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.HdrPercentileRanksAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.HdrPercentileRanksAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.HdrPercentilesAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.HdrPercentilesAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.LongRareTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.LongRareTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MatrixStatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MatrixStatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MinAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MinAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MissingAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.NestedAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.NestedAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ParentAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ParentAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.RangeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.RangeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.RateAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.RateAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ReverseNestedAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ReverseNestedAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ScriptedMetricAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ScriptedMetricAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SimpleValueAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SimpleValueAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StringRareTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StringRareTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SumAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SumAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedRareTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedRareTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedSamplerAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedSamplerAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggregate v) => w.WritePropertyName(o, v)); break; default: throw new System.Text.Json.JsonException($"Variant '{0}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Aggregations.IAggregate)}'."); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs index 3929c3332d6..f0632e93961 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AggregationRange Read LocalJsonValue propTo = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AggregationRange Read continue; } - if (propTo.TryReadProperty(ref reader, options, PropTo, null)) + if (propTo.TryReadProperty(ref reader, options, PropTo, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AggregationRange Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.AggregationRange value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); - writer.WriteProperty(options, PropTo, value.To, null, null); + writer.WriteProperty(options, PropTo, value.To, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs index 9f32ee6be43..88eef8e4386 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ArrayPercentilesItem continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropKey, value.Key, null, null); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs index ad9a573549a..bcd848e2a70 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggr LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, null)) + if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggr continue; } - if (propMinimumInterval.TryReadProperty(ref reader, options, PropMinimumInterval, null)) + if (propMinimumInterval.TryReadProperty(ref reader, options, PropMinimumInterval, static Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -121,11 +121,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggr public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBuckets, value.Buckets, null, null); + writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropMinimumInterval, value.MinimumInterval, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropMinimumInterval, value.MinimumInterval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropOffset, value.Offset, null, null); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScript, value.Script, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs index f0ab2b896e7..7afa9ed7c76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate Read continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs index 653b81d3506..1503eb6a700 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AverageBucketAggregat continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs index 6d30c06e26b..71e0f01a82d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompression.TryReadProperty(ref reader, options, PropCompression, null)) + if (propCompression.TryReadProperty(ref reader, options, PropCompression, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompression, value.Compression, null, null); + writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs index bb08fda0587..0201b074a9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketMetricValueAggr continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropKeys, value.Keys, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs index dc99267dd8a..65febcbb61a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketScriptAggregati continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs index 7edf3928eff..560276291ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketSelectorAggrega continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs index 9cbe5dac0a9..e5fb71b1674 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketSortAggregation LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketSortAggregation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.BucketSortAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs index 2df42a5f795..478e93172e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregatio LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.CardinalityExecutionMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregatio continue; } - if (propPrecisionThreshold.TryReadProperty(ref reader, options, PropPrecisionThreshold, null)) + if (propPrecisionThreshold.TryReadProperty(ref reader, options, PropPrecisionThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRehash.TryReadProperty(ref reader, options, PropRehash, null)) + if (propRehash.TryReadProperty(ref reader, options, PropRehash, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,11 +97,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CardinalityExecutionMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropPrecisionThreshold, value.PrecisionThreshold, null, null); - writer.WriteProperty(options, PropRehash, value.Rehash, null, null); + writer.WriteProperty(options, PropPrecisionThreshold, value.PrecisionThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRehash, value.Rehash, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs index 57f4e1db906..f0ddfad8a66 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs @@ -66,37 +66,37 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggrega continue; } - if (propMaxMatchedTokens.TryReadProperty(ref reader, options, PropMaxMatchedTokens, null)) + if (propMaxMatchedTokens.TryReadProperty(ref reader, options, PropMaxMatchedTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxUniqueTokens.TryReadProperty(ref reader, options, PropMaxUniqueTokens, null)) + if (propMaxUniqueTokens.TryReadProperty(ref reader, options, PropMaxUniqueTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSimilarityThreshold.TryReadProperty(ref reader, options, PropSimilarityThreshold, null)) + if (propSimilarityThreshold.TryReadProperty(ref reader, options, PropSimilarityThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCategorizationAnalyzer, value.CategorizationAnalyzer, null, null); writer.WriteProperty(options, PropCategorizationFilters, value.CategorizationFilters, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMaxMatchedTokens, value.MaxMatchedTokens, null, null); - writer.WriteProperty(options, PropMaxUniqueTokens, value.MaxUniqueTokens, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSimilarityThreshold, value.SimilarityThreshold, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropMaxMatchedTokens, value.MaxMatchedTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxUniqueTokens, value.MaxUniqueTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSimilarityThreshold, value.SimilarityThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs index 5e09f2a9319..2f842aaa9f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregation continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAfter, value.After, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSources, value.Sources, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs index ac41b509ee0..d0e83214bab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeDateHistogra continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeDateHistogra continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeDateHistogra continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,13 +141,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFixedInterval, value.FixedInterval, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOffset, value.Offset, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs index f9dd876de95..9080054cb1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs @@ -57,22 +57,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeGeoTileGridA continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeGeoTileGridA continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -115,12 +115,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs index a0f4882607a..f718be19eaa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs @@ -55,17 +55,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeHistogramAgg continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeHistogramAgg continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInterval, value.Interval, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs index ba53d180cae..c66a65e22a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs @@ -48,17 +48,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeTermsAggrega continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeTermsAggrega continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs index 4c5ca6686a9..9ed709e697d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinality continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs index 6accac4ce31..5549934b46e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CumulativeSumAggregat continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs index e9ae813e335..0952fdd3670 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregat LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCalendarInterval.TryReadProperty(ref reader, options, PropCalendarInterval, null)) + if (propCalendarInterval.TryReadProperty(ref reader, options, PropCalendarInterval, static Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,12 +94,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregat continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -164,7 +164,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregat public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCalendarInterval, value.CalendarInterval, null, null); + writer.WriteProperty(options, PropCalendarInterval, value.CalendarInterval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExtendedBounds, value.ExtendedBounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFixedInterval, value.FixedInterval, null, null); @@ -174,8 +174,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInterval, value.Interval, null, null) #pragma warning restore CS0618 ; - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropOffset, value.Offset, null, null); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs index fdba37882fe..f2d1219e092 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate R continue; } - if (propNormalizedValue.TryReadProperty(ref reader, options, PropNormalizedValue, null)) + if (propNormalizedValue.TryReadProperty(ref reader, options, PropNormalizedValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate R continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,9 +90,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNormalizedValue, value.NormalizedValue, null, null); + writer.WriteProperty(options, PropNormalizedValue, value.NormalizedValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNormalizedValueAsString, value.NormalizedValueAsString, null, null); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs index 071389957a1..8caea294504 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs index b61c7ddbf0c..068a831781b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg LocalJsonValue propShardSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg continue; } - if (propMaxDocsPerValue.TryReadProperty(ref reader, options, PropMaxDocsPerValue, null)) + if (propMaxDocsPerValue.TryReadProperty(ref reader, options, PropMaxDocsPerValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMaxDocsPerValue, value.MaxDocsPerValue, null, null); + writer.WriteProperty(options, PropMaxDocsPerValue, value.MaxDocsPerValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs index 15c411095f8..15f37e4d9ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs index 7dcc6fbbd1e..1d136f6238b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsBucket Rea continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); writer.WriteProperty(options, PropKeyAsString, value.KeyAsString, null, null); if (value.Aggregations is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs index b6f058b9b1f..e59e27cb14b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat LocalJsonValue propVarianceSamplingAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,7 +94,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, null)) + if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,12 +139,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, null)) + if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, null)) + if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,7 +159,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, null)) + if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -169,7 +169,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propVariance.TryReadProperty(ref reader, options, PropVariance, null)) + if (propVariance.TryReadProperty(ref reader, options, PropVariance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,7 +179,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, null)) + if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -189,7 +189,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, null)) + if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -241,29 +241,29 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); - writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, null); + writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStdDeviationAsString, value.StdDeviationAsString, null, null); writer.WriteProperty(options, PropStdDeviationBounds, value.StdDeviationBounds, null, null); writer.WriteProperty(options, PropStdDeviationBoundsAsString, value.StdDeviationBoundsAsString, null, null); - writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, null); - writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, null); + writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); - writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, null); + writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSumOfSquaresAsString, value.SumOfSquaresAsString, null, null); - writer.WriteProperty(options, PropVariance, value.Variance, null, null); + writer.WriteProperty(options, PropVariance, value.Variance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceAsString, value.VarianceAsString, null, null); - writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, null); + writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVariancePopulationAsString, value.VariancePopulationAsString, null, null); - writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, null); + writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceSamplingAsString, value.VarianceSamplingAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs index c60d93451e4..739830dc43b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propSigma.TryReadProperty(ref reader, options, PropSigma, null)) + if (propSigma.TryReadProperty(ref reader, options, PropSigma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropSigma, value.Sigma, null, null); + writer.WriteProperty(options, PropSigma, value.Sigma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs index bd13ebfb7af..f988d531624 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg LocalJsonValue propVarianceSamplingAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,7 +94,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, null)) + if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,12 +139,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, null)) + if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, null)) + if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,7 +159,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, null)) + if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -169,7 +169,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propVariance.TryReadProperty(ref reader, options, PropVariance, null)) + if (propVariance.TryReadProperty(ref reader, options, PropVariance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,7 +179,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, null)) + if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -189,7 +189,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, null)) + if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -241,29 +241,29 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); - writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, null); + writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStdDeviationAsString, value.StdDeviationAsString, null, null); writer.WriteProperty(options, PropStdDeviationBounds, value.StdDeviationBounds, null, null); writer.WriteProperty(options, PropStdDeviationBoundsAsString, value.StdDeviationBoundsAsString, null, null); - writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, null); - writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, null); + writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); - writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, null); + writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSumOfSquaresAsString, value.SumOfSquaresAsString, null, null); - writer.WriteProperty(options, PropVariance, value.Variance, null, null); + writer.WriteProperty(options, PropVariance, value.Variance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceAsString, value.VarianceAsString, null, null); - writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, null); + writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVariancePopulationAsString, value.VariancePopulationAsString, null, null); - writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, null); + writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceSamplingAsString, value.VarianceSamplingAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs index 9ce88b542ab..4758f4d1bcc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSigma.TryReadProperty(ref reader, options, PropSigma, null)) + if (propSigma.TryReadProperty(ref reader, options, PropSigma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropSigma, value.Sigma, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSigma, value.Sigma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs index fe35f4aa215..9b3ed24ccd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregation Re continue; } - if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, null)) + if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilters, value.Filters, null, null); - writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, null); + writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOtherBucketKey, value.OtherBucketKey, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs index 8f9f9b0960a..92835521685 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.FrequentItemSetsAggre continue; } - if (propMinimumSetSize.TryReadProperty(ref reader, options, PropMinimumSetSize, null)) + if (propMinimumSetSize.TryReadProperty(ref reader, options, PropMinimumSetSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinimumSupport.TryReadProperty(ref reader, options, PropMinimumSupport, null)) + if (propMinimumSupport.TryReadProperty(ref reader, options, PropMinimumSupport, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropMinimumSetSize, value.MinimumSetSize, null, null); - writer.WriteProperty(options, PropMinimumSupport, value.MinimumSupport, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropMinimumSetSize, value.MinimumSetSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinimumSupport, value.MinimumSupport, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs index 703d4b29abd..792ceb67c9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoBoundsAggregation continue; } - if (propWrapLongitude.TryReadProperty(ref reader, options, PropWrapLongitude, null)) + if (propWrapLongitude.TryReadProperty(ref reader, options, PropWrapLongitude, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropWrapLongitude, value.WrapLongitude, null, null); + writer.WriteProperty(options, PropWrapLongitude, value.WrapLongitude, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs index d42e4e4e785..abcdc4b48bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregatio LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropLocation, value.Location, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs index 165a495ee95..fe58dfd2cd5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregatio LocalJsonValue propUnit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, null)) + if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, static Elastic.Clients.Elasticsearch.GeoDistanceType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregatio continue; } - if (propUnit.TryReadProperty(ref reader, options, PropUnit, null)) + if (propUnit.TryReadProperty(ref reader, options, PropUnit, static Elastic.Clients.Elasticsearch.DistanceUnit? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, null); + writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoDistanceType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropRanges, value.Ranges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropUnit, value.Unit, null, null); + writer.WriteProperty(options, PropUnit, value.Unit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.DistanceUnit? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs index b59c3273dcb..c6bb8dd7e17 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re LocalJsonValue propSortOrder = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIncludeSort.TryReadProperty(ref reader, options, PropIncludeSort, null)) + if (propIncludeSort.TryReadProperty(ref reader, options, PropIncludeSort, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re continue; } - if (propSortOrder.TryReadProperty(ref reader, options, PropSortOrder, null)) + if (propSortOrder.TryReadProperty(ref reader, options, PropSortOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIncludeSort, value.IncludeSort, null, null); + writer.WriteProperty(options, PropIncludeSort, value.IncludeSort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPoint, value.Point, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropSortOrder, value.SortOrder, null, null); + writer.WriteProperty(options, PropSortOrder, value.SortOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs index 61d2b52be47..9f3599ad592 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregatio continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,8 +92,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs index dc2e8ba8b11..51303ba9264 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregation continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs index 881857a6e3f..0ef4f073622 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregatio continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs index ea67b4e4ec0..d88c435c532 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GoogleNormalizedDista LocalJsonValue propBackgroundIsSuperset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, null)) + if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GoogleNormalizedDista public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GoogleNormalizedDistanceHeuristic value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, null); + writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs index 7fff3e6df6d..b671c1629c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.HdrMethod Read(ref Sy LocalJsonValue propNumberOfSignificantValueDigits = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumberOfSignificantValueDigits.TryReadProperty(ref reader, options, PropNumberOfSignificantValueDigits, null)) + if (propNumberOfSignificantValueDigits.TryReadProperty(ref reader, options, PropNumberOfSignificantValueDigits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.HdrMethod Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.HdrMethod value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumberOfSignificantValueDigits, value.NumberOfSignificantValueDigits, null, null); + writer.WriteProperty(options, PropNumberOfSignificantValueDigits, value.NumberOfSignificantValueDigits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs index c59456e93fb..4ee48d07f34 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs @@ -71,22 +71,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation continue; } - if (propInterval.TryReadProperty(ref reader, options, PropInterval, null)) + if (propInterval.TryReadProperty(ref reader, options, PropInterval, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOffset.TryReadProperty(ref reader, options, PropOffset, null)) + if (propOffset.TryReadProperty(ref reader, options, PropOffset, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,10 +133,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropHardBounds, value.HardBounds, null, null); - writer.WriteProperty(options, PropInterval, value.Interval, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropOffset, value.Offset, null, null); + writer.WriteProperty(options, PropInterval, value.Interval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOffset, value.Offset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs index fd97ac81cfb..0b2ca0f523e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate Re } propData ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propData[key] = value; } @@ -96,7 +96,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Data) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs index fdaa3f727b4..fabc87ffba9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs index 4da7a1ee62e..785d79418f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceFeatureImpor continue; } - if (propImportance.TryReadProperty(ref reader, options, PropImportance, null)) + if (propImportance.TryReadProperty(ref reader, options, PropImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropClasses, value.Classes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropFeatureName, value.FeatureName, null, null); - writer.WriteProperty(options, PropImportance, value.Importance, null, null); + writer.WriteProperty(options, PropImportance, value.Importance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs index cbda2f9e72b..9abc4716ff1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation R LocalJsonValue propPrefixLength = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAppendPrefixLength.TryReadProperty(ref reader, options, PropAppendPrefixLength, null)) + if (propAppendPrefixLength.TryReadProperty(ref reader, options, PropAppendPrefixLength, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation R continue; } - if (propIsIpv6.TryReadProperty(ref reader, options, PropIsIpv6, null)) + if (propIsIpv6.TryReadProperty(ref reader, options, PropIsIpv6, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,10 +89,10 @@ public override Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAppendPrefixLength, value.AppendPrefixLength, null, null); + writer.WriteProperty(options, PropAppendPrefixLength, value.AppendPrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropIsIpv6, value.IsIpv6, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropIsIpv6, value.IsIpv6, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs index 313a9b91b87..ba77bf0d04e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate Re continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate Re continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs index 8836b49b422..46ee6ad1505 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.LongTermsBucket Read( continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); writer.WriteProperty(options, PropKeyAsString, value.KeyAsString, null, null); if (value.Aggregations is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs index 0624629e879..d28c57ffd0c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MatrixStatsAggregatio continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs index 9ca7a864512..e2c337f0ede 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate Read(ref continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs index 104fb9d0de5..8aaebee83de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MaxBucketAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs index 1ddd002069f..0dd02c95fc7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs index 6e68108980c..2dda05469f8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompression.TryReadProperty(ref reader, options, PropCompression, null)) + if (propCompression.TryReadProperty(ref reader, options, PropCompression, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompression, value.Compression, null, null); + writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs index 3d595003d2b..34d4b914faf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MinAggregate Read(ref continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs index 0fc1b852002..89e00fe3777 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MinBucketAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs index 365e54719a8..81a6036f0ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggrega continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggrega continue; } - if (propShift.TryReadProperty(ref reader, options, PropShift, null)) + if (propShift.TryReadProperty(ref reader, options, PropShift, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWindow.TryReadProperty(ref reader, options, PropWindow, null)) + if (propWindow.TryReadProperty(ref reader, options, PropWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShift, value.Shift, null, null); - writer.WriteProperty(options, PropWindow, value.Window, null, null); + writer.WriteProperty(options, PropShift, value.Shift, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWindow, value.Window, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs index 7913a01f015..d88928852bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MovingPercentilesAggr continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShift.TryReadProperty(ref reader, options, PropShift, null)) + if (propShift.TryReadProperty(ref reader, options, PropShift, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWindow.TryReadProperty(ref reader, options, PropWindow, null)) + if (propWindow.TryReadProperty(ref reader, options, PropWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropShift, value.Shift, null, null); - writer.WriteProperty(options, PropWindow, value.Window, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShift, value.Shift, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWindow, value.Window, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs index 0ff2c7d649d..3d801279ceb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate R continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate R continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs index 6b96880d778..11ee589eb32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation LocalJsonValue> propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, null)) + if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,22 +62,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, null)) + if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,13 +113,13 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTerms, value.Terms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs index 28a6415e5c8..2c0c41f16a4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsBucket Read continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropKeyAsString, value.KeyAsString, null, null); if (value.Aggregations is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs index 187ef56cf89..b996de763b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeur LocalJsonValue propIncludeNegatives = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, null)) + if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeNegatives.TryReadProperty(ref reader, options, PropIncludeNegatives, null)) + if (propIncludeNegatives.TryReadProperty(ref reader, options, PropIncludeNegatives, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeur public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, null); - writer.WriteProperty(options, PropIncludeNegatives, value.IncludeNegatives, null, null); + writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeNegatives, value.IncludeNegatives, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs index bf7dc2b11cd..92ff657b603 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.NormalizeAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMethod.TryReadProperty(ref reader, options, PropMethod, null)) + if (propMethod.TryReadProperty(ref reader, options, PropMethod, static Elastic.Clients.Elasticsearch.Aggregations.NormalizeMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropMethod, value.Method, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMethod, value.Method, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.NormalizeMethod? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs index 4c3764150c8..6824db8445a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggr continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPercents, value.Percents, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs index 8a56f7b2540..cbc28c8eccb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RandomSamplerAggregat continue; } - if (propSeed.TryReadProperty(ref reader, options, PropSeed, null)) + if (propSeed.TryReadProperty(ref reader, options, PropSeed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSeed.TryReadProperty(ref reader, options, PropShardSeed, null)) + if (propShardSeed.TryReadProperty(ref reader, options, PropShardSeed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropProbability, value.Probability, null, null); - writer.WriteProperty(options, PropSeed, value.Seed, null, null); - writer.WriteProperty(options, PropShardSeed, value.ShardSeed, null, null); + writer.WriteProperty(options, PropSeed, value.Seed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSeed, value.ShardSeed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs index eb03127a930..74ce51b86d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RangeAggregation Read continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRanges, value.Ranges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs index 5136e060324..4e398981a50 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RangeBucket Read(ref continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RangeBucket Read(ref continue; } - if (propTo.TryReadProperty(ref reader, options, PropTo, null)) + if (propTo.TryReadProperty(ref reader, options, PropTo, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,10 +96,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFromAsString, value.FromAsString, null, null); writer.WriteProperty(options, PropKey, value.Key, null, null); - writer.WriteProperty(options, PropTo, value.To, null, null); + writer.WriteProperty(options, PropTo, value.To, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropToAsString, value.ToAsString, null, null); if (value.Aggregations is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs index ee863e37828..e8dc4bc1655 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation continue; } - if (propMaxDocCount.TryReadProperty(ref reader, options, PropMaxDocCount, null)) + if (propMaxDocCount.TryReadProperty(ref reader, options, PropMaxDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,9 +108,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExclude, value.Exclude, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); - writer.WriteProperty(options, PropMaxDocCount, value.MaxDocCount, null, null); + writer.WriteProperty(options, PropMaxDocCount, value.MaxDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueType, value.ValueType, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs index 3cfa8419e4b..7a244d5b769 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RateAggregation Read( continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Aggregations.RateMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RateAggregation Read( continue; } - if (propUnit.TryReadProperty(ref reader, options, PropUnit, null)) + if (propUnit.TryReadProperty(ref reader, options, PropUnit, static Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,9 +100,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.RateMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropUnit, value.Unit, null, null); + writer.WriteProperty(options, PropUnit, value.Unit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs index b500b619b60..a80c50cca2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregation Re LocalJsonValue propShardSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregation Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs index 05dde915331..19b6d628615 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SerialDifferencingAgg continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLag.TryReadProperty(ref reader, options, PropLag, null)) + if (propLag.TryReadProperty(ref reader, options, PropLag, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropLag, value.Lag, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLag, value.Lag, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs index f768fc35906..ddc9f9e93fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsA LocalJsonValue?> propMeta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, null)) + if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsA continue; } - if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) + if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsA public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBgCount, value.BgCount, null, null); + writer.WriteProperty(options, PropBgCount, value.BgCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropDocCount, value.DocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs index 9b3cd774d6d..c684d6c87a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTerm LocalJsonValue?> propMeta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, null)) + if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTerm continue; } - if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) + if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTerm public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBgCount, value.BgCount, null, null); + writer.WriteProperty(options, PropBgCount, value.BgCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropDocCount, value.DocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs index edb944fbeaa..6f3bc516c9c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTermsAggre continue; } - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +101,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTermsAggre continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,17 +121,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTermsAggre continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -172,18 +172,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBackgroundFilter, value.BackgroundFilter, null, null); writer.WriteProperty(options, PropChiSquare, value.ChiSquare, null, null); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropGnd, value.Gnd, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); writer.WriteProperty(options, PropJlh, value.Jlh, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMutualInformation, value.MutualInformation, null, null); writer.WriteProperty(options, PropPercentage, value.Percentage, null, null); writer.WriteProperty(options, PropScriptHeuristic, value.ScriptHeuristic, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs index 153ea9b2791..270b5938c61 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propFilterDuplicateText.TryReadProperty(ref reader, options, PropFilterDuplicateText, null)) + if (propFilterDuplicateText.TryReadProperty(ref reader, options, PropFilterDuplicateText, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,17 +130,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -188,19 +188,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBackgroundFilter, value.BackgroundFilter, null, null); writer.WriteProperty(options, PropChiSquare, value.ChiSquare, null, null); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropFilterDuplicateText, value.FilterDuplicateText, null, null); + writer.WriteProperty(options, PropFilterDuplicateText, value.FilterDuplicateText, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGnd, value.Gnd, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); writer.WriteProperty(options, PropJlh, value.Jlh, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMutualInformation, value.MutualInformation, null, null); writer.WriteProperty(options, PropPercentage, value.Percentage, null, null); writer.WriteProperty(options, PropScriptHeuristic, value.ScriptHeuristic, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSourceFields, value.SourceFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs index c8e7c1f45bb..279378b296e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SimpleValueAggregate continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs index b4d8a6a8451..92b68ff1ac6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StandardDeviationBoun LocalJsonValue propUpperSampling = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLower.TryReadProperty(ref reader, options, PropLower, null)) + if (propLower.TryReadProperty(ref reader, options, PropLower, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowerPopulation.TryReadProperty(ref reader, options, PropLowerPopulation, null)) + if (propLowerPopulation.TryReadProperty(ref reader, options, PropLowerPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowerSampling.TryReadProperty(ref reader, options, PropLowerSampling, null)) + if (propLowerSampling.TryReadProperty(ref reader, options, PropLowerSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpper.TryReadProperty(ref reader, options, PropUpper, null)) + if (propUpper.TryReadProperty(ref reader, options, PropUpper, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpperPopulation.TryReadProperty(ref reader, options, PropUpperPopulation, null)) + if (propUpperPopulation.TryReadProperty(ref reader, options, PropUpperPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpperSampling.TryReadProperty(ref reader, options, PropUpperSampling, null)) + if (propUpperSampling.TryReadProperty(ref reader, options, PropUpperSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StandardDeviationBoun public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StandardDeviationBounds value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLower, value.Lower, null, null); - writer.WriteProperty(options, PropLowerPopulation, value.LowerPopulation, null, null); - writer.WriteProperty(options, PropLowerSampling, value.LowerSampling, null, null); - writer.WriteProperty(options, PropUpper, value.Upper, null, null); - writer.WriteProperty(options, PropUpperPopulation, value.UpperPopulation, null, null); - writer.WriteProperty(options, PropUpperSampling, value.UpperSampling, null, null); + writer.WriteProperty(options, PropLower, value.Lower, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowerPopulation, value.LowerPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowerSampling, value.LowerSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpper, value.Upper, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpperPopulation, value.UpperPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpperSampling, value.UpperSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs index 1d649b3fc0d..17a479ce70f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r LocalJsonValue propSumAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,13 +129,13 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs index 348e97fbe28..a531270d864 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate LocalJsonValue propSumAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,13 +129,13 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs index cfd5441f9fc..3f0d4e4d486 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregatio continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs index c1c01b94717..fe08ffad6a4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate LocalJsonValue propMinLengthAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvgLength.TryReadProperty(ref reader, options, PropAvgLength, null)) + if (propAvgLength.TryReadProperty(ref reader, options, PropAvgLength, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate continue; } - if (propEntropy.TryReadProperty(ref reader, options, PropEntropy, null)) + if (propEntropy.TryReadProperty(ref reader, options, PropEntropy, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxLength.TryReadProperty(ref reader, options, PropMaxLength, null)) + if (propMaxLength.TryReadProperty(ref reader, options, PropMaxLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate continue; } - if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, null)) + if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,15 +129,15 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvgLength, value.AvgLength, null, null); + writer.WriteProperty(options, PropAvgLength, value.AvgLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgLengthAsString, value.AvgLengthAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropDistribution, value.Distribution, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropEntropy, value.Entropy, null, null); - writer.WriteProperty(options, PropMaxLength, value.MaxLength, null, null); + writer.WriteProperty(options, PropEntropy, value.Entropy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxLength, value.MaxLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxLengthAsString, value.MaxLengthAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMinLength, value.MinLength, null, null); + writer.WriteProperty(options, PropMinLength, value.MinLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinLengthAsString, value.MinLengthAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs index 58f76c3c612..6083804d97c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregatio continue; } - if (propShowDistribution.TryReadProperty(ref reader, options, PropShowDistribution, null)) + if (propShowDistribution.TryReadProperty(ref reader, options, PropShowDistribution, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShowDistribution, value.ShowDistribution, null, null); + writer.WriteProperty(options, PropShowDistribution, value.ShowDistribution, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs index 9934bbdd068..7be3786d21a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs index 6a0f92a8364..ea1a0f5470d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringTermsBucket Rea continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); if (value.Aggregations is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs index 750014f9735..ce58b10096c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SumAggregate Read(ref continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs index 2f4aaede5ea..53f2d0da912 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SumBucketAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs index fbe7dbe1e69..6bae4e921f8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TDigest Read(ref Syst LocalJsonValue propCompression = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompression.TryReadProperty(ref reader, options, PropCompression, null)) + if (propCompression.TryReadProperty(ref reader, options, PropCompression, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TDigest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TDigest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompression, value.Compression, null, null); + writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs index 0b2b1099dab..d44677be5e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate Read(r continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs index ea0938c82e8..f32a7e688fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TTestAggregation Read continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.Aggregations.TTestType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropA, value.A, null, null); writer.WriteProperty(options, PropB, value.B, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TTestType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs index 8983bba4649..0afa09eb5ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read LocalJsonValue propValueType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, null)) + if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,7 +95,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,22 +125,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, null)) + if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -185,22 +185,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, null); + writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueType, value.ValueType, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs index f3928f4f05a..16c6bf6addb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation LocalJsonValue propSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, null)) + if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropKeyed, value.Keyed, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropKeyed, value.Keyed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs index 7f7e03ee0f5..99caeb897eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,12 +108,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,12 +133,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,21 +178,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs index 4a01cbeb7b4..42a9e7bbfba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregation continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +101,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMetrics, value.Metrics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs index c059d2a9f39..1056e981732 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTe LocalJsonValue?> propMeta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, null)) + if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTe continue; } - if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) + if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTermsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBgCount, value.BgCount, null, null); + writer.WriteProperty(options, PropBgCount, value.BgCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropDocCount, value.DocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs index f6079f61c85..f9497054aeb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregat continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregat continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs index 5cacebd5205..faf7320ba36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate R continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs index 0f96e0ebdd5..27f367ade40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra LocalJsonValue propShardSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, null)) + if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra continue; } - if (propInitialBuffer.TryReadProperty(ref reader, options, PropInitialBuffer, null)) + if (propInitialBuffer.TryReadProperty(ref reader, options, PropInitialBuffer, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogramAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBuckets, value.Buckets, null, null); + writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropInitialBuffer, value.InitialBuffer, null, null); + writer.WriteProperty(options, PropInitialBuffer, value.InitialBuffer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs index 90fb45ef393..04e3979a84d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggreg continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs index c2c0fbcbbf6..40cb5cc7971 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggreg continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropWeight, value.Weight, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs index deec4500073..68fa603270f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs index 4104660af75..418cd1bf828 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.AsciiFoldingTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.AsciiFoldingTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.AsciiFoldingTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs index aab19049dda..23bfd4ec5b2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer Read(r LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenizeOnChars, value.TokenizeOnChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs index b7d828d7e5f..344a5d87c52 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.CjkBigramTokenFilter Read continue; } - if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, null)) + if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIgnoredScripts, value.IgnoredScripts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, null); + writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs index 218c6e26ca8..353bce02eb3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs index 60ce0f99e5c..1acc3186394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs @@ -52,12 +52,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.CommonGramsTokenFilter Re continue; } - if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, null)) + if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propQueryMode.TryReadProperty(ref reader, options, PropQueryMode, null)) + if (propQueryMode.TryReadProperty(ref reader, options, PropQueryMode, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,8 +98,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCommonWords, value.CommonWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropCommonWordsPath, value.CommonWordsPath, null, null); - writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, null); - writer.WriteProperty(options, PropQueryMode, value.QueryMode, null, null); + writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropQueryMode, value.QueryMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs index 372ce00bf71..38292b123cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs @@ -52,12 +52,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.CustomAnalyzer Read(ref S continue; } - if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, null)) + if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositionOffsetGap.TryReadProperty(ref reader, options, PropPositionOffsetGap, null)) + if (propPositionOffsetGap.TryReadProperty(ref reader, options, PropPositionOffsetGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,8 +98,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCharFilter, value.CharFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, null); - writer.WriteProperty(options, PropPositionOffsetGap, value.PositionOffsetGap, null, null); + writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositionOffsetGap, value.PositionOffsetGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenizer, value.Tokenizer, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs index 95f3c8ac0cb..d6be2f9523c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.DelimitedPayloadTokenFilt continue; } - if (propEncoding.TryReadProperty(ref reader, options, PropEncoding, null)) + if (propEncoding.TryReadProperty(ref reader, options, PropEncoding, static Elastic.Clients.Elasticsearch.Analysis.DelimitedPayloadEncoding? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDelimiter, value.Delimiter, null, null); - writer.WriteProperty(options, PropEncoding, value.Encoding, null, null); + writer.WriteProperty(options, PropEncoding, value.Encoding, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.DelimitedPayloadEncoding? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs index 9f925f0a190..8060f3042ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs @@ -46,22 +46,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.DictionaryDecompounderTok LocalJsonValue propWordListPath = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, null)) + if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, null)) + if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, null)) + if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, null)) + if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,10 +112,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.DictionaryDecompounderTok public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.DictionaryDecompounderTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, null); - writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, null); - writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, null); - writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, null); + writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteProperty(options, PropWordList, value.WordList, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs index a5f8178063e..a4004af4c26 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs @@ -42,22 +42,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenFilter Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSide.TryReadProperty(ref reader, options, PropSide, null)) + if (propSide.TryReadProperty(ref reader, options, PropSide, static Elastic.Clients.Elasticsearch.Analysis.EdgeNGramSide? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,10 +96,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenFilter Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); - writer.WriteProperty(options, PropSide, value.Side, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSide, value.Side, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.EdgeNGramSide? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs index 376950e13b7..848f134f92c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizer Read(r continue; } - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,8 +97,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCustomTokenChars, value.CustomTokenChars, null, null); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenChars, value.TokenChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs index 6ec88f8f689..e9c2b257854 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.ElisionTokenFilter Read(r continue; } - if (propArticlesCase.TryReadProperty(ref reader, options, PropArticlesCase, null)) + if (propArticlesCase.TryReadProperty(ref reader, options, PropArticlesCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropArticles, value.Articles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropArticlesCase, value.ArticlesCase, null, null); + writer.WriteProperty(options, PropArticlesCase, value.ArticlesCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropArticlesPath, value.ArticlesPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs index 46b8c9ec3a9..9fb8028f144 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutputSize.TryReadProperty(ref reader, options, PropMaxOutputSize, null)) + if (propMaxOutputSize.TryReadProperty(ref reader, options, PropMaxOutputSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, null); + writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs index 4d34473760d..00ab377a34c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintTokenFilter Re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutputSize.TryReadProperty(ref reader, options, PropMaxOutputSize, null)) + if (propMaxOutputSize.TryReadProperty(ref reader, options, PropMaxOutputSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintTokenFilter Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.FingerprintTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, null); + writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs index 91dac422e7f..6bea2b928d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDedup.TryReadProperty(ref reader, options, PropDedup, null)) + if (propDedup.TryReadProperty(ref reader, options, PropDedup, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter Read( continue; } - if (propLongestOnly.TryReadProperty(ref reader, options, PropLongestOnly, null)) + if (propLongestOnly.TryReadProperty(ref reader, options, PropLongestOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,10 +98,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDedup, value.Dedup, null, null); + writer.WriteProperty(options, PropDedup, value.Dedup, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDictionary, value.Dictionary, null, null); writer.WriteProperty(options, PropLocale, value.Locale, null, null); - writer.WriteProperty(options, PropLongestOnly, value.LongestOnly, null, null); + writer.WriteProperty(options, PropLongestOnly, value.LongestOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs index 3e367e2d74f..8b58e336627 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs @@ -57,32 +57,32 @@ public override Elastic.Clients.Elasticsearch.Analysis.HyphenationDecompounderTo continue; } - if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, null)) + if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, null)) + if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, null)) + if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoOverlappingMatches.TryReadProperty(ref reader, options, PropNoOverlappingMatches, null)) + if (propNoOverlappingMatches.TryReadProperty(ref reader, options, PropNoOverlappingMatches, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoSubMatches.TryReadProperty(ref reader, options, PropNoSubMatches, null)) + if (propNoSubMatches.TryReadProperty(ref reader, options, PropNoSubMatches, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, null)) + if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,12 +137,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHyphenationPatternsPath, value.HyphenationPatternsPath, null, null); - writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, null); - writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, null); - writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, null); - writer.WriteProperty(options, PropNoOverlappingMatches, value.NoOverlappingMatches, null, null); - writer.WriteProperty(options, PropNoSubMatches, value.NoSubMatches, null, null); - writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, null); + writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoOverlappingMatches, value.NoOverlappingMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoSubMatches, value.NoSubMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteProperty(options, PropWordList, value.WordList, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs index 41b7f039ca1..060a4d00d57 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, null)) + if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, null)) + if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, null)) + if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,12 +78,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R continue; } - if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, null)) + if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, null)) + if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R continue; } - if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, null)) + if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R continue; } - if (propStrength.TryReadProperty(ref reader, options, PropStrength, null)) + if (propStrength.TryReadProperty(ref reader, options, PropStrength, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,16 +160,16 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlternate, value.Alternate, null, null); - writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, null); - writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, null); + writer.WriteProperty(options, PropAlternate, value.Alternate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCountry, value.Country, null, null); - writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, null); - writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, null); + writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLanguage, value.Language, null, null); - writer.WriteProperty(options, PropNumeric, value.Numeric, null, null); + writer.WriteProperty(options, PropNumeric, value.Numeric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRules, value.Rules, null, null); - writer.WriteProperty(options, PropStrength, value.Strength, null, null); + writer.WriteProperty(options, PropStrength, value.Strength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVariableTop, value.VariableTop, null, null); writer.WriteProperty(options, PropVariant, value.Variant, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs index bfbc16f9829..81e7ca447b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs @@ -40,12 +40,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilte LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propName.TryReadProperty(ref reader, options, PropName, null)) + if (propName.TryReadProperty(ref reader, options, PropName, static Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,8 +88,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilte public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMode, value.Mode, null, null); - writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUnicodeSetFilter, value.UnicodeSetFilter, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs index daef0565872..32db6ce2ee7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuTransformTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDir.TryReadProperty(ref reader, options, PropDir, null)) + if (propDir.TryReadProperty(ref reader, options, PropDir, static Elastic.Clients.Elasticsearch.Analysis.IcuTransformDirection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuTransformTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.IcuTransformTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDir, value.Dir, null, null); + writer.WriteProperty(options, PropDir, value.Dir, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuTransformDirection? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs index 4fb527194f6..48cab5a8cc1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeepTypesTokenFilter Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Analysis.KeepTypesMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeepTypesTokenFilter Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KeepTypesTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.KeepTypesMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropTypes, value.Types, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs index aacbee3b49f..f9b74b24d97 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeepWordsTokenFilter Read continue; } - if (propKeepWordsCase.TryReadProperty(ref reader, options, PropKeepWordsCase, null)) + if (propKeepWordsCase.TryReadProperty(ref reader, options, PropKeepWordsCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropKeepWords, value.KeepWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropKeepWordsCase, value.KeepWordsCase, null, null); + writer.WriteProperty(options, PropKeepWordsCase, value.KeepWordsCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeepWordsPath, value.KeepWordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs index 1835a46007f..7d55986d52f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordMarkerTokenFilter LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, null)) + if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordMarkerTokenFilter public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KeywordMarkerTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, null); + writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeywords, value.Keywords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropKeywordsPath, value.KeywordsPath, null, null); writer.WriteProperty(options, PropKeywordsPattern, value.KeywordsPattern, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs index f954091da8d..8851792af46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordTokenizer Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, null)) + if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordTokenizer Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KeywordTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, null); + writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs index fac6adad29b..98461adc384 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs @@ -48,12 +48,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDiscardCompoundToken.TryReadProperty(ref reader, options, PropDiscardCompoundToken, null)) + if (propDiscardCompoundToken.TryReadProperty(ref reader, options, PropDiscardCompoundToken, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, null)) + if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer Read(re continue; } - if (propNbestCost.TryReadProperty(ref reader, options, PropNbestCost, null)) + if (propNbestCost.TryReadProperty(ref reader, options, PropNbestCost, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,10 +120,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDiscardCompoundToken, value.DiscardCompoundToken, null, null); - writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, null); + writer.WriteProperty(options, PropDiscardCompoundToken, value.DiscardCompoundToken, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMode, value.Mode, null, null); - writer.WriteProperty(options, PropNbestCost, value.NbestCost, null, null); + writer.WriteProperty(options, PropNbestCost, value.NbestCost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNbestExamples, value.NbestExamples, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUserDictionary, value.UserDictionary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs index f275e71939f..85a00529de4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs @@ -38,12 +38,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.LengthTokenFilter Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,8 +80,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.LengthTokenFilter Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.LengthTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMax, value.Max, null, null); - writer.WriteProperty(options, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs index 16f554c3d17..0ffbb5a1b2e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs @@ -38,12 +38,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.LimitTokenCountTokenFilte LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConsumeAllTokens.TryReadProperty(ref reader, options, PropConsumeAllTokens, null)) + if (propConsumeAllTokens.TryReadProperty(ref reader, options, PropConsumeAllTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, null)) + if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,8 +80,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.LimitTokenCountTokenFilte public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.LimitTokenCountTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConsumeAllTokens, value.ConsumeAllTokens, null, null); - writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, null); + writer.WriteProperty(options, PropConsumeAllTokens, value.ConsumeAllTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs index 3a45e7bd8ca..90625895839 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilter Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, null)) + if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, static Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilterLanguages? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilter Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLanguage, value.Language, null, null); + writer.WriteProperty(options, PropLanguage, value.Language, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilterLanguages? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs index 84d3f114e6c..71c87bdca19 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs @@ -42,17 +42,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter Read(r LocalJsonValue propWithRotation = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBucketCount.TryReadProperty(ref reader, options, PropBucketCount, null)) + if (propBucketCount.TryReadProperty(ref reader, options, PropBucketCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHashCount.TryReadProperty(ref reader, options, PropHashCount, null)) + if (propHashCount.TryReadProperty(ref reader, options, PropHashCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHashSetSize.TryReadProperty(ref reader, options, PropHashSetSize, null)) + if (propHashSetSize.TryReadProperty(ref reader, options, PropHashSetSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter Read(r continue; } - if (propWithRotation.TryReadProperty(ref reader, options, PropWithRotation, null)) + if (propWithRotation.TryReadProperty(ref reader, options, PropWithRotation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,12 +96,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); - writer.WriteProperty(options, PropHashCount, value.HashCount, null, null); - writer.WriteProperty(options, PropHashSetSize, value.HashSetSize, null, null); + writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHashCount, value.HashCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHashSetSize, value.HashSetSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropWithRotation, value.WithRotation, null, null); + writer.WriteProperty(options, PropWithRotation, value.WithRotation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs index f6de941751a..8912a81dc0e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.MultiplexerTokenFilter Re continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilters, value.Filters, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs index 3d096520d2d..b6888c851aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs @@ -40,17 +40,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.NGramTokenFilter Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,9 +88,9 @@ public override Elastic.Clients.Elasticsearch.Analysis.NGramTokenFilter Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.NGramTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs index d70b4232e69..f13a810e4bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.NGramTokenizer Read(ref S continue; } - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,8 +97,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCustomTokenChars, value.CustomTokenChars, null, null); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenChars, value.TokenChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs index 81c4aae682e..cca5f645ee4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzer Read(ref Sys LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, null)) + if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, static Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzer Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, null); + writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStoptags, value.Stoptags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUserDictionary, value.UserDictionary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs index 57a94474a3b..940e7a560be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriTokenizer Read(ref Sy LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, null)) + if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, static Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, null)) + if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,8 +96,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriTokenizer Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.NoriTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, null); - writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, null); + writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUserDictionary, value.UserDictionary, null, null); writer.WriteProperty(options, PropUserDictionaryRules, value.UserDictionaryRules, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs index 2c714b37347..1cbc043ca87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer Re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, null)) + if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer Re continue; } - if (propReverse.TryReadProperty(ref reader, options, PropReverse, null)) + if (propReverse.TryReadProperty(ref reader, options, PropReverse, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkip.TryReadProperty(ref reader, options, PropSkip, null)) + if (propSkip.TryReadProperty(ref reader, options, PropSkip, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,11 +104,11 @@ public override Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, null); + writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDelimiter, value.Delimiter, null, null); writer.WriteProperty(options, PropReplacement, value.Replacement, null, null); - writer.WriteProperty(options, PropReverse, value.Reverse, null, null); - writer.WriteProperty(options, PropSkip, value.Skip, null, null); + writer.WriteProperty(options, PropReverse, value.Reverse, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkip, value.Skip, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs index 019ba4d03bd..353327ff5d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Read(ref continue; } - if (propLowercase.TryReadProperty(ref reader, options, PropLowercase, null)) + if (propLowercase.TryReadProperty(ref reader, options, PropLowercase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropLowercase, value.Lowercase, null, null); + writer.WriteProperty(options, PropLowercase, value.Lowercase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs index 37b76d43184..273c531a964 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternCaptureTokenFilter continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropPatterns, value.Patterns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs index 8ce0db56621..7b9ec73a60b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternReplaceTokenFilter LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAll.TryReadProperty(ref reader, options, PropAll, null)) + if (propAll.TryReadProperty(ref reader, options, PropAll, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternReplaceTokenFilter public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.PatternReplaceTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAll, value.All, null, null); + writer.WriteProperty(options, PropAll, value.All, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropReplacement, value.Replacement, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs index 4a0d0254b00..0801a33e1db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternTokenizer Read(ref continue; } - if (propGroup.TryReadProperty(ref reader, options, PropGroup, null)) + if (propGroup.TryReadProperty(ref reader, options, PropGroup, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropGroup, value.Group, null, null); + writer.WriteProperty(options, PropGroup, value.Group, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs index e46faac9f54..9b2f95430dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs @@ -56,22 +56,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.PhoneticTokenFilter Read( continue; } - if (propMaxCodeLen.TryReadProperty(ref reader, options, PropMaxCodeLen, null)) + if (propMaxCodeLen.TryReadProperty(ref reader, options, PropMaxCodeLen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNameType.TryReadProperty(ref reader, options, PropNameType, null)) + if (propNameType.TryReadProperty(ref reader, options, PropNameType, static Elastic.Clients.Elasticsearch.Analysis.PhoneticNameType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReplace.TryReadProperty(ref reader, options, PropReplace, null)) + if (propReplace.TryReadProperty(ref reader, options, PropReplace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRuleType.TryReadProperty(ref reader, options, PropRuleType, null)) + if (propRuleType.TryReadProperty(ref reader, options, PropRuleType, static Elastic.Clients.Elasticsearch.Analysis.PhoneticRuleType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,10 +114,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEncoder, value.Encoder, null, null); writer.WriteProperty(options, PropLanguageset, value.Languageset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMaxCodeLen, value.MaxCodeLen, null, null); - writer.WriteProperty(options, PropNameType, value.NameType, null, null); - writer.WriteProperty(options, PropReplace, value.Replace, null, null); - writer.WriteProperty(options, PropRuleType, value.RuleType, null, null); + writer.WriteProperty(options, PropMaxCodeLen, value.MaxCodeLen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNameType, value.NameType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.PhoneticNameType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReplace, value.Replace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRuleType, value.RuleType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.PhoneticRuleType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs index 5ce685f053d..d647e119aff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs @@ -51,22 +51,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.ShingleTokenFilter Read(r continue; } - if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, null)) + if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinShingleSize.TryReadProperty(ref reader, options, PropMinShingleSize, null)) + if (propMinShingleSize.TryReadProperty(ref reader, options, PropMinShingleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, null)) + if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutputUnigramsIfNoShingles.TryReadProperty(ref reader, options, PropOutputUnigramsIfNoShingles, null)) + if (propOutputUnigramsIfNoShingles.TryReadProperty(ref reader, options, PropOutputUnigramsIfNoShingles, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,10 +113,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFillerToken, value.FillerToken, null, null); - writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, null); - writer.WriteProperty(options, PropMinShingleSize, value.MinShingleSize, null, null); - writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, null); - writer.WriteProperty(options, PropOutputUnigramsIfNoShingles, value.OutputUnigramsIfNoShingles, null, null); + writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinShingleSize, value.MinShingleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutputUnigramsIfNoShingles, value.OutputUnigramsIfNoShingles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenSeparator, value.TokenSeparator, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs index be3361dda58..00389a91b6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SnowballTokenFilter Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, null)) + if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, static Elastic.Clients.Elasticsearch.Analysis.SnowballLanguage? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SnowballTokenFilter Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.SnowballTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLanguage, value.Language, null, null); + writer.WriteProperty(options, PropLanguage, value.Language, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.SnowballLanguage? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs index b7827128653..6709dba4867 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Read(ref LocalJsonValue propStopwordsPath = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs index 383d253a829..8a33f3ef0d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs index 1343e571dd3..bbfc607674e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.StopTokenFilter Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, null)) + if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRemoveTrailing.TryReadProperty(ref reader, options, PropRemoveTrailing, null)) + if (propRemoveTrailing.TryReadProperty(ref reader, options, PropRemoveTrailing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,8 +96,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.StopTokenFilter Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.StopTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, null); - writer.WriteProperty(options, PropRemoveTrailing, value.RemoveTrailing, null, null); + writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRemoveTrailing, value.RemoveTrailing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs index 3a3635455df..8d6a594e7a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs @@ -50,17 +50,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpand.TryReadProperty(ref reader, options, PropExpand, null)) + if (propExpand.TryReadProperty(ref reader, options, PropExpand, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFormat.TryReadProperty(ref reader, options, PropFormat, null)) + if (propFormat.TryReadProperty(ref reader, options, PropFormat, static Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter R continue; } - if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, null)) + if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,15 +128,15 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpand, value.Expand, null, null); - writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); + writer.WriteProperty(options, PropExpand, value.Expand, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSynonyms, value.Synonyms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSynonymsPath, value.SynonymsPath, null, null); writer.WriteProperty(options, PropSynonymsSet, value.SynonymsSet, null, null); writer.WriteProperty(options, PropTokenizer, value.Tokenizer, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); - writer.WriteProperty(options, PropUpdateable, value.Updateable, null, null); + writer.WriteProperty(options, PropUpdateable, value.Updateable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs index 39a058feec4..5efef1a0ded 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs @@ -50,17 +50,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter Read(r LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpand.TryReadProperty(ref reader, options, PropExpand, null)) + if (propExpand.TryReadProperty(ref reader, options, PropExpand, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFormat.TryReadProperty(ref reader, options, PropFormat, null)) + if (propFormat.TryReadProperty(ref reader, options, PropFormat, static Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter Read(r continue; } - if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, null)) + if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,15 +128,15 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpand, value.Expand, null, null); - writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); + writer.WriteProperty(options, PropExpand, value.Expand, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSynonyms, value.Synonyms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSynonymsPath, value.SynonymsPath, null, null); writer.WriteProperty(options, PropSynonymsSet, value.SynonymsSet, null, null); writer.WriteProperty(options, PropTokenizer, value.Tokenizer, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); - writer.WriteProperty(options, PropUpdateable, value.Updateable, null, null); + writer.WriteProperty(options, PropUpdateable, value.Updateable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs index d447d1a6fdb..55e7986321a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.TruncateTokenFilter Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLength.TryReadProperty(ref reader, options, PropLength, null)) + if (propLength.TryReadProperty(ref reader, options, PropLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.TruncateTokenFilter Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.TruncateTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLength, value.Length, null, null); + writer.WriteProperty(options, PropLength, value.Length, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs index 5d37807ef6c..43738a2ed69 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs index 9aef22b2309..dae6f360301 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UniqueTokenFilter Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOnlyOnSamePosition.TryReadProperty(ref reader, options, PropOnlyOnSamePosition, null)) + if (propOnlyOnSamePosition.TryReadProperty(ref reader, options, PropOnlyOnSamePosition, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UniqueTokenFilter Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.UniqueTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOnlyOnSamePosition, value.OnlyOnSamePosition, null, null); + writer.WriteProperty(options, PropOnlyOnSamePosition, value.OnlyOnSamePosition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs index 40a72cbc562..033b4bf176a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.WhitespaceTokenizer Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.WhitespaceTokenizer Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.WhitespaceTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs index 542fdb6341d..006eb44787d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs @@ -64,42 +64,42 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFi LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustOffsets.TryReadProperty(ref reader, options, PropAdjustOffsets, null)) + if (propAdjustOffsets.TryReadProperty(ref reader, options, PropAdjustOffsets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, null)) + if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, null)) + if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, null)) + if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, null)) + if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, null)) + if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreKeywords.TryReadProperty(ref reader, options, PropIgnoreKeywords, null)) + if (propIgnoreKeywords.TryReadProperty(ref reader, options, PropIgnoreKeywords, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,17 +114,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFi continue; } - if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, null)) + if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, null)) + if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, null)) + if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,19 +184,19 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFi public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustOffsets, value.AdjustOffsets, null, null); - writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, null); - writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, null); - writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, null); - writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, null); - writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, null); - writer.WriteProperty(options, PropIgnoreKeywords, value.IgnoreKeywords, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropAdjustOffsets, value.AdjustOffsets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreKeywords, value.IgnoreKeywords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProtectedWords, value.ProtectedWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProtectedWordsPath, value.ProtectedWordsPath, null, null); - writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, null); - writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, null); - writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, null); + writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropTypeTable, value.TypeTable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTypeTablePath, value.TypeTablePath, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs index 0cad9dcd3f1..c589af17379 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs @@ -60,32 +60,32 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, null)) + if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, null)) + if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, null)) + if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, null)) + if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, null)) + if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,17 +100,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter continue; } - if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, null)) + if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, null)) + if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, null)) + if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -168,17 +168,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, null); - writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, null); - writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, null); - writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, null); - writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProtectedWords, value.ProtectedWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProtectedWordsPath, value.ProtectedWordsPath, null, null); - writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, null); - writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, null); - writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, null); + writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropTypeTable, value.TypeTable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTypeTablePath, value.TypeTablePath, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs index 66df445da1d..48b6e1218b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearch continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearch continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs index 25d72abc080..7ddd0ec3bde 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndicesShards Read( continue; } - if (propPrimaries.TryReadProperty(ref reader, options, PropPrimaries, null)) + if (propPrimaries.TryReadProperty(ref reader, options, PropPrimaries, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReplication.TryReadProperty(ref reader, options, PropReplication, null)) + if (propReplication.TryReadProperty(ref reader, options, PropReplication, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaries, value.Primaries, null, null); - writer.WriteProperty(options, PropReplication, value.Replication, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropPrimaries, value.Primaries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReplication, value.Replication, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs index 92a12760b8d..8460abf3bae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref continue; } - if (propDataFrozen.TryReadProperty(ref reader, options, PropDataFrozen, null)) + if (propDataFrozen.TryReadProperty(ref reader, options, PropDataFrozen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,7 +165,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropData, value.Data, null, null); writer.WriteProperty(options, PropDataCold, value.DataCold, null, null); writer.WriteProperty(options, PropDataContent, value.DataContent, null, null); - writer.WriteProperty(options, PropDataFrozen, value.DataFrozen, null, null); + writer.WriteProperty(options, PropDataFrozen, value.DataFrozen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataHot, value.DataHot, null, null); writer.WriteProperty(options, PropDataWarm, value.DataWarm, null, null); writer.WriteProperty(options, PropIngest, value.Ingest, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs index de6b1400223..e8d29b9682e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs index 34f5e3a29be..7891986450d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary R continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMappings, value.Mappings, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSettings, value.Settings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs index ca78a596678..3435aca8c4e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs @@ -55,17 +55,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System continue; } - if (propIndexedVectorCount.TryReadProperty(ref reader, options, PropIndexedVectorCount, null)) + if (propIndexedVectorCount.TryReadProperty(ref reader, options, PropIndexedVectorCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedVectorDimMax.TryReadProperty(ref reader, options, PropIndexedVectorDimMax, null)) + if (propIndexedVectorDimMax.TryReadProperty(ref reader, options, PropIndexedVectorDimMax, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedVectorDimMin.TryReadProperty(ref reader, options, PropIndexedVectorDimMin, null)) + if (propIndexedVectorDimMin.TryReadProperty(ref reader, options, PropIndexedVectorDimMin, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System continue; } - if (propScriptCount.TryReadProperty(ref reader, options, PropScriptCount, null)) + if (propScriptCount.TryReadProperty(ref reader, options, PropScriptCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropIndexCount, value.IndexCount, null, null); - writer.WriteProperty(options, PropIndexedVectorCount, value.IndexedVectorCount, null, null); - writer.WriteProperty(options, PropIndexedVectorDimMax, value.IndexedVectorDimMax, null, null); - writer.WriteProperty(options, PropIndexedVectorDimMin, value.IndexedVectorDimMin, null, null); + writer.WriteProperty(options, PropIndexedVectorCount, value.IndexedVectorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorDimMax, value.IndexedVectorDimMax, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorDimMin, value.IndexedVectorDimMin, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropScriptCount, value.ScriptCount, null, null); + writer.WriteProperty(options, PropScriptCount, value.ScriptCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs index 7048b04cb1b..cc2b8405a25 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re continue; } - if (propTotalDeduplicatedFieldCount.TryReadProperty(ref reader, options, PropTotalDeduplicatedFieldCount, null)) + if (propTotalDeduplicatedFieldCount.TryReadProperty(ref reader, options, PropTotalDeduplicatedFieldCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re continue; } - if (propTotalDeduplicatedMappingSizeInBytes.TryReadProperty(ref reader, options, PropTotalDeduplicatedMappingSizeInBytes, null)) + if (propTotalDeduplicatedMappingSizeInBytes.TryReadProperty(ref reader, options, PropTotalDeduplicatedMappingSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalFieldCount.TryReadProperty(ref reader, options, PropTotalFieldCount, null)) + if (propTotalFieldCount.TryReadProperty(ref reader, options, PropTotalFieldCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFieldTypes, value.FieldTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropRuntimeFieldTypes, value.RuntimeFieldTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTotalDeduplicatedFieldCount, value.TotalDeduplicatedFieldCount, null, null); + writer.WriteProperty(options, PropTotalDeduplicatedFieldCount, value.TotalDeduplicatedFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalDeduplicatedMappingSize, value.TotalDeduplicatedMappingSize, null, null); - writer.WriteProperty(options, PropTotalDeduplicatedMappingSizeInBytes, value.TotalDeduplicatedMappingSizeInBytes, null, null); - writer.WriteProperty(options, PropTotalFieldCount, value.TotalFieldCount, null, null); + writer.WriteProperty(options, PropTotalDeduplicatedMappingSizeInBytes, value.TotalDeduplicatedMappingSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalFieldCount, value.TotalFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs index 70050ad66b4..4cb765e7b0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySumm continue; } - if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, null)) + if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySumm continue; } - if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, null)) + if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySumm continue; } - if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, null)) + if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,11 +116,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, null); writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, null); writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, null); - writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, null); + writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, null); - writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, null); + writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, null); - writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, null); + writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs index a4db1ad0c53..064097051c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo LocalJsonValue propUsedPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, null)) + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, null); + writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, null); writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs index f6008a9036d..2025f641819 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.UnassignedInformation Read continue; } - if (propDelayed.TryReadProperty(ref reader, options, PropDelayed, null)) + if (propDelayed.TryReadProperty(ref reader, options, PropDelayed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.UnassignedInformation Read continue; } - if (propFailedAllocationAttempts.TryReadProperty(ref reader, options, PropFailedAllocationAttempts, null)) + if (propFailedAllocationAttempts.TryReadProperty(ref reader, options, PropFailedAllocationAttempts, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,9 +107,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllocationStatus, value.AllocationStatus, null, null); writer.WriteProperty(options, PropAt, value.At, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropDelayed, value.Delayed, null, null); + writer.WriteProperty(options, PropDelayed, value.Delayed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDetails, value.Details, null, null); - writer.WriteProperty(options, PropFailedAllocationAttempts, value.FailedAllocationAttempts, null, null); + writer.WriteProperty(options, PropFailedAllocationAttempts, value.FailedAllocationAttempts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLastAllocationStatus, value.LastAllocationStatus, null, null); writer.WriteProperty(options, PropReason, value.Reason, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs index e4f47968f37..a792384130b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.ClusterDetails Read(ref System.Tex continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropStatus, value.Status, null, null); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs index 9d80fbd9b9e..3596c060443 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Core.FieldCaps.FieldCapability Rea continue; } - if (propMetadataField.TryReadProperty(ref reader, options, PropMetadataField, null)) + if (propMetadataField.TryReadProperty(ref reader, options, PropMetadataField, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,12 +100,12 @@ public override Elastic.Clients.Elasticsearch.Core.FieldCaps.FieldCapability Rea continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,14 +148,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregatable, value.Aggregatable, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropMetadataField, value.MetadataField, null, null); + writer.WriteProperty(options, PropMetadataField, value.MetadataField, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMetricConflictsIndices, value.MetricConflictsIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropNonAggregatableIndices, value.NonAggregatableIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropNonDimensionIndices, value.NonDimensionIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropNonSearchableIndices, value.NonSearchableIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSearchable, value.Searchable, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs index d43e5fb3b70..ce4b87b9c51 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Core.Get.GetResult Read continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.Core.Get.GetResult Read continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Core.Get.GetResult Read continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,11 +134,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIgnored, value.Ignored, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs index 89312c2418d..e75aaba1ebe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.RepositoryIntegr continue; } - if (propCorruptedRepositories.TryReadProperty(ref reader, options, PropCorruptedRepositories, null)) + if (propCorruptedRepositories.TryReadProperty(ref reader, options, PropCorruptedRepositories, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalRepositories.TryReadProperty(ref reader, options, PropTotalRepositories, null)) + if (propTotalRepositories.TryReadProperty(ref reader, options, PropTotalRepositories, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCorrupted, value.Corrupted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropCorruptedRepositories, value.CorruptedRepositories, null, null); - writer.WriteProperty(options, PropTotalRepositories, value.TotalRepositories, null, null); + writer.WriteProperty(options, PropCorruptedRepositories, value.CorruptedRepositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalRepositories, value.TotalRepositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs index c35e9f0ff7c..4a176bec4ee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.ShardsCapacityIn LocalJsonValue propMaxShardsInCluster = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCurrentUsedShards.TryReadProperty(ref reader, options, PropCurrentUsedShards, null)) + if (propCurrentUsedShards.TryReadProperty(ref reader, options, PropCurrentUsedShards, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.ShardsCapacityIn public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.HealthReport.ShardsCapacityIndicatorTierDetail value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCurrentUsedShards, value.CurrentUsedShards, null, null); + writer.WriteProperty(options, PropCurrentUsedShards, value.CurrentUsedShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxShardsInCluster, value.MaxShardsInCluster, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs index a5f1257e3ad..6d27bc7bb5c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Core.MGet.MultiGetOperation Read(r continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,8 +110,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs index ba593c3a093..7c226e521d3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem r.ReadNullableValue(o))) { continue; } @@ -173,15 +173,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 0ed76599cd6..cf20f581fe7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -115,7 +115,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,7 +130,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -150,7 +150,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,7 +165,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,12 +205,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -245,7 +245,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -255,7 +255,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -265,7 +265,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -325,17 +325,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExt, value.Ext, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropKnn, value.Knn, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPit, value.Pit, null, null); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRank, value.Rank, null, null); writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); @@ -343,19 +343,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSlice, value.Slice, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStats, value.Stats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs index 0e9a1ccda52..8ee573c000a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs @@ -53,17 +53,17 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea LocalJsonValue propSearchType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, null)) + if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null)) + if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCcsMinimizeRoundtrips.TryReadProperty(ref reader, options, PropCcsMinimizeRoundtrips, null)) + if (propCcsMinimizeRoundtrips.TryReadProperty(ref reader, options, PropCcsMinimizeRoundtrips, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } - if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, null)) + if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } - if (propRequestCache.TryReadProperty(ref reader, options, PropRequestCache, null)) + if (propRequestCache.TryReadProperty(ref reader, options, PropRequestCache, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } - if (propSearchType.TryReadProperty(ref reader, options, PropSearchType, null)) + if (propSearchType.TryReadProperty(ref reader, options, PropSearchType, static Elastic.Clients.Elasticsearch.SearchType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,17 +137,17 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, null); - writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, null); - writer.WriteProperty(options, PropCcsMinimizeRoundtrips, value.CcsMinimizeRoundtrips, null, null); + writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCcsMinimizeRoundtrips, value.CcsMinimizeRoundtrips, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExpandWildcards, value.ExpandWildcards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIgnoreThrottled, value.IgnoreThrottled, null, null); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); + writer.WriteProperty(options, PropIgnoreThrottled, value.IgnoreThrottled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropPreference, value.Preference, null, null); - writer.WriteProperty(options, PropRequestCache, value.RequestCache, null, null); + writer.WriteProperty(options, PropRequestCache, value.RequestCache, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSearchType, value.SearchType, null, null); + writer.WriteProperty(options, PropSearchType, value.SearchType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SearchType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs index ebcf76eefc1..8570694502d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfi LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfi continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,10 +89,10 @@ public override Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfi public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs index 0917bfb79dc..2ab4b1d3f79 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, null)) + if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,17 +87,17 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, null)) + if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, null)) + if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositions.TryReadProperty(ref reader, options, PropPositions, null)) + if (propPositions.TryReadProperty(ref reader, options, PropPositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,17 +107,17 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, null)) + if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,17 +155,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDoc, value.Doc, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, null); + writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropOffsets, value.Offsets, null, null); - writer.WriteProperty(options, PropPayloads, value.Payloads, null, null); - writer.WriteProperty(options, PropPositions, value.Positions, null, null); + writer.WriteProperty(options, PropOffsets, value.Offsets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPayloads, value.Payloads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositions, value.Positions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs index 4ccb316b6a3..d9c065d07d3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs @@ -50,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propFound.TryReadProperty(ref reader, options, PropFound, null)) + if (propFound.TryReadProperty(ref reader, options, PropFound, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, null)) + if (propTook.TryReadProperty(ref reader, options, PropTook, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropError, value.Error, null, null); - writer.WriteProperty(options, PropFound, value.Found, null, null); + writer.WriteProperty(options, PropFound, value.Found, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropTermVectors, value.TermVectors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropTook, value.Took, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs index fd979b3cd90..82061a62867 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalHitItem Read continue; } - if (propRating.TryReadProperty(ref reader, options, PropRating, null)) + if (propRating.TryReadProperty(ref reader, options, PropRating, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHit, value.Hit, null, null); - writer.WriteProperty(options, PropRating, value.Rating, null, null); + writer.WriteProperty(options, PropRating, value.Rating, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs index 5e66df57943..c642238b124 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscou LocalJsonValue propNormalize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNormalize.TryReadProperty(ref reader, options, PropNormalize, null)) + if (propNormalize.TryReadProperty(ref reader, options, PropNormalize, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscou public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGain value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropNormalize, value.Normalize, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNormalize, value.Normalize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs index 31bbb03877d..53beaaac64b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpect LocalJsonValue propMaximumRelevance = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpect public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpectedReciprocalRank value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaximumRelevance, value.MaximumRelevance, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs index c54c6362ee0..6604ffd97b2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanRe LocalJsonValue propRelevantRatingThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, null)) + if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanRe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanReciprocalRank value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs index 17b06a7e66e..7155241a46c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecis LocalJsonValue propRelevantRatingThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreUnlabeled.TryReadProperty(ref reader, options, PropIgnoreUnlabeled, null)) + if (propIgnoreUnlabeled.TryReadProperty(ref reader, options, PropIgnoreUnlabeled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, null)) + if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecis public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecision value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreUnlabeled, value.IgnoreUnlabeled, null, null); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, null); + writer.WriteProperty(options, PropIgnoreUnlabeled, value.IgnoreUnlabeled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs index 4fb0493c985..27c9556761f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall LocalJsonValue propRelevantRatingThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, null)) + if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs index 39be9a9d039..afeaaaf0b46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery Read(r continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs index 69c0c3cc392..9d22f8a6aa4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Core.Reindex.Destination Read(ref continue; } - if (propOpType.TryReadProperty(ref reader, options, PropOpType, null)) + if (propOpType.TryReadProperty(ref reader, options, PropOpType, static Elastic.Clients.Elasticsearch.OpType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Core.Reindex.Destination Read(ref continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropOpType, value.OpType, null, null); + writer.WriteProperty(options, PropOpType, value.OpType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.OpType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPipeline, value.Pipeline, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs index 383e742de8a..63ce9dfcf53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Core.Reindex.Source Read(ref Syste continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,7 +120,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRemote, value.Remote, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSlice, value.Slice, null, null); #pragma warning disable CS0618 writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs index 96e3c3618f7..68eb485f23b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs @@ -95,12 +95,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationBreakdown R continue; } - if (propPostCollection.TryReadProperty(ref reader, options, PropPostCollection, null)) + if (propPostCollection.TryReadProperty(ref reader, options, PropPostCollection, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPostCollectionCount.TryReadProperty(ref reader, options, PropPostCollectionCount, null)) + if (propPostCollectionCount.TryReadProperty(ref reader, options, PropPostCollectionCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,8 +153,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCollectCount, value.CollectCount, null, null); writer.WriteProperty(options, PropInitialize, value.Initialize, null, null); writer.WriteProperty(options, PropInitializeCount, value.InitializeCount, null, null); - writer.WriteProperty(options, PropPostCollection, value.PostCollection, null, null); - writer.WriteProperty(options, PropPostCollectionCount, value.PostCollectionCount, null, null); + writer.WriteProperty(options, PropPostCollection, value.PostCollection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPostCollectionCount, value.PostCollectionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReduce, value.Reduce, null, null); writer.WriteProperty(options, PropReduceCount, value.ReduceCount, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs index 6b09b252bd4..ceacda699e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs @@ -95,27 +95,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu LocalJsonValue propValuesFetched = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBruteForceUsed.TryReadProperty(ref reader, options, PropBruteForceUsed, null)) + if (propBruteForceUsed.TryReadProperty(ref reader, options, PropBruteForceUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBuiltBuckets.TryReadProperty(ref reader, options, PropBuiltBuckets, null)) + if (propBuiltBuckets.TryReadProperty(ref reader, options, PropBuiltBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCharsFetched.TryReadProperty(ref reader, options, PropCharsFetched, null)) + if (propCharsFetched.TryReadProperty(ref reader, options, PropCharsFetched, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCollectAnalyzedCount.TryReadProperty(ref reader, options, PropCollectAnalyzedCount, null)) + if (propCollectAnalyzedCount.TryReadProperty(ref reader, options, PropCollectAnalyzedCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCollectAnalyzedNs.TryReadProperty(ref reader, options, PropCollectAnalyzedNs, null)) + if (propCollectAnalyzedNs.TryReadProperty(ref reader, options, PropCollectAnalyzedNs, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,27 +140,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propDynamicPruningAttempted.TryReadProperty(ref reader, options, PropDynamicPruningAttempted, null)) + if (propDynamicPruningAttempted.TryReadProperty(ref reader, options, PropDynamicPruningAttempted, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamicPruningUsed.TryReadProperty(ref reader, options, PropDynamicPruningUsed, null)) + if (propDynamicPruningUsed.TryReadProperty(ref reader, options, PropDynamicPruningUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEmptyCollectorsUsed.TryReadProperty(ref reader, options, PropEmptyCollectorsUsed, null)) + if (propEmptyCollectorsUsed.TryReadProperty(ref reader, options, PropEmptyCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExtractCount.TryReadProperty(ref reader, options, PropExtractCount, null)) + if (propExtractCount.TryReadProperty(ref reader, options, PropExtractCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExtractNs.TryReadProperty(ref reader, options, PropExtractNs, null)) + if (propExtractNs.TryReadProperty(ref reader, options, PropExtractNs, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,7 +170,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propHasFilter.TryReadProperty(ref reader, options, PropHasFilter, null)) + if (propHasFilter.TryReadProperty(ref reader, options, PropHasFilter, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -180,17 +180,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propNumericCollectorsUsed.TryReadProperty(ref reader, options, PropNumericCollectorsUsed, null)) + if (propNumericCollectorsUsed.TryReadProperty(ref reader, options, PropNumericCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdinalsCollectorsOverheadTooHigh.TryReadProperty(ref reader, options, PropOrdinalsCollectorsOverheadTooHigh, null)) + if (propOrdinalsCollectorsOverheadTooHigh.TryReadProperty(ref reader, options, PropOrdinalsCollectorsOverheadTooHigh, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdinalsCollectorsUsed.TryReadProperty(ref reader, options, PropOrdinalsCollectorsUsed, null)) + if (propOrdinalsCollectorsUsed.TryReadProperty(ref reader, options, PropOrdinalsCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,57 +200,57 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propSegmentsCollected.TryReadProperty(ref reader, options, PropSegmentsCollected, null)) + if (propSegmentsCollected.TryReadProperty(ref reader, options, PropSegmentsCollected, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsCounted.TryReadProperty(ref reader, options, PropSegmentsCounted, null)) + if (propSegmentsCounted.TryReadProperty(ref reader, options, PropSegmentsCounted, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithDeletedDocs.TryReadProperty(ref reader, options, PropSegmentsWithDeletedDocs, null)) + if (propSegmentsWithDeletedDocs.TryReadProperty(ref reader, options, PropSegmentsWithDeletedDocs, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithDocCountField.TryReadProperty(ref reader, options, PropSegmentsWithDocCountField, null)) + if (propSegmentsWithDocCountField.TryReadProperty(ref reader, options, PropSegmentsWithDocCountField, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithMultiValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithMultiValuedOrds, null)) + if (propSegmentsWithMultiValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithMultiValuedOrds, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithSingleValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithSingleValuedOrds, null)) + if (propSegmentsWithSingleValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithSingleValuedOrds, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkippedDueToNoData.TryReadProperty(ref reader, options, PropSkippedDueToNoData, null)) + if (propSkippedDueToNoData.TryReadProperty(ref reader, options, PropSkippedDueToNoData, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStringHashingCollectorsUsed.TryReadProperty(ref reader, options, PropStringHashingCollectorsUsed, null)) + if (propStringHashingCollectorsUsed.TryReadProperty(ref reader, options, PropStringHashingCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSurvivingBuckets.TryReadProperty(ref reader, options, PropSurvivingBuckets, null)) + if (propSurvivingBuckets.TryReadProperty(ref reader, options, PropSurvivingBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalBuckets.TryReadProperty(ref reader, options, PropTotalBuckets, null)) + if (propTotalBuckets.TryReadProperty(ref reader, options, PropTotalBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propValuesFetched.TryReadProperty(ref reader, options, PropValuesFetched, null)) + if (propValuesFetched.TryReadProperty(ref reader, options, PropValuesFetched, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -305,38 +305,38 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebug value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBruteForceUsed, value.BruteForceUsed, null, null); - writer.WriteProperty(options, PropBuiltBuckets, value.BuiltBuckets, null, null); - writer.WriteProperty(options, PropCharsFetched, value.CharsFetched, null, null); - writer.WriteProperty(options, PropCollectAnalyzedCount, value.CollectAnalyzedCount, null, null); - writer.WriteProperty(options, PropCollectAnalyzedNs, value.CollectAnalyzedNs, null, null); + writer.WriteProperty(options, PropBruteForceUsed, value.BruteForceUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBuiltBuckets, value.BuiltBuckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCharsFetched, value.CharsFetched, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCollectAnalyzedCount, value.CollectAnalyzedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCollectAnalyzedNs, value.CollectAnalyzedNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCollectionStrategy, value.CollectionStrategy, null, null); writer.WriteProperty(options, PropDeferredAggregators, value.DeferredAggregators, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDelegate, value.Delegate, null, null); writer.WriteProperty(options, PropDelegateDebug, value.DelegateDebug, null, null); - writer.WriteProperty(options, PropDynamicPruningAttempted, value.DynamicPruningAttempted, null, null); - writer.WriteProperty(options, PropDynamicPruningUsed, value.DynamicPruningUsed, null, null); - writer.WriteProperty(options, PropEmptyCollectorsUsed, value.EmptyCollectorsUsed, null, null); - writer.WriteProperty(options, PropExtractCount, value.ExtractCount, null, null); - writer.WriteProperty(options, PropExtractNs, value.ExtractNs, null, null); + writer.WriteProperty(options, PropDynamicPruningAttempted, value.DynamicPruningAttempted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamicPruningUsed, value.DynamicPruningUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEmptyCollectorsUsed, value.EmptyCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExtractCount, value.ExtractCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExtractNs, value.ExtractNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilters, value.Filters, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropHasFilter, value.HasFilter, null, null); + writer.WriteProperty(options, PropHasFilter, value.HasFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMapReducer, value.MapReducer, null, null); - writer.WriteProperty(options, PropNumericCollectorsUsed, value.NumericCollectorsUsed, null, null); - writer.WriteProperty(options, PropOrdinalsCollectorsOverheadTooHigh, value.OrdinalsCollectorsOverheadTooHigh, null, null); - writer.WriteProperty(options, PropOrdinalsCollectorsUsed, value.OrdinalsCollectorsUsed, null, null); + writer.WriteProperty(options, PropNumericCollectorsUsed, value.NumericCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdinalsCollectorsOverheadTooHigh, value.OrdinalsCollectorsOverheadTooHigh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdinalsCollectorsUsed, value.OrdinalsCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultStrategy, value.ResultStrategy, null, null); - writer.WriteProperty(options, PropSegmentsCollected, value.SegmentsCollected, null, null); - writer.WriteProperty(options, PropSegmentsCounted, value.SegmentsCounted, null, null); - writer.WriteProperty(options, PropSegmentsWithDeletedDocs, value.SegmentsWithDeletedDocs, null, null); - writer.WriteProperty(options, PropSegmentsWithDocCountField, value.SegmentsWithDocCountField, null, null); - writer.WriteProperty(options, PropSegmentsWithMultiValuedOrds, value.SegmentsWithMultiValuedOrds, null, null); - writer.WriteProperty(options, PropSegmentsWithSingleValuedOrds, value.SegmentsWithSingleValuedOrds, null, null); - writer.WriteProperty(options, PropSkippedDueToNoData, value.SkippedDueToNoData, null, null); - writer.WriteProperty(options, PropStringHashingCollectorsUsed, value.StringHashingCollectorsUsed, null, null); - writer.WriteProperty(options, PropSurvivingBuckets, value.SurvivingBuckets, null, null); - writer.WriteProperty(options, PropTotalBuckets, value.TotalBuckets, null, null); - writer.WriteProperty(options, PropValuesFetched, value.ValuesFetched, null, null); + writer.WriteProperty(options, PropSegmentsCollected, value.SegmentsCollected, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsCounted, value.SegmentsCounted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithDeletedDocs, value.SegmentsWithDeletedDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithDocCountField, value.SegmentsWithDocCountField, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithMultiValuedOrds, value.SegmentsWithMultiValuedOrds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithSingleValuedOrds, value.SegmentsWithSingleValuedOrds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkippedDueToNoData, value.SkippedDueToNoData, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStringHashingCollectorsUsed, value.StringHashingCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSurvivingBuckets, value.SurvivingBuckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalBuckets, value.TotalBuckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropValuesFetched, value.ValuesFetched, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs index 52d127c45b9..eca4a328f46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDele continue; } - if (propResultsFromMetadata.TryReadProperty(ref reader, options, PropResultsFromMetadata, null)) + if (propResultsFromMetadata.TryReadProperty(ref reader, options, PropResultsFromMetadata, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsCountedInConstantTime.TryReadProperty(ref reader, options, PropSegmentsCountedInConstantTime, null)) + if (propSegmentsCountedInConstantTime.TryReadProperty(ref reader, options, PropSegmentsCountedInConstantTime, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropResultsFromMetadata, value.ResultsFromMetadata, null, null); - writer.WriteProperty(options, PropSegmentsCountedInConstantTime, value.SegmentsCountedInConstantTime, null, null); + writer.WriteProperty(options, PropResultsFromMetadata, value.ResultsFromMetadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsCountedInConstantTime, value.SegmentsCountedInConstantTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSpecializedFor, value.SpecializedFor, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs index 57cb8792277..87660df4b1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionContext Read LocalJsonValue propPrefix = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionContext Read continue; } - if (propPrefix.TryReadProperty(ref reader, options, PropPrefix, null)) + if (propPrefix.TryReadProperty(ref reader, options, PropPrefix, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,11 +96,11 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionContext Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.CompletionContext value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContext, value.Context, null, null); writer.WriteProperty(options, PropNeighbours, value.Neighbours, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropPrefix, value.Prefix, null, null); + writer.WriteProperty(options, PropPrefix, value.Prefix, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs index 919524e31b5..14b197ee0b1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOptio LocalJsonValue propText = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, null)) + if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOptio continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propScore0.TryReadProperty(ref reader, options, PropScore0, null)) + if (propScore0.TryReadProperty(ref reader, options, PropScore0, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOptio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOption value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, null); + writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContexts, value.Contexts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); - writer.WriteProperty(options, PropScore0, value.Score0, null, null); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropScore0, value.Score0, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteProperty(options, PropText, value.Text, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs index 93b8de200ca..21a96c90c5d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggester Re continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkipDuplicates.TryReadProperty(ref reader, options, PropSkipDuplicates, null)) + if (propSkipDuplicates.TryReadProperty(ref reader, options, PropSkipDuplicates, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,8 +110,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFuzzy, value.Fuzzy, null, null); writer.WriteProperty(options, PropRegex, value.Regex, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSkipDuplicates, value.SkipDuplicates, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkipDuplicates, value.SkipDuplicates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs index 1a20530b998..644ae198695 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.DfsKnnProfile Read(ref continue; } - if (propVectorOperationsCount.TryReadProperty(ref reader, options, PropVectorOperationsCount, null)) + if (propVectorOperationsCount.TryReadProperty(ref reader, options, PropVectorOperationsCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCollector, value.Collector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropRewriteTime, value.RewriteTime, null, null); - writer.WriteProperty(options, PropVectorOperationsCount, value.VectorOperationsCount, null, null); + writer.WriteProperty(options, PropVectorOperationsCount, value.VectorOperationsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs index 1ecf5b8fbd4..3802eb2e584 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs @@ -58,27 +58,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.DirectGenerator Read(r continue; } - if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, null)) + if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, null)) + if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, null)) + if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,17 +93,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.DirectGenerator Read(r continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, null)) + if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, static Elastic.Clients.Elasticsearch.SuggestMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,16 +138,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, null); - writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, null); - writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); + writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); writer.WriteProperty(options, PropPreFilter, value.PreFilter, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, null); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SuggestMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs index 428d1e51bea..1261078e7d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs @@ -47,42 +47,42 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown LocalJsonValue propProcessCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLoadSource.TryReadProperty(ref reader, options, PropLoadSource, null)) + if (propLoadSource.TryReadProperty(ref reader, options, PropLoadSource, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLoadSourceCount.TryReadProperty(ref reader, options, PropLoadSourceCount, null)) + if (propLoadSourceCount.TryReadProperty(ref reader, options, PropLoadSourceCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLoadStoredFields.TryReadProperty(ref reader, options, PropLoadStoredFields, null)) + if (propLoadStoredFields.TryReadProperty(ref reader, options, PropLoadStoredFields, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLoadStoredFieldsCount.TryReadProperty(ref reader, options, PropLoadStoredFieldsCount, null)) + if (propLoadStoredFieldsCount.TryReadProperty(ref reader, options, PropLoadStoredFieldsCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNextReader.TryReadProperty(ref reader, options, PropNextReader, null)) + if (propNextReader.TryReadProperty(ref reader, options, PropNextReader, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNextReaderCount.TryReadProperty(ref reader, options, PropNextReaderCount, null)) + if (propNextReaderCount.TryReadProperty(ref reader, options, PropNextReaderCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propProcess.TryReadProperty(ref reader, options, PropProcess, null)) + if (propProcess.TryReadProperty(ref reader, options, PropProcess, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propProcessCount.TryReadProperty(ref reader, options, PropProcessCount, null)) + if (propProcessCount.TryReadProperty(ref reader, options, PropProcessCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,14 +113,14 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLoadSource, value.LoadSource, null, null); - writer.WriteProperty(options, PropLoadSourceCount, value.LoadSourceCount, null, null); - writer.WriteProperty(options, PropLoadStoredFields, value.LoadStoredFields, null, null); - writer.WriteProperty(options, PropLoadStoredFieldsCount, value.LoadStoredFieldsCount, null, null); - writer.WriteProperty(options, PropNextReader, value.NextReader, null, null); - writer.WriteProperty(options, PropNextReaderCount, value.NextReaderCount, null, null); - writer.WriteProperty(options, PropProcess, value.Process, null, null); - writer.WriteProperty(options, PropProcessCount, value.ProcessCount, null, null); + writer.WriteProperty(options, PropLoadSource, value.LoadSource, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLoadSourceCount, value.LoadSourceCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLoadStoredFields, value.LoadStoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLoadStoredFieldsCount, value.LoadStoredFieldsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNextReader, value.NextReader, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNextReaderCount, value.NextReaderCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropProcess, value.Process, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropProcessCount, value.ProcessCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs index f0ca1413c2f..77976d0cb75 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug Read LocalJsonValue?> propStoredFields = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFastPath.TryReadProperty(ref reader, options, PropFastPath, null)) + if (propFastPath.TryReadProperty(ref reader, options, PropFastPath, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFastPath, value.FastPath, null, null); + writer.WriteProperty(options, PropFastPath, value.FastPath, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs index 11d522b579f..d77769fa142 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse Read(ref continue; } - if (propMaxConcurrentGroupSearches.TryReadProperty(ref reader, options, PropMaxConcurrentGroupSearches, null)) + if (propMaxConcurrentGroupSearches.TryReadProperty(ref reader, options, PropMaxConcurrentGroupSearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMaxConcurrentGroupSearches, value.MaxConcurrentGroupSearches, null, null); + writer.WriteProperty(options, PropMaxConcurrentGroupSearches, value.MaxConcurrentGroupSearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs index 65f958e0cf6..79a9c889bfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs @@ -82,12 +82,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, null)) + if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, null)) + if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, static Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propEncoder.TryReadProperty(ref reader, options, PropEncoder, null)) + if (propEncoder.TryReadProperty(ref reader, options, PropEncoder, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,22 +107,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, null)) + if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, null)) + if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, null)) + if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, null)) + if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,22 +132,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, null)) + if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, null)) + if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, null)) + if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, null)) + if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -157,12 +157,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, null)) + if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,17 +177,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, null)) + if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, null)) + if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -234,28 +234,28 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBoundaryChars, value.BoundaryChars, null, null); - writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, null); - writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, null); + writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBoundaryScannerLocale, value.BoundaryScannerLocale, null, null); - writer.WriteProperty(options, PropEncoder, value.Encoder, null, null); + writer.WriteProperty(options, PropEncoder, value.Encoder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropForceSource, value.ForceSource, null, null); - writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, null); - writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, null); - writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, null); + writer.WriteProperty(options, PropForceSource, value.ForceSource, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlightQuery, value.HighlightQuery, null, null); - writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, null); - writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, null); - writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, null); - writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, null); + writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOptions, value.Options, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPostTags, value.PostTags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPreTags, value.PreTags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRequireFieldMatch, value.RequireFieldMatch, null, null); - writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropRequireFieldMatch, value.RequireFieldMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs index 146e0da34d3..268edab395e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs @@ -82,12 +82,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, null)) + if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, null)) + if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, static Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,27 +97,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, null)) + if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, null)) + if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmentOffset.TryReadProperty(ref reader, options, PropFragmentOffset, null)) + if (propFragmentOffset.TryReadProperty(ref reader, options, PropFragmentOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, null)) + if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, null)) + if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,22 +132,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, null)) + if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, null)) + if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, null)) + if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, null)) + if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -157,12 +157,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, null)) + if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,17 +177,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, null)) + if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, null)) + if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -234,28 +234,28 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBoundaryChars, value.BoundaryChars, null, null); - writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, null); - writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, null); + writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBoundaryScannerLocale, value.BoundaryScannerLocale, null, null); - writer.WriteProperty(options, PropForceSource, value.ForceSource, null, null); - writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, null); - writer.WriteProperty(options, PropFragmentOffset, value.FragmentOffset, null, null); - writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, null); - writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, null); + writer.WriteProperty(options, PropForceSource, value.ForceSource, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmentOffset, value.FragmentOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlightQuery, value.HighlightQuery, null, null); writer.WriteProperty(options, PropMatchedFields, value.MatchedFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, null); - writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, null); - writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, null); - writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, null); + writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOptions, value.Options, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPostTags, value.PostTags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPreTags, value.PreTags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRequireFieldMatch, value.RequireFieldMatch, null, null); - writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropRequireFieldMatch, value.RequireFieldMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs index 4c6a804bcf6..0bb6adfc5ae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs @@ -126,12 +126,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRank.TryReadProperty(ref reader, options, PropRank, null)) + if (propRank.TryReadProperty(ref reader, options, PropRank, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,12 +141,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -166,7 +166,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -220,15 +220,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMatchedQueries, value.MatchedQueries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteUnionValue, System.Collections.Generic.IReadOnlyDictionary>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); writer.WriteProperty(options, PropNested, value.Nested, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); - writer.WriteProperty(options, PropRank, value.Rank, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRank, value.Rank, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShard, value.Shard, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs index 15639f6112e..6db06ee6454 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata Read(r continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHits, value.Hits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection> v) => w.WriteCollectionValue>(o, v, null)); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs index 23b13466d91..c56272996a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,12 +108,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,12 +133,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,20 +179,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs index 685075eafef..974120d40aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate R continue; } - if (propPrune.TryReadProperty(ref reader, options, PropPrune, null)) + if (propPrune.TryReadProperty(ref reader, options, PropPrune, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPrune, value.Prune, null, null); + writer.WriteProperty(options, PropPrune, value.Prune, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs index 52767abe1c6..dec291b86e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestOption Re LocalJsonValue propText = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, null)) + if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestOption Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestOption value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, null); + writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlighted, value.Highlighted, null, null); writer.WriteProperty(options, PropScore, value.Score, null, null); writer.WriteProperty(options, PropText, value.Text, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs index f67cd0fc8ff..622ac34e5b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propConfidence.TryReadProperty(ref reader, options, PropConfidence, null)) + if (propConfidence.TryReadProperty(ref reader, options, PropConfidence, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,12 +88,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propForceUnigrams.TryReadProperty(ref reader, options, PropForceUnigrams, null)) + if (propForceUnigrams.TryReadProperty(ref reader, options, PropForceUnigrams, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGramSize.TryReadProperty(ref reader, options, PropGramSize, null)) + if (propGramSize.TryReadProperty(ref reader, options, PropGramSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,12 +103,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propMaxErrors.TryReadProperty(ref reader, options, PropMaxErrors, null)) + if (propMaxErrors.TryReadProperty(ref reader, options, PropMaxErrors, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRealWordErrorLikelihood.TryReadProperty(ref reader, options, PropRealWordErrorLikelihood, null)) + if (propRealWordErrorLikelihood.TryReadProperty(ref reader, options, PropRealWordErrorLikelihood, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,7 +138,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propTokenLimit.TryReadProperty(ref reader, options, PropTokenLimit, null)) + if (propTokenLimit.TryReadProperty(ref reader, options, PropTokenLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,20 +179,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropCollate, value.Collate, null, null); - writer.WriteProperty(options, PropConfidence, value.Confidence, null, null); + writer.WriteProperty(options, PropConfidence, value.Confidence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDirectGenerator, value.DirectGenerator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropForceUnigrams, value.ForceUnigrams, null, null); - writer.WriteProperty(options, PropGramSize, value.GramSize, null, null); + writer.WriteProperty(options, PropForceUnigrams, value.ForceUnigrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGramSize, value.GramSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); - writer.WriteProperty(options, PropMaxErrors, value.MaxErrors, null, null); - writer.WriteProperty(options, PropRealWordErrorLikelihood, value.RealWordErrorLikelihood, null, null); + writer.WriteProperty(options, PropMaxErrors, value.MaxErrors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRealWordErrorLikelihood, value.RealWordErrorLikelihood, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSmoothing, value.Smoothing, null, null); writer.WriteProperty(options, PropText, value.Text, null, null); - writer.WriteProperty(options, PropTokenLimit, value.TokenLimit, null, null); + writer.WriteProperty(options, PropTokenLimit, value.TokenLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs index 5682afa54e0..c292e65c5c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.RegexOptions Read(ref continue; } - if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, null)) + if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlags, value.Flags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); - writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, null); + writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs index b67e0ed8476..3ab7af2a240 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Rescore Read(ref Syste object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propWindowSize.TryReadProperty(ref reader, options, PropWindowSize, null)) + if (propWindowSize.TryReadProperty(ref reader, options, PropWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Core.Search.Rescore)}'."); } - writer.WriteProperty(options, PropWindowSize, value.WindowSize, null, null); + writer.WriteProperty(options, PropWindowSize, value.WindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs index 1da332daa21..85f238a1a17 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery Read(ref continue; } - if (propQueryWeight.TryReadProperty(ref reader, options, PropQueryWeight, null)) + if (propQueryWeight.TryReadProperty(ref reader, options, PropQueryWeight, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRescoreQueryWeight.TryReadProperty(ref reader, options, PropRescoreQueryWeight, null)) + if (propRescoreQueryWeight.TryReadProperty(ref reader, options, PropRescoreQueryWeight, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropQueryWeight, value.QueryWeight, null, null); - writer.WriteProperty(options, PropRescoreQueryWeight, value.RescoreQueryWeight, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropQueryWeight, value.QueryWeight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRescoreQueryWeight, value.RescoreQueryWeight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs index bc6d63fe3c0..9f16ebc1a15 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs @@ -52,7 +52,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien internal static void ReadItem(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options, out string name, out System.Collections.Generic.IReadOnlyCollection value) { - var key = reader.ReadPropertyName(options, null); + var key = reader.ReadPropertyName(options, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); reader.Read(); var parts = key.Split('#'); if (parts.Length != 2) @@ -77,13 +77,13 @@ internal static void WriteItem(System.Text.Json.Utf8JsonWriter writer, System.Te switch (value) { case System.Collections.Generic.IReadOnlyCollection> v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection> v) => w.WritePropertyName>>(o, v)); break; case System.Collections.Generic.IReadOnlyCollection v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WritePropertyName>(o, v)); break; case System.Collections.Generic.IReadOnlyCollection v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WritePropertyName>(o, v)); break; default: throw new System.Text.Json.JsonException($"Variant '{0}' is not supported for type '{nameof(System.Collections.Generic.IReadOnlyCollection)}'."); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs index 3f968bc64f5..fab2e1d0a40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs @@ -46,22 +46,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.SuggestFuzziness Read( continue; } - if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, null)) + if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, null)) + if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnicodeAware.TryReadProperty(ref reader, options, PropUnicodeAware, null)) + if (propUnicodeAware.TryReadProperty(ref reader, options, PropUnicodeAware, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropMinLength, value.MinLength, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); - writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, null); - writer.WriteProperty(options, PropUnicodeAware, value.UnicodeAware, null, null); + writer.WriteProperty(options, PropMinLength, value.MinLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnicodeAware, value.UnicodeAware, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs index 1fd549dc6d2..e37fe4bed6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Suggester Read(ref Sys } propSuggesters ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.Core.Search.FieldSuggester value, null, null); + reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.Core.Search.FieldSuggester value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static Elastic.Clients.Elasticsearch.Core.Search.FieldSuggester (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propSuggesters[key] = value; } @@ -60,7 +60,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Suggesters) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs index 98576c01ebf..50d5bf7c1e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.TermSuggestOption Read LocalJsonValue propText = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, null)) + if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.TermSuggestOption Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.TermSuggestOption value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, null); + writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFreq, value.Freq, null, null); writer.WriteProperty(options, PropHighlighted, value.Highlighted, null, null); writer.WriteProperty(options, PropScore, value.Score, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs index 528ae5245bf..28a9ea1e572 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs @@ -71,62 +71,62 @@ public override Elastic.Clients.Elasticsearch.Core.Search.TermSuggester Read(ref continue; } - if (propLowercaseTerms.TryReadProperty(ref reader, options, PropLowercaseTerms, null)) + if (propLowercaseTerms.TryReadProperty(ref reader, options, PropLowercaseTerms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, null)) + if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, null)) + if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, null)) + if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSort.TryReadProperty(ref reader, options, PropSort, null)) + if (propSort.TryReadProperty(ref reader, options, PropSort, static Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStringDistance.TryReadProperty(ref reader, options, PropStringDistance, null)) + if (propStringDistance.TryReadProperty(ref reader, options, PropStringDistance, static Elastic.Clients.Elasticsearch.Core.Search.StringDistance? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, null)) + if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, static Elastic.Clients.Elasticsearch.SuggestMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -171,18 +171,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropLowercaseTerms, value.LowercaseTerms, null, null); - writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, null); - writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, null); - writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStringDistance, value.StringDistance, null, null); - writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, null); + writer.WriteProperty(options, PropLowercaseTerms, value.LowercaseTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStringDistance, value.StringDistance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.StringDistance? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SuggestMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropText, value.Text, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs index 695aaf1bda5..21209034a96 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs @@ -45,37 +45,37 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Filter Read(ref S LocalJsonValue propMinWordLength = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, null)) + if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNumTerms.TryReadProperty(ref reader, options, PropMaxNumTerms, null)) + if (propMaxNumTerms.TryReadProperty(ref reader, options, PropMaxNumTerms, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, null)) + if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, null)) + if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, null)) + if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Filter Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.TermVectors.Filter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, null); - writer.WriteProperty(options, PropMaxNumTerms, value.MaxNumTerms, null, null); - writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, null); - writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); - writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); + writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNumTerms, value.MaxNumTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs index 4be99560451..46de34dbc32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Term Read(ref Sys LocalJsonValue propTtf = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDocFreq.TryReadProperty(ref reader, options, PropDocFreq, null)) + if (propDocFreq.TryReadProperty(ref reader, options, PropDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Term Read(ref Sys continue; } - if (propTtf.TryReadProperty(ref reader, options, PropTtf, null)) + if (propTtf.TryReadProperty(ref reader, options, PropTtf, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Term Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.TermVectors.Term value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDocFreq, value.DocFreq, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); + writer.WriteProperty(options, PropDocFreq, value.DocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTermFreq, value.TermFreq, null, null); writer.WriteProperty(options, PropTokens, value.Tokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTtf, value.Ttf, null, null); + writer.WriteProperty(options, PropTtf, value.Ttf, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs index 35928f47050..a66f833eb4a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Token Read(ref Sy LocalJsonValue propStartOffset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEndOffset.TryReadProperty(ref reader, options, PropEndOffset, null)) + if (propEndOffset.TryReadProperty(ref reader, options, PropEndOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Token Read(ref Sy continue; } - if (propStartOffset.TryReadProperty(ref reader, options, PropStartOffset, null)) + if (propStartOffset.TryReadProperty(ref reader, options, PropStartOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Token Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.TermVectors.Token value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, null); + writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPayload, value.Payload, null, null); writer.WriteProperty(options, PropPosition, value.Position, null, null); - writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, null); + writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs index e4ffa1efab7..2f5900256cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn LocalJsonValue propReadPollTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIndexParameters value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs index 69757020c5d..d8e4c8b14ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.DocStats Read(ref System.Text.Json continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs index ed4e2d81572..22bed6a4fef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs @@ -1119,83 +1119,841 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } +internal sealed partial class TaskTypeAmazonBedrockConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock.Completion; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock.Completion; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrock value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeAnthropicConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic.Completion; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic.Completion; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic.Completion: + writer.WriteStringValue(MemberCompletion); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropic value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeAzureAIStudioConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio.Completion; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio.Completion; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudio value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeAzureOpenAIConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI.Completion; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI.Completion; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAI value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeCohereConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.Completion; + } + + if (reader.ValueTextEquals(MemberRerank)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.Rerank; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.Completion; + } + + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.Rerank; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.Rerank: + writer.WriteStringValue(MemberRerank); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeCohere value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeElasticsearchConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); + private static readonly System.Text.Json.JsonEncodedText MemberSparseEmbedding = System.Text.Json.JsonEncodedText.Encode("sparse_embedding"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberRerank)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.Rerank; + } + + if (reader.ValueTextEquals(MemberSparseEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.SparseEmbedding; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.Rerank; + } + + if (string.Equals(value, MemberSparseEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.SparseEmbedding; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.Rerank: + writer.WriteStringValue(MemberRerank); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.SparseEmbedding: + writer.WriteStringValue(MemberSparseEmbedding); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearch value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeELSERConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberSparseEmbedding = System.Text.Json.JsonEncodedText.Encode("sparse_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberSparseEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER.SparseEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberSparseEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER.SparseEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER.SparseEmbedding: + writer.WriteStringValue(MemberSparseEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeELSER value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeGoogleAIStudioConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio.Completion; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio.Completion; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudio value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeGoogleVertexAIConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberRerank)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI.Rerank; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI.Rerank; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI.Rerank: + writer.WriteStringValue(MemberRerank); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAI value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeHuggingFaceConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFace value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + internal sealed partial class TaskTypeJinaAiConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); - public override Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberRerank)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.Rerank; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.Rerank; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.Rerank: + writer.WriteStringValue(MemberRerank); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeMistralConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeMistral value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeOpenAIConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberChatCompletion = System.Text.Json.JsonEncodedText.Encode("chat_completion"); + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberChatCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.ChatCompletion; + } + + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.Completion; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberChatCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.ChatCompletion; + } + + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.Completion; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.ChatCompletion: + writer.WriteStringValue(MemberChatCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAI value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class TaskTypeVoyageAIConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { if (reader.ValueTextEquals(MemberRerank)) { - return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.Rerank; + return Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI.Rerank; } if (reader.ValueTextEquals(MemberTextEmbedding)) { - return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.TextEmbedding; + return Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI.TextEmbedding; } var value = reader.GetString()!; if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) { - return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.Rerank; + return Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI.Rerank; } if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) { - return Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.TextEmbedding; + return Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI.TextEmbedding; } - throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi)}'."); + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI)}'."); } - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi value, System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI value, System.Text.Json.JsonSerializerOptions options) { switch (value) { - case Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.Rerank: + case Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI.Rerank: writer.WriteStringValue(MemberRerank); break; - case Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi.TextEmbedding: + case Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI.TextEmbedding: writer.WriteStringValue(MemberTextEmbedding); break; default: - throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi)}'."); + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI)}'."); } } - public override Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { return Read(ref reader, typeToConvert, options); } - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAi value, System.Text.Json.JsonSerializerOptions options) + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAI value, System.Text.Json.JsonSerializerOptions options) { Write(writer, value, options); } } -internal sealed partial class CohereEmbeddingTypeConverter : System.Text.Json.Serialization.JsonConverter +internal sealed partial class TaskTypeWatsonxConverter : System.Text.Json.Serialization.JsonConverter { - private static readonly System.Text.Json.JsonEncodedText MemberBinary = System.Text.Json.JsonEncodedText.Encode("binary"); - private static readonly System.Text.Json.JsonEncodedText MemberBit = System.Text.Json.JsonEncodedText.Encode("bit"); - private static readonly System.Text.Json.JsonEncodedText MemberByte = System.Text.Json.JsonEncodedText.Encode("byte"); - private static readonly System.Text.Json.JsonEncodedText MemberFloat = System.Text.Json.JsonEncodedText.Encode("float"); - private static readonly System.Text.Json.JsonEncodedText MemberInt8 = System.Text.Json.JsonEncodedText.Encode("int8"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); - public override Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - if (reader.ValueTextEquals(MemberBinary)) + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) { - return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Binary; + return Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx.TextEmbedding; } - if (reader.ValueTextEquals(MemberBit)) + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) { - return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Bit; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx)}'."); } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonx value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + +internal sealed partial class CohereEmbeddingTypeConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberByte = System.Text.Json.JsonEncodedText.Encode("byte"); + private static readonly System.Text.Json.JsonEncodedText MemberFloat = System.Text.Json.JsonEncodedText.Encode("float"); + private static readonly System.Text.Json.JsonEncodedText MemberInt8 = System.Text.Json.JsonEncodedText.Encode("int8"); + public override Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { if (reader.ValueTextEquals(MemberByte)) { return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Byte; @@ -1212,16 +1970,6 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType Read } var value = reader.GetString()!; - if (string.Equals(value, MemberBinary.Value, System.StringComparison.OrdinalIgnoreCase)) - { - return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Binary; - } - - if (string.Equals(value, MemberBit.Value, System.StringComparison.OrdinalIgnoreCase)) - { - return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Bit; - } - if (string.Equals(value, MemberByte.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Byte; @@ -1244,12 +1992,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { switch (value) { - case Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Binary: - writer.WriteStringValue(MemberBinary); - break; - case Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Bit: - writer.WriteStringValue(MemberBit); - break; case Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Byte: writer.WriteStringValue(MemberByte); break; @@ -1830,6 +2572,94 @@ public enum TaskTypeAlibabaCloudAI TextEmbedding } +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAmazonBedrockConverter))] +public enum TaskTypeAmazonBedrock +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAnthropicConverter))] +public enum TaskTypeAnthropic +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureAIStudioConverter))] +public enum TaskTypeAzureAIStudio +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAzureOpenAIConverter))] +public enum TaskTypeAzureOpenAI +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeCohereConverter))] +public enum TaskTypeCohere +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "rerank")] + Rerank, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeElasticsearchConverter))] +public enum TaskTypeElasticsearch +{ + [System.Runtime.Serialization.EnumMember(Value = "rerank")] + Rerank, + [System.Runtime.Serialization.EnumMember(Value = "sparse_embedding")] + SparseEmbedding, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeELSERConverter))] +public enum TaskTypeELSER +{ + [System.Runtime.Serialization.EnumMember(Value = "sparse_embedding")] + SparseEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleAIStudioConverter))] +public enum TaskTypeGoogleAIStudio +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeGoogleVertexAIConverter))] +public enum TaskTypeGoogleVertexAI +{ + [System.Runtime.Serialization.EnumMember(Value = "rerank")] + Rerank, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeHuggingFaceConverter))] +public enum TaskTypeHuggingFace +{ + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAiConverter))] public enum TaskTypeJinaAi { @@ -1839,13 +2669,43 @@ public enum TaskTypeJinaAi TextEmbedding } +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeMistralConverter))] +public enum TaskTypeMistral +{ + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeOpenAIConverter))] +public enum TaskTypeOpenAI +{ + [System.Runtime.Serialization.EnumMember(Value = "chat_completion")] + ChatCompletion, + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeVoyageAIConverter))] +public enum TaskTypeVoyageAI +{ + [System.Runtime.Serialization.EnumMember(Value = "rerank")] + Rerank, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeWatsonxConverter))] +public enum TaskTypeWatsonx +{ + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingTypeConverter))] public enum CohereEmbeddingType { - [System.Runtime.Serialization.EnumMember(Value = "binary")] - Binary, - [System.Runtime.Serialization.EnumMember(Value = "bit")] - Bit, [System.Runtime.Serialization.EnumMember(Value = "byte")] Byte, [System.Runtime.Serialization.EnumMember(Value = "float")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs index dd68e21e027..aa8505e7cf0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs @@ -2806,6 +2806,63 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } +internal sealed partial class ScoreNormalizerConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberMinmax = System.Text.Json.JsonEncodedText.Encode("minmax"); + private static readonly System.Text.Json.JsonEncodedText MemberNone = System.Text.Json.JsonEncodedText.Encode("none"); + + public override Elastic.Clients.Elasticsearch.ScoreNormalizer Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberMinmax)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.Minmax; + } + + if (reader.ValueTextEquals(MemberNone)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.None; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberMinmax.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.Minmax; + } + + if (string.Equals(value, MemberNone.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.None; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.ScoreNormalizer)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScoreNormalizer value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.ScoreNormalizer.Minmax: + writer.WriteStringValue(MemberMinmax); + break; + case Elastic.Clients.Elasticsearch.ScoreNormalizer.None: + writer.WriteStringValue(MemberNone); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.ScoreNormalizer)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.ScoreNormalizer ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScoreNormalizer value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TimeUnitConverter))] public enum TimeUnit { @@ -3431,4 +3488,13 @@ public enum FieldSortNumericType Double, [System.Runtime.Serialization.EnumMember(Value = "long")] Long +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.ScoreNormalizerConverter))] +public enum ScoreNormalizer +{ + [System.Runtime.Serialization.EnumMember(Value = "minmax")] + Minmax, + [System.Runtime.Serialization.EnumMember(Value = "none")] + None } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs index 736a9cdacb8..2c53cfb86d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Eql.HitsEvent Read(ref Sys continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TEvent v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs index f678c71a75f..42055e91bbf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.ErrorCause Read(ref System.Text.Js } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -105,7 +105,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs index f77da9ad7b2..11457b1f03e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs @@ -38,11 +38,11 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { - var value = reader.ReadValue(options, null); + var value = reader.ReadValue(options, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)); reader.Read(); return new Elastic.Clients.Elasticsearch.FieldSort(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { @@ -71,7 +71,7 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,17 +81,17 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso continue; } - if (propNumericType.TryReadProperty(ref reader, options, PropNumericType, null)) + if (propNumericType.TryReadProperty(ref reader, options, PropNumericType, static Elastic.Clients.Elasticsearch.FieldSortNumericType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnmappedType.TryReadProperty(ref reader, options, PropUnmappedType, null)) + if (propUnmappedType.TryReadProperty(ref reader, options, PropUnmappedType, static Elastic.Clients.Elasticsearch.Mapping.FieldType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,15 +124,15 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.FieldSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); - writer.WriteProperty(options, PropNumericType, value.NumericType, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropUnmappedType, value.UnmappedType, null, null); + writer.WriteProperty(options, PropNumericType, value.NumericType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.FieldSortNumericType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnmappedType, value.UnmappedType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.FieldType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs index bb9626e0409..c55141c52f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex LocalJsonValue propMemorySizeInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEvictions.TryReadProperty(ref reader, options, PropEvictions, null)) + if (propEvictions.TryReadProperty(ref reader, options, PropEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.FielddataStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEvictions, value.Evictions, null, null); + writer.WriteProperty(options, PropEvictions, value.Evictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropMemorySize, value.MemorySize, null, null); writer.WriteProperty(options, PropMemorySizeInBytes, value.MemorySizeInBytes, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs index 83455531eee..33d94d79178 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs @@ -45,17 +45,17 @@ public override Elastic.Clients.Elasticsearch.GeoDistanceSort Read(ref System.Te LocalJsonValue propUnit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, null)) + if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, static Elastic.Clients.Elasticsearch.GeoDistanceType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,18 +65,18 @@ public override Elastic.Clients.Elasticsearch.GeoDistanceSort Read(ref System.Te continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnit.TryReadProperty(ref reader, options, PropUnit, null)) + if (propUnit.TryReadProperty(ref reader, options, PropUnit, static Elastic.Clients.Elasticsearch.DistanceUnit? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propLocation.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propLocation.Value, null, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!); + reader.ReadProperty(options, out propField.Value, out propLocation.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -96,13 +96,13 @@ public override Elastic.Clients.Elasticsearch.GeoDistanceSort Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.GeoDistanceSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoDistanceType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropUnit, value.Unit, null, null); - writer.WriteProperty(options, value.Field, value.Location, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnit, value.Unit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.DistanceUnit? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Location, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs index 5731543e7fd..a448ca08899 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Graph.ExploreControls Read(ref Sys continue; } - if (propSampleSize.TryReadProperty(ref reader, options, PropSampleSize, null)) + if (propSampleSize.TryReadProperty(ref reader, options, PropSampleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropSampleDiversity, value.SampleDiversity, null, null); - writer.WriteProperty(options, PropSampleSize, value.SampleSize, null, null); + writer.WriteProperty(options, PropSampleSize, value.SampleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteProperty(options, PropUseSignificance, value.UseSignificance, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs index b04f48a12dd..428fe74552a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Graph.VertexDefinition Read(ref Sy continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,9 +100,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExclude, value.Exclude, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs index 4180eeec4dc..cb07853bf5c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Graph.VertexInclude Read(ref Syste LocalJsonValue propTerm = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Graph.VertexInclude Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Graph.VertexInclude value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTerm, value.Term, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs index 26c50b543b9..b7960569a41 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.AllocateA continue; } - if (propNumberOfReplicas.TryReadProperty(ref reader, options, PropNumberOfReplicas, null)) + if (propNumberOfReplicas.TryReadProperty(ref reader, options, PropNumberOfReplicas, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.AllocateA continue; } - if (propTotalShardsPerNode.TryReadProperty(ref reader, options, PropTotalShardsPerNode, null)) + if (propTotalShardsPerNode.TryReadProperty(ref reader, options, PropTotalShardsPerNode, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropExclude, value.Exclude, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropInclude, value.Include, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNumberOfReplicas, value.NumberOfReplicas, null, null); + writer.WriteProperty(options, PropNumberOfReplicas, value.NumberOfReplicas, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRequire, value.Require, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropTotalShardsPerNode, value.TotalShardsPerNode, null, null); + writer.WriteProperty(options, PropTotalShardsPerNode, value.TotalShardsPerNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs index 713645d9ba1..e86feb0ec45 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.DeleteAct LocalJsonValue propDeleteSearchableSnapshot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeleteSearchableSnapshot.TryReadProperty(ref reader, options, PropDeleteSearchableSnapshot, null)) + if (propDeleteSearchableSnapshot.TryReadProperty(ref reader, options, PropDeleteSearchableSnapshot, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.DeleteAct public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.DeleteAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeleteSearchableSnapshot, value.DeleteSearchableSnapshot, null, null); + writer.WriteProperty(options, PropDeleteSearchableSnapshot, value.DeleteSearchableSnapshot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs index a0f44d46373..e38351f42ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateAc LocalJsonValue propEnabled = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateAc public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs index 4f9dda504be..c60d2268b13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.RolloverA continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, null)) + if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.RolloverA continue; } - if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, null)) + if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, null)) + if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,13 +130,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxAge, value.MaxAge, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); writer.WriteProperty(options, PropMaxSize, value.MaxSize, null, null); writer.WriteProperty(options, PropMinAge, value.MinAge, null, null); - writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, null); - writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinPrimaryShardSize, value.MinPrimaryShardSize, null, null); writer.WriteProperty(options, PropMinSize, value.MinSize, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs index 7f7e4fd9187..f09b6164f1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Searchabl LocalJsonValue propSnapshotRepository = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForceMergeIndex.TryReadProperty(ref reader, options, PropForceMergeIndex, null)) + if (propForceMergeIndex.TryReadProperty(ref reader, options, PropForceMergeIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Searchabl public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SearchableSnapshotAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForceMergeIndex, value.ForceMergeIndex, null, null); + writer.WriteProperty(options, PropForceMergeIndex, value.ForceMergeIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSnapshotRepository, value.SnapshotRepository, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs index 5e2a9248121..a964118d5a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SetPriori LocalJsonValue propPriority = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SetPriori public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SetPriorityAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs index 44e4972740b..3e791668cf3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAct LocalJsonValue propNumberOfShards = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowWriteAfterShrink.TryReadProperty(ref reader, options, PropAllowWriteAfterShrink, null)) + if (propAllowWriteAfterShrink.TryReadProperty(ref reader, options, PropAllowWriteAfterShrink, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAct continue; } - if (propNumberOfShards.TryReadProperty(ref reader, options, PropNumberOfShards, null)) + if (propNumberOfShards.TryReadProperty(ref reader, options, PropNumberOfShards, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAct public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowWriteAfterShrink, value.AllowWriteAfterShrink, null, null); + writer.WriteProperty(options, PropAllowWriteAfterShrink, value.AllowWriteAfterShrink, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); - writer.WriteProperty(options, PropNumberOfShards, value.NumberOfShards, null, null); + writer.WriteProperty(options, PropNumberOfShards, value.NumberOfShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs index 57b54c751e0..3aac333479e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs @@ -83,17 +83,17 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AddAction Read(ref continue; } - if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, null)) + if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, null)) + if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -143,9 +143,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); - writer.WriteProperty(options, PropMustExist, value.MustExist, null, null); + writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMustExist, value.MustExist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs index 504cdad4b59..d34e858cbf3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Alias Read(ref Sys continue; } - if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, null)) + if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); - writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); + writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs index 7494cc70f40..3903ef8fe2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AliasDefinition Re continue; } - if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, null)) + if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); - writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); + writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs index bb46ba0379c..e36d4fb34c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AnalyzeToken Read( continue; } - if (propPositionLength.TryReadProperty(ref reader, options, PropPositionLength, null)) + if (propPositionLength.TryReadProperty(ref reader, options, PropPositionLength, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, null); writer.WriteProperty(options, PropPosition, value.Position, null, null); - writer.WriteProperty(options, PropPositionLength, value.PositionLength, null, null); + writer.WriteProperty(options, PropPositionLength, value.PositionLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, null); writer.WriteProperty(options, PropToken, value.Token, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs index 780649d2f78..4fb53e93d1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom Read(re continue; } - if (propRemoveIndexBlocks.TryReadProperty(ref reader, options, PropRemoveIndexBlocks, null)) + if (propRemoveIndexBlocks.TryReadProperty(ref reader, options, PropRemoveIndexBlocks, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMappingsOverride, value.MappingsOverride, null, null); - writer.WriteProperty(options, PropRemoveIndexBlocks, value.RemoveIndexBlocks, null, null); + writer.WriteProperty(options, PropRemoveIndexBlocks, value.RemoveIndexBlocks, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSettingsOverride, value.SettingsOverride, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs index 12ca838d7ed..f243324f06d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re LocalJsonValue propTimestampField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, null)) + if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,7 +120,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re continue; } - if (propReplicated.TryReadProperty(ref reader, options, PropReplicated, null)) + if (propReplicated.TryReadProperty(ref reader, options, PropReplicated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re continue; } - if (propSystem.TryReadProperty(ref reader, options, PropSystem, null)) + if (propSystem.TryReadProperty(ref reader, options, PropSystem, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -185,7 +185,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.DataStream value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, null); + writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailureStore, value.FailureStore, null, null); writer.WriteProperty(options, PropGeneration, value.Generation, null, null); writer.WriteProperty(options, PropHidden, value.Hidden, null, null); @@ -196,10 +196,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropNextGenerationManagedBy, value.NextGenerationManagedBy, null, null); writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, null); - writer.WriteProperty(options, PropReplicated, value.Replicated, null, null); + writer.WriteProperty(options, PropReplicated, value.Replicated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRolloverOnWrite, value.RolloverOnWrite, null, null); writer.WriteProperty(options, PropStatus, value.Status, null, null); - writer.WriteProperty(options, PropSystem, value.System, null, null); + writer.WriteProperty(options, PropSystem, value.System, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); writer.WriteProperty(options, PropTimestampField, value.TimestampField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs index fadfcdfb91f..35152744d40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamIndex Re continue; } - if (propManagedBy.TryReadProperty(ref reader, options, PropManagedBy, null)) + if (propManagedBy.TryReadProperty(ref reader, options, PropManagedBy, static Elastic.Clients.Elasticsearch.IndexManagement.ManagedBy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreferIlm.TryReadProperty(ref reader, options, PropPreferIlm, null)) + if (propPreferIlm.TryReadProperty(ref reader, options, PropPreferIlm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,8 +92,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIlmPolicy, value.IlmPolicy, null, null); writer.WriteProperty(options, PropIndexName, value.IndexName, null, null); writer.WriteProperty(options, PropIndexUuid, value.IndexUuid, null, null); - writer.WriteProperty(options, PropManagedBy, value.ManagedBy, null, null); - writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, null); + writer.WriteProperty(options, PropManagedBy, value.ManagedBy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.ManagedBy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs index f4c1f42298e..cec385460dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs index 6a12be7ef9a..897cfab7d08 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propIndexCreationDateMillis.TryReadProperty(ref reader, options, PropIndexCreationDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propIndexCreationDateMillis.TryReadProperty(ref reader, options, PropIndexCreationDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propRolloverDateMillis.TryReadProperty(ref reader, options, PropRolloverDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propRolloverDateMillis.TryReadProperty(ref reader, options, PropRolloverDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -124,10 +124,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropGenerationTime, value.GenerationTime, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexCreationDateMillis, value.IndexCreationDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropIndexCreationDateMillis, value.IndexCreationDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropLifecycle, value.Lifecycle, null, null); writer.WriteProperty(options, PropManagedByLifecycle, value.ManagedByLifecycle, null, null); - writer.WriteProperty(options, PropRolloverDateMillis, value.RolloverDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropRolloverDateMillis, value.RolloverDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropTimeSinceIndexCreation, value.TimeSinceIndexCreation, null, null); writer.WriteProperty(options, PropTimeSinceRollover, value.TimeSinceRollover, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs index fb3277e1680..1f11b62010b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, null)) + if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, null)) + if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, null)) + if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,13 +130,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxAge, value.MaxAge, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); writer.WriteProperty(options, PropMaxSize, value.MaxSize, null, null); writer.WriteProperty(options, PropMinAge, value.MinAge, null, null); - writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, null); - writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinPrimaryShardSize, value.MinPrimaryShardSize, null, null); writer.WriteProperty(options, PropMinSize, value.MinSize, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs index 88201c7df55..2500777e4a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRollover, value.Rollover, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs index c2c318f416c..146c954e483 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibili LocalJsonValue propHidden = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, null)) + if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHidden.TryReadProperty(ref reader, options, PropHidden, null)) + if (propHidden.TryReadProperty(ref reader, options, PropHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibili public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, null); - writer.WriteProperty(options, PropHidden, value.Hidden, null, null); + writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHidden, value.Hidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs index 4015d3d2564..17ebffb1e8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ExplainAnalyzeToke continue; } - if (propKeyword.TryReadProperty(ref reader, options, PropKeyword, null)) + if (propKeyword.TryReadProperty(ref reader, options, PropKeyword, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ExplainAnalyzeToke } propAttributes ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propAttributes[key] = value; } @@ -121,7 +121,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBytes, value.Bytes, null, null); writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, null); - writer.WriteProperty(options, PropKeyword, value.Keyword, null, null); + writer.WriteProperty(options, PropKeyword, value.Keyword, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPosition, value.Position, null, null); writer.WriteProperty(options, PropPositionLength, value.PositionLength, null, null); writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, null); @@ -132,7 +132,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Attributes) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs index a8ef9079219..14c18671842 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexRoutingAlloca continue; } - if (propEnable.TryReadProperty(ref reader, options, PropEnable, null)) + if (propEnable.TryReadProperty(ref reader, options, PropEnable, static Elastic.Clients.Elasticsearch.IndexManagement.IndexRoutingAllocationOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDisk, value.Disk, null, null); - writer.WriteProperty(options, PropEnable, value.Enable, null, null); + writer.WriteProperty(options, PropEnable, value.Enable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.IndexRoutingAllocationOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInclude, value.Include, null, null); writer.WriteProperty(options, PropInitialRecovery, value.InitialRecovery, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs index 7dccce2032e..389acc08d4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs @@ -41,27 +41,27 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingBlocks LocalJsonValue propWrite = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMetadata.TryReadProperty(ref reader, options, PropMetadata, null)) + if (propMetadata.TryReadProperty(ref reader, options, PropMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRead.TryReadProperty(ref reader, options, PropRead, null)) + if (propRead.TryReadProperty(ref reader, options, PropRead, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, null)) + if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadOnlyAllowDelete.TryReadProperty(ref reader, options, PropReadOnlyAllowDelete, null)) + if (propReadOnlyAllowDelete.TryReadProperty(ref reader, options, PropReadOnlyAllowDelete, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWrite.TryReadProperty(ref reader, options, PropWrite, null)) + if (propWrite.TryReadProperty(ref reader, options, PropWrite, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingBlocks public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingBlocks value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMetadata, value.Metadata, null, null); - writer.WriteProperty(options, PropRead, value.Read, null, null); - writer.WriteProperty(options, PropReadOnly, value.ReadOnly, null, null); - writer.WriteProperty(options, PropReadOnlyAllowDelete, value.ReadOnlyAllowDelete, null, null); - writer.WriteProperty(options, PropWrite, value.Write, null, null); + writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRead, value.Read, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadOnly, value.ReadOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadOnlyAllowDelete, value.ReadOnlyAllowDelete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWrite, value.Write, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs index 944037bd921..3b25d0b6ecb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -164,7 +164,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propCheckOnStartup.TryReadProperty(ref reader, options, PropCheckOnStartup, null)) + if (propCheckOnStartup.TryReadProperty(ref reader, options, PropCheckOnStartup, static Elastic.Clients.Elasticsearch.IndexManagement.IndexCheckOnStartup? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -174,12 +174,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propCreationDate.TryReadProperty(ref reader, options, PropCreationDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreationDate.TryReadProperty(ref reader, options, PropCreationDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propCreationDateString.TryReadProperty(ref reader, options, PropCreationDateString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreationDateString.TryReadProperty(ref reader, options, PropCreationDateString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -234,7 +234,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propLoadFixedBitsetFiltersEagerly.TryReadProperty(ref reader, options, PropLoadFixedBitsetFiltersEagerly, null)) + if (propLoadFixedBitsetFiltersEagerly.TryReadProperty(ref reader, options, PropLoadFixedBitsetFiltersEagerly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -244,57 +244,57 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propMaxDocvalueFieldsSearch.TryReadProperty(ref reader, options, PropMaxDocvalueFieldsSearch, null)) + if (propMaxDocvalueFieldsSearch.TryReadProperty(ref reader, options, PropMaxDocvalueFieldsSearch, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInnerResultWindow.TryReadProperty(ref reader, options, PropMaxInnerResultWindow, null)) + if (propMaxInnerResultWindow.TryReadProperty(ref reader, options, PropMaxInnerResultWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNgramDiff.TryReadProperty(ref reader, options, PropMaxNgramDiff, null)) + if (propMaxNgramDiff.TryReadProperty(ref reader, options, PropMaxNgramDiff, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxRefreshListeners.TryReadProperty(ref reader, options, PropMaxRefreshListeners, null)) + if (propMaxRefreshListeners.TryReadProperty(ref reader, options, PropMaxRefreshListeners, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxRegexLength.TryReadProperty(ref reader, options, PropMaxRegexLength, null)) + if (propMaxRegexLength.TryReadProperty(ref reader, options, PropMaxRegexLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxRescoreWindow.TryReadProperty(ref reader, options, PropMaxRescoreWindow, null)) + if (propMaxRescoreWindow.TryReadProperty(ref reader, options, PropMaxRescoreWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxResultWindow.TryReadProperty(ref reader, options, PropMaxResultWindow, null)) + if (propMaxResultWindow.TryReadProperty(ref reader, options, PropMaxResultWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxScriptFields.TryReadProperty(ref reader, options, PropMaxScriptFields, null)) + if (propMaxScriptFields.TryReadProperty(ref reader, options, PropMaxScriptFields, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxShingleDiff.TryReadProperty(ref reader, options, PropMaxShingleDiff, null)) + if (propMaxShingleDiff.TryReadProperty(ref reader, options, PropMaxShingleDiff, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSlicesPerScroll.TryReadProperty(ref reader, options, PropMaxSlicesPerScroll, null)) + if (propMaxSlicesPerScroll.TryReadProperty(ref reader, options, PropMaxSlicesPerScroll, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermsCount.TryReadProperty(ref reader, options, PropMaxTermsCount, null)) + if (propMaxTermsCount.TryReadProperty(ref reader, options, PropMaxTermsCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -314,7 +314,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propNumberOfRoutingShards.TryReadProperty(ref reader, options, PropNumberOfRoutingShards, null)) + if (propNumberOfRoutingShards.TryReadProperty(ref reader, options, PropNumberOfRoutingShards, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -354,7 +354,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propRoutingPartitionSize.TryReadProperty(ref reader, options, PropRoutingPartitionSize, null)) + if (propRoutingPartitionSize.TryReadProperty(ref reader, options, PropRoutingPartitionSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -399,7 +399,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propTopMetricsMaxSize.TryReadProperty(ref reader, options, PropTopMetricsMaxSize, null)) + if (propTopMetricsMaxSize.TryReadProperty(ref reader, options, PropTopMetricsMaxSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -425,7 +425,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read } propOtherSettings ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propOtherSettings[key] = value; } @@ -499,10 +499,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalyze, value.Analyze, null, null); writer.WriteProperty(options, PropAutoExpandReplicas, value.AutoExpandReplicas, null, null); writer.WriteProperty(options, PropBlocks, value.Blocks, null, null); - writer.WriteProperty(options, PropCheckOnStartup, value.CheckOnStartup, null, null); + writer.WriteProperty(options, PropCheckOnStartup, value.CheckOnStartup, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.IndexCheckOnStartup? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCodec, value.Codec, null, null); - writer.WriteProperty(options, PropCreationDate, value.CreationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropCreationDateString, value.CreationDateString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCreationDate, value.CreationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreationDateString, value.CreationDateString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDefaultPipeline, value.DefaultPipeline, null, null); writer.WriteProperty(options, PropFinalPipeline, value.FinalPipeline, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); @@ -513,23 +513,23 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndexingPressure, value.IndexingPressure, null, null); writer.WriteProperty(options, PropIndexingSlowlog, value.IndexingSlowlog, null, null); writer.WriteProperty(options, PropLifecycle, value.Lifecycle, null, null); - writer.WriteProperty(options, PropLoadFixedBitsetFiltersEagerly, value.LoadFixedBitsetFiltersEagerly, null, null); + writer.WriteProperty(options, PropLoadFixedBitsetFiltersEagerly, value.LoadFixedBitsetFiltersEagerly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMapping, value.Mapping, null, null); - writer.WriteProperty(options, PropMaxDocvalueFieldsSearch, value.MaxDocvalueFieldsSearch, null, null); - writer.WriteProperty(options, PropMaxInnerResultWindow, value.MaxInnerResultWindow, null, null); - writer.WriteProperty(options, PropMaxNgramDiff, value.MaxNgramDiff, null, null); - writer.WriteProperty(options, PropMaxRefreshListeners, value.MaxRefreshListeners, null, null); - writer.WriteProperty(options, PropMaxRegexLength, value.MaxRegexLength, null, null); - writer.WriteProperty(options, PropMaxRescoreWindow, value.MaxRescoreWindow, null, null); - writer.WriteProperty(options, PropMaxResultWindow, value.MaxResultWindow, null, null); - writer.WriteProperty(options, PropMaxScriptFields, value.MaxScriptFields, null, null); - writer.WriteProperty(options, PropMaxShingleDiff, value.MaxShingleDiff, null, null); - writer.WriteProperty(options, PropMaxSlicesPerScroll, value.MaxSlicesPerScroll, null, null); - writer.WriteProperty(options, PropMaxTermsCount, value.MaxTermsCount, null, null); + writer.WriteProperty(options, PropMaxDocvalueFieldsSearch, value.MaxDocvalueFieldsSearch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInnerResultWindow, value.MaxInnerResultWindow, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNgramDiff, value.MaxNgramDiff, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxRefreshListeners, value.MaxRefreshListeners, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxRegexLength, value.MaxRegexLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxRescoreWindow, value.MaxRescoreWindow, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxResultWindow, value.MaxResultWindow, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxScriptFields, value.MaxScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxShingleDiff, value.MaxShingleDiff, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSlicesPerScroll, value.MaxSlicesPerScroll, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermsCount, value.MaxTermsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMerge, value.Merge, null, null); writer.WriteProperty(options, PropMode, value.Mode, null, null); writer.WriteProperty(options, PropNumberOfReplicas, value.NumberOfReplicas, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); - writer.WriteProperty(options, PropNumberOfRoutingShards, value.NumberOfRoutingShards, null, null); + writer.WriteProperty(options, PropNumberOfRoutingShards, value.NumberOfRoutingShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNumberOfShards, value.NumberOfShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropProvidedName, value.ProvidedName, null, null); @@ -537,7 +537,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQueryString, value.QueryString, null, null); writer.WriteProperty(options, PropRefreshInterval, value.RefreshInterval, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropRoutingPartitionSize, value.RoutingPartitionSize, null, null); + writer.WriteProperty(options, PropRoutingPartitionSize, value.RoutingPartitionSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoutingPath, value.RoutingPath, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSearch, value.Search, null, null); writer.WriteProperty(options, PropSettings, value.Settings, null, null); @@ -546,7 +546,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropSort, value.Sort, null, null); writer.WriteProperty(options, PropStore, value.Store, null, null); writer.WriteProperty(options, PropTimeSeries, value.TimeSeries, null, null); - writer.WriteProperty(options, PropTopMetricsMaxSize, value.TopMetricsMaxSize, null, null); + writer.WriteProperty(options, PropTopMetricsMaxSize, value.TopMetricsMaxSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTranslog, value.Translog, null, null); writer.WriteProperty(options, PropUuid, value.Uuid, null, null); writer.WriteProperty(options, PropVerifiedBeforeClose, value.VerifiedBeforeClose, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); @@ -555,7 +555,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.OtherSettings) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } @@ -590,6 +590,7 @@ internal IndexSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze? Analyze { get; set; } @@ -723,6 +724,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze? value) @@ -734,6 +736,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Analyze() @@ -745,6 +748,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Analyze(System.Action? action) @@ -1441,6 +1445,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Ana /// /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze? value) @@ -1452,6 +1457,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Ana /// /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Analyze() @@ -1463,6 +1469,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Ana /// /// /// Settings to define analyzers, tokenizers, token filters and character filters. + /// Refer to the linked documentation for step-by-step examples of updating analyzers on existing indices. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor Analyze(System.Action? action) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs index 9054f3da87a..6b3a0ee38c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifec LocalJsonValue propStep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIndexingComplete.TryReadProperty(ref reader, options, PropIndexingComplete, null)) + if (propIndexingComplete.TryReadProperty(ref reader, options, PropIndexingComplete, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifec continue; } - if (propOriginationDate.TryReadProperty(ref reader, options, PropOriginationDate, null)) + if (propOriginationDate.TryReadProperty(ref reader, options, PropOriginationDate, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propParseOriginationDate.TryReadProperty(ref reader, options, PropParseOriginationDate, null)) + if (propParseOriginationDate.TryReadProperty(ref reader, options, PropParseOriginationDate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,10 +105,10 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifec public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifecycle value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIndexingComplete, value.IndexingComplete, null, null); + writer.WriteProperty(options, PropIndexingComplete, value.IndexingComplete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropOriginationDate, value.OriginationDate, null, null); - writer.WriteProperty(options, PropParseOriginationDate, value.ParseOriginationDate, null, null); + writer.WriteProperty(options, PropOriginationDate, value.OriginationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropParseOriginationDate, value.ParseOriginationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropRolloverAlias, value.RolloverAlias, null, null); writer.WriteProperty(options, PropStep, value.Step, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs index 90763844894..6311f963cba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsTimeS LocalJsonValue propStartTime = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsTimeS public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsTimeSeries value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs index 79084ca62d9..b4ccebd6b4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, null)) + if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read continue; } - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, null); + writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropComposedOf, value.ComposedOf, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDataStream, value.DataStream, null, null); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIgnoreMissingComponentTemplates, value.IgnoreMissingComponentTemplates, null, null); writer.WriteProperty(options, PropIndexPatterns, value.IndexPatterns, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs index b1f1f71c0ff..bba7ada8f87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataS LocalJsonValue propHidden = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, null)) + if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHidden.TryReadProperty(ref reader, options, PropHidden, null)) + if (propHidden.TryReadProperty(ref reader, options, PropHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataS public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, null); - writer.WriteProperty(options, PropHidden, value.Hidden, null, null); + writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHidden, value.Hidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs index 722cf8954f3..d8a6f0f961d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressureMe LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressureMe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressureMemory value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs index ec4b8759157..0ba2dcfba2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexingSlowlogSet continue; } - if (propReformat.TryReadProperty(ref reader, options, PropReformat, null)) + if (propReformat.TryReadProperty(ref reader, options, PropReformat, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSource.TryReadProperty(ref reader, options, PropSource, null)) + if (propSource.TryReadProperty(ref reader, options, PropSource, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLevel, value.Level, null, null); - writer.WriteProperty(options, PropReformat, value.Reformat, null, null); - writer.WriteProperty(options, PropSource, value.Source, null, null); + writer.WriteProperty(options, PropReformat, value.Reformat, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropThreshold, value.Threshold, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs index 538f482b32e..de13490f542 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats Read( LocalJsonValue propUuid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propHealth.TryReadProperty(ref reader, options, PropHealth, null)) + if (propHealth.TryReadProperty(ref reader, options, PropHealth, static Elastic.Clients.Elasticsearch.HealthStatus? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats Read( continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.IndexManagement.IndexMetadataState? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,10 +97,10 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropHealth, value.Health, null, null); + writer.WriteProperty(options, PropHealth, value.Health, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.HealthStatus? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimaries, value.Primaries, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null))); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.IndexMetadataState? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteProperty(options, PropUuid, value.Uuid, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs index b8993d26f4f..fc576f60ae2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propTotalFields = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDepth, value.Depth, null, null); writer.WriteProperty(options, PropDimensionFields, value.DimensionFields, null, null); writer.WriteProperty(options, PropFieldNameLength, value.FieldNameLength, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs index 8d6978c5e6c..b78d7c26343 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsDepth value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs index 4deb60ece7a..e3fb2376ff6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsDimensionFields value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs index 8935f6b0361..41234caabe2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsFieldNameLength value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs index 5a06121b00b..ef6ca69abe1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedFields value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs index 399355c753d..0a885109c27 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedObjects value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs index c5f9c91cda1..8ea88300943 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MergeScheduler Rea LocalJsonValue propMaxThreadCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxMergeCount.TryReadProperty(ref reader, options, PropMaxMergeCount, null)) + if (propMaxMergeCount.TryReadProperty(ref reader, options, PropMaxMergeCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxThreadCount.TryReadProperty(ref reader, options, PropMaxThreadCount, null)) + if (propMaxThreadCount.TryReadProperty(ref reader, options, PropMaxThreadCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MergeScheduler Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MergeScheduler value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxMergeCount, value.MaxMergeCount, null, null); - writer.WriteProperty(options, PropMaxThreadCount, value.MaxThreadCount, null, null); + writer.WriteProperty(options, PropMaxMergeCount, value.MaxMergeCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxThreadCount, value.MaxThreadCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs index c648611b3e7..f55c87fc077 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RecoveryOrigin Rea LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBootstrapNewHistoryUuid.TryReadProperty(ref reader, options, PropBootstrapNewHistoryUuid, null)) + if (propBootstrapNewHistoryUuid.TryReadProperty(ref reader, options, PropBootstrapNewHistoryUuid, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RecoveryOrigin Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.RecoveryOrigin value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBootstrapNewHistoryUuid, value.BootstrapNewHistoryUuid, null, null); + writer.WriteProperty(options, PropBootstrapNewHistoryUuid, value.BootstrapNewHistoryUuid, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHost, value.Host, null, null); writer.WriteProperty(options, PropHostname, value.Hostname, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs index 3e423639c45..4669ab7d501 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RemoveAction Read( continue; } - if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, null)) + if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAliases, value.Aliases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropMustExist, value.MustExist, null, null); + writer.WriteProperty(options, PropMustExist, value.MustExist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs index a664d744bf5..8258fe80293 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RemoveIndexAction continue; } - if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, null)) + if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropMustExist, value.MustExist, null, null); + writer.WriteProperty(options, PropMustExist, value.MustExist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs index dac73d5e8f0..1b4161d6e35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ResolveClusterInfo continue; } - if (propMatchingIndices.TryReadProperty(ref reader, options, PropMatchingIndices, null)) + if (propMatchingIndices.TryReadProperty(ref reader, options, PropMatchingIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropConnected, value.Connected, null, null); writer.WriteProperty(options, PropError, value.Error, null, null); - writer.WriteProperty(options, PropMatchingIndices, value.MatchingIndices, null, null); + writer.WriteProperty(options, PropMatchingIndices, value.MatchingIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSkipUnavailable, value.SkipUnavailable, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs index f4a907fc810..a6ee808e4eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs @@ -66,17 +66,17 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMaxAgeMillis.TryReadProperty(ref reader, options, PropMaxAgeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMaxAgeMillis.TryReadProperty(ref reader, options, PropMaxAgeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, null)) + if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMaxPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMaxPrimaryShardSizeBytes, null)) + if (propMaxPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMaxPrimaryShardSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMaxSizeBytes.TryReadProperty(ref reader, options, PropMaxSizeBytes, null)) + if (propMaxSizeBytes.TryReadProperty(ref reader, options, PropMaxSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, null)) + if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, null)) + if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMinPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMinPrimaryShardSizeBytes, null)) + if (propMinPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMinPrimaryShardSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,7 +131,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMinSizeBytes.TryReadProperty(ref reader, options, PropMinSizeBytes, null)) + if (propMinSizeBytes.TryReadProperty(ref reader, options, PropMinSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,20 +170,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxAge, value.MaxAge, null, null); - writer.WriteProperty(options, PropMaxAgeMillis, value.MaxAgeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMaxAgeMillis, value.MaxAgeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardSizeBytes, value.MaxPrimaryShardSizeBytes, null, null); + writer.WriteProperty(options, PropMaxPrimaryShardSizeBytes, value.MaxPrimaryShardSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxSize, value.MaxSize, null, null); - writer.WriteProperty(options, PropMaxSizeBytes, value.MaxSizeBytes, null, null); + writer.WriteProperty(options, PropMaxSizeBytes, value.MaxSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAge, value.MinAge, null, null); - writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, null); - writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinPrimaryShardSize, value.MinPrimaryShardSize, null, null); - writer.WriteProperty(options, PropMinPrimaryShardSizeBytes, value.MinPrimaryShardSizeBytes, null, null); + writer.WriteProperty(options, PropMinPrimaryShardSizeBytes, value.MinPrimaryShardSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinSize, value.MinSize, null, null); - writer.WriteProperty(options, PropMinSizeBytes, value.MinSizeBytes, null, null); + writer.WriteProperty(options, PropMinSizeBytes, value.MinSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs index 81a4d3b14f2..b5329931608 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze Re LocalJsonValue propMaxTokenCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, null)) + if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, null); + writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs index ea1cda8e15d..26281f1695e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight LocalJsonValue propMaxAnalyzedOffset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, null)) + if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, null); + writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs index a390d125faf..1e4889ef433 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs @@ -38,17 +38,17 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity LocalJsonValue propK1 = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propB.TryReadProperty(ref reader, options, PropB, null)) + if (propB.TryReadProperty(ref reader, options, PropB, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiscountOverlaps.TryReadProperty(ref reader, options, PropDiscountOverlaps, null)) + if (propDiscountOverlaps.TryReadProperty(ref reader, options, PropDiscountOverlaps, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propK1.TryReadProperty(ref reader, options, PropK1, null)) + if (propK1.TryReadProperty(ref reader, options, PropK1, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,9 +80,9 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarityBm25 value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropB, value.B, null, null); - writer.WriteProperty(options, PropDiscountOverlaps, value.DiscountOverlaps, null, null); - writer.WriteProperty(options, PropK1, value.K1, null, null); + writer.WriteProperty(options, PropB, value.B, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiscountOverlaps, value.DiscountOverlaps, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropK1, value.K1, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs index 4cb166acf32..2216adc468e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs @@ -34,7 +34,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity LocalJsonValue propMu = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMu.TryReadProperty(ref reader, options, PropMu, null)) + if (propMu.TryReadProperty(ref reader, options, PropMu, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarityLmd value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMu, value.Mu, null, null); + writer.WriteProperty(options, PropMu, value.Mu, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs index 856168c7031..6a4343e9d38 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs @@ -34,7 +34,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity LocalJsonValue propLambda = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLambda.TryReadProperty(ref reader, options, PropLambda, null)) + if (propLambda.TryReadProperty(ref reader, options, PropLambda, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarityLmj value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLambda, value.Lambda, null, null); + writer.WriteProperty(options, PropLambda, value.Lambda, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs index 5e7a2ea4680..eb1d6158481 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo LocalJsonValue propSizeInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageSizeInBytes.TryReadProperty(ref reader, options, PropAverageSizeInBytes, null)) + if (propAverageSizeInBytes.TryReadProperty(ref reader, options, PropAverageSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo continue; } - if (propMaxSizeInBytes.TryReadProperty(ref reader, options, PropMaxSizeInBytes, null)) + if (propMaxSizeInBytes.TryReadProperty(ref reader, options, PropMaxSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinSizeInBytes.TryReadProperty(ref reader, options, PropMinSizeInBytes, null)) + if (propMinSizeInBytes.TryReadProperty(ref reader, options, PropMinSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,11 +97,11 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageSizeInBytes, value.AverageSizeInBytes, null, null); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropAverageSizeInBytes, value.AverageSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropMaxSizeInBytes, value.MaxSizeInBytes, null, null); - writer.WriteProperty(options, PropMinSizeInBytes, value.MinSizeInBytes, null, null); + writer.WriteProperty(options, PropMaxSizeInBytes, value.MaxSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinSizeInBytes, value.MinSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSizeInBytes, value.SizeInBytes, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs index dade4f8957c..4abadfe7498 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardRecovery Read continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -103,12 +103,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardRecovery Read continue; } - if (propStopTime.TryReadProperty(ref reader, options, PropStopTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStopTime.TryReadProperty(ref reader, options, PropStopTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStopTimeInMillis.TryReadProperty(ref reader, options, PropStopTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStopTimeInMillis.TryReadProperty(ref reader, options, PropStopTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -183,10 +183,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStage, value.Stage, null, null); writer.WriteProperty(options, PropStart, value.Start, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropStopTime, value.StopTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropStopTimeInMillis, value.StopTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStopTime, value.StopTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStopTimeInMillis, value.StopTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropTarget, value.Target, null, null); writer.WriteProperty(options, PropTotalTime, value.TotalTime, null, null); writer.WriteProperty(options, PropTotalTimeInMillis, value.TotalTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs index 39a766f3349..e56bf57f5fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardStore Read(re } propNodeId.Initialized = propNode.Initialized = true; - reader.ReadProperty(options, out propNodeId.Value, out propNode.Value, null, null); + reader.ReadProperty(options, out propNodeId.Value, out propNode.Value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllocation, value.Allocation, null, null); writer.WriteProperty(options, PropAllocationId, value.AllocationId, null, null); writer.WriteProperty(options, PropStoreException, value.StoreException, null, null); - writer.WriteProperty(options, value.NodeId, value.Node, null, null); + writer.WriteProperty(options, value.NodeId, value.Node, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs index 7d55de11501..7dceb395a37 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SlowlogSettings Re continue; } - if (propReformat.TryReadProperty(ref reader, options, PropReformat, null)) + if (propReformat.TryReadProperty(ref reader, options, PropReformat, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSource.TryReadProperty(ref reader, options, PropSource, null)) + if (propSource.TryReadProperty(ref reader, options, PropSource, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLevel, value.Level, null, null); - writer.WriteProperty(options, PropReformat, value.Reformat, null, null); - writer.WriteProperty(options, PropSource, value.Source, null, null); + writer.WriteProperty(options, PropReformat, value.Reformat, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropThreshold, value.Threshold, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs index 4cbf0f2ef4e..4d2b1fae80d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes Read(r LocalJsonValue propRetentionLease = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetentionLease, value.RetentionLease, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs index 04c382c2c65..0b87bb2140c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Storage Read(ref S LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowMmap.TryReadProperty(ref reader, options, PropAllowMmap, null)) + if (propAllowMmap.TryReadProperty(ref reader, options, PropAllowMmap, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Storage Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.Storage value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowMmap, value.AllowMmap, null, null); + writer.WriteProperty(options, PropAllowMmap, value.AllowMmap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs index 47e7f42d6eb..b4426c7e2e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.TemplateMapping Re continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMappings, value.Mappings, null, null); writer.WriteProperty(options, PropOrder, value.Order, null, null); writer.WriteProperty(options, PropSettings, value.Settings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs index 4a782c07ecd..f98db7abbfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Translog Read(ref LocalJsonValue propSyncInterval = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDurability.TryReadProperty(ref reader, options, PropDurability, null)) + if (propDurability.TryReadProperty(ref reader, options, PropDurability, static Elastic.Clients.Elasticsearch.IndexManagement.TranslogDurability? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Translog Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.Translog value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDurability, value.Durability, null, null); + writer.WriteProperty(options, PropDurability, value.Durability, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.TranslogDurability? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFlushThresholdSize, value.FlushThresholdSize, null, null); writer.WriteProperty(options, PropRetention, value.Retention, null, null); writer.WriteProperty(options, PropSyncInterval, value.SyncInterval, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs index 2f46463a582..f14d823d884 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs @@ -131,7 +131,7 @@ public override Elastic.Clients.Elasticsearch.IndexingStats Read(ref System.Text continue; } - if (propWriteLoad.TryReadProperty(ref reader, options, PropWriteLoad, null)) + if (propWriteLoad.TryReadProperty(ref reader, options, PropWriteLoad, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -183,7 +183,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropThrottleTime, value.ThrottleTime, null, null); writer.WriteProperty(options, PropThrottleTimeInMillis, value.ThrottleTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropTypes, value.Types, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropWriteLoad, value.WriteLoad, null, null); + writer.WriteProperty(options, PropWriteLoad, value.WriteLoad, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs index 60ee500d03e..ace167d6a4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.IndicesOptions Read(ref System.Tex LocalJsonValue propIgnoreUnavailable = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, null)) + if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.IndicesOptions Read(ref System.Tex continue; } - if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, null)) + if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.IndicesOptions Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndicesOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, null); + writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExpandWildcards, value.ExpandWildcards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIgnoreThrottled, value.IgnoreThrottled, null, null); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); + writer.WriteProperty(options, PropIgnoreThrottled, value.IgnoreThrottled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs index f463f057cff..b95ff6b7478 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Inference.AdaptiveAllocations Read LocalJsonValue propMinNumberOfAllocations = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, null)) + if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, null)) + if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Inference.AdaptiveAllocations Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.AdaptiveAllocations value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, null); - writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs index 94ae39fbb78..51d1e9d8e99 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.AlibabaCloudTaskSettings continue; } - if (propReturnToken.TryReadProperty(ref reader, options, PropReturnToken, null)) + if (propReturnToken.TryReadProperty(ref reader, options, PropReturnToken, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropInputType, value.InputType, null, null); - writer.WriteProperty(options, PropReturnToken, value.ReturnToken, null, null); + writer.WriteProperty(options, PropReturnToken, value.ReturnToken, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs index 3c3f1060d8c..d1415c2eb51 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskSetting LocalJsonValue propTopP = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, null)) + if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopK.TryReadProperty(ref reader, options, PropTopK, null)) + if (propTopK.TryReadProperty(ref reader, options, PropTopK, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, null); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); - writer.WriteProperty(options, PropTopK, value.TopK, null, null); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopK, value.TopK, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs index 3c0411af820..cddb0d47054 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Inference.AnthropicTaskSettings Re continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopK.TryReadProperty(ref reader, options, PropTopK, null)) + if (propTopK.TryReadProperty(ref reader, options, PropTopK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxTokens, value.MaxTokens, null, null); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); - writer.WriteProperty(options, PropTopK, value.TopK, null, null); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopK, value.TopK, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs index a8496e67c96..1ba08d90db2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs @@ -41,22 +41,22 @@ public override Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskSetting LocalJsonValue propUser = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDoSample.TryReadProperty(ref reader, options, PropDoSample, null)) + if (propDoSample.TryReadProperty(ref reader, options, PropDoSample, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, null)) + if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,10 +89,10 @@ public override Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDoSample, value.DoSample, null, null); - writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, null); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropDoSample, value.DoSample, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUser, value.User, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs index e1ddc8bf595..462ee7dd864 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereServiceSettings Re continue; } - if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, null)) + if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, static Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereServiceSettings Re continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static Elastic.Clients.Elasticsearch.Inference.CohereSimilarityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); - writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, null); + writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereSimilarityType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -144,8 +144,6 @@ internal CohereServiceSettings(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// /// For a text_embedding task, the types of embeddings you want to get back. - /// Use binary for binary embeddings, which are encoded as bytes with signed int8 precision. - /// Use bit for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of binary). /// Use byte for signed int8 embeddings (this is a synonym of int8). /// Use float for the default float embeddings. /// Use int8 for signed int8 embeddings. @@ -238,8 +236,6 @@ public Elastic.Clients.Elasticsearch.Inference.CohereServiceSettingsDescriptor A /// /// /// For a text_embedding task, the types of embeddings you want to get back. - /// Use binary for binary embeddings, which are encoded as bytes with signed int8 precision. - /// Use bit for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of binary). /// Use byte for signed int8 embeddings (this is a synonym of int8). /// Use float for the default float embeddings. /// Use int8 for signed int8 embeddings. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs index 4d569f60eb4..59655b377cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereTaskSettings Read( LocalJsonValue propTruncate = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propInputType.TryReadProperty(ref reader, options, PropInputType, null)) + if (propInputType.TryReadProperty(ref reader, options, PropInputType, static Elastic.Clients.Elasticsearch.Inference.CohereInputType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.Inference.CohereTruncateType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereTaskSettings Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.CohereTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropInputType, value.InputType, null, null); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); + writer.WriteProperty(options, PropInputType, value.InputType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereInputType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereTruncateType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs index b73bfc9a254..802f60c3878 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CompletionToolFunction R continue; } - if (propStrict.TryReadProperty(ref reader, options, PropStrict, null)) + if (propStrict.TryReadProperty(ref reader, options, PropStrict, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropParameters, value.Parameters, null, null); - writer.WriteProperty(options, PropStrict, value.Strict, null, null); + writer.WriteProperty(options, PropStrict, value.Strict, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs index d0d6d5f808c..8baea6e16ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSett continue; } - if (propNumAllocations.TryReadProperty(ref reader, options, PropNumAllocations, null)) + if (propNumAllocations.TryReadProperty(ref reader, options, PropNumAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); writer.WriteProperty(options, PropDeploymentId, value.DeploymentId, null, null); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); - writer.WriteProperty(options, PropNumAllocations, value.NumAllocations, null, null); + writer.WriteProperty(options, PropNumAllocations, value.NumAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNumThreads, value.NumThreads, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs index 5f7bd5496e0..fdd264fc9ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskSetting LocalJsonValue propReturnDocuments = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs index d585a8e16e1..9fe39debb81 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskSettin LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAutoTruncate.TryReadProperty(ref reader, options, PropAutoTruncate, null)) + if (propAutoTruncate.TryReadProperty(ref reader, options, PropAutoTruncate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAutoTruncate, value.AutoTruncate, null, null); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); + writer.WriteProperty(options, PropAutoTruncate, value.AutoTruncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs index 57092ce8c4b..f62cbc789af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSetting LocalJsonValue propStrategy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxChunkSize.TryReadProperty(ref reader, options, PropMaxChunkSize, null)) + if (propMaxChunkSize.TryReadProperty(ref reader, options, PropMaxChunkSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOverlap.TryReadProperty(ref reader, options, PropOverlap, null)) + if (propOverlap.TryReadProperty(ref reader, options, PropOverlap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSentenceOverlap.TryReadProperty(ref reader, options, PropSentenceOverlap, null)) + if (propSentenceOverlap.TryReadProperty(ref reader, options, PropSentenceOverlap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxChunkSize, value.MaxChunkSize, null, null); - writer.WriteProperty(options, PropOverlap, value.Overlap, null, null); - writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, null); + writer.WriteProperty(options, PropMaxChunkSize, value.MaxChunkSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOverlap, value.Overlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStrategy, value.Strategy, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs index 8d2d6101adc..8b9cb8ec2d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Inference.JinaAIServiceSettings Re continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static Elastic.Clients.Elasticsearch.Inference.JinaAISimilarityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.JinaAISimilarityType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs index 56bc25e3120..487112a0a00 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Inference.JinaAITaskSettings Read( LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTask.TryReadProperty(ref reader, options, PropTask, null)) + if (propTask.TryReadProperty(ref reader, options, PropTask, static Elastic.Clients.Elasticsearch.Inference.JinaAITextEmbeddingTask? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Inference.JinaAITaskSettings Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.JinaAITaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); - writer.WriteProperty(options, PropTask, value.Task, null, null); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTask, value.Task, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.JinaAITextEmbeddingTask? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs index e90ccb1fb44..35037af3295 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs @@ -123,12 +123,33 @@ internal Message(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSent /// /// The content of the message. /// + /// + /// String example: + /// + /// + /// { + /// "content": "Some string" + /// } + /// + /// + /// Object example: + /// + /// + /// { + /// "content": [ + /// { + /// "text": "Some text", + /// "type": "text" + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Union>? Content { get; set; } /// /// - /// The role of the message author. + /// The role of the message author. Valid values are user, assistant, system, and tool. /// /// public @@ -139,15 +160,30 @@ internal Message(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSent /// /// - /// The tool call that this message is responding to. + /// Only for tool role messages. The tool call that this message is responding to. /// /// public Elastic.Clients.Elasticsearch.Id? ToolCallId { get; set; } /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public System.Collections.Generic.ICollection? ToolCalls { get; set; } } @@ -180,6 +216,27 @@ public MessageDescriptor() /// /// The content of the message. /// + /// + /// String example: + /// + /// + /// { + /// "content": "Some string" + /// } + /// + /// + /// Object example: + /// + /// + /// { + /// "content": [ + /// { + /// "text": "Some text", + /// "type": "text" + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Content(Elastic.Clients.Elasticsearch.Union>? value) { @@ -189,7 +246,7 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Content(Elastic /// /// - /// The role of the message author. + /// The role of the message author. Valid values are user, assistant, system, and tool. /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Role(string value) @@ -200,7 +257,7 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Role(string val /// /// - /// The tool call that this message is responding to. + /// Only for tool role messages. The tool call that this message is responding to. /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCallId(Elastic.Clients.Elasticsearch.Id? value) @@ -211,8 +268,23 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCallId(Elas /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(System.Collections.Generic.ICollection? value) { @@ -222,8 +294,23 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(Syste /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(params Elastic.Clients.Elasticsearch.Inference.ToolCall[] values) { @@ -233,8 +320,23 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(param /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(params System.Action[] actions) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs index fe7b6f01977..ee30a408237 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Inference.MistralServiceSettings R continue; } - if (propMaxInputTokens.TryReadProperty(ref reader, options, PropMaxInputTokens, null)) + if (propMaxInputTokens.TryReadProperty(ref reader, options, PropMaxInputTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); - writer.WriteProperty(options, PropMaxInputTokens, value.MaxInputTokens, null, null); + writer.WriteProperty(options, PropMaxInputTokens, value.MaxInputTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModel, value.Model, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs index 1edad9dce40..04833602fec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.Inference.OpenAIServiceSettings Re continue; } - if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, null)) + if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); - writer.WriteProperty(options, PropDimensions, value.Dimensions, null, null); + writer.WriteProperty(options, PropDimensions, value.Dimensions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropOrganizationId, value.OrganizationId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs index 8564783b52a..ec352bc6542 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RateLimitSetting Read(re LocalJsonValue propRequestsPerMinute = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRequestsPerMinute.TryReadProperty(ref reader, options, PropRequestsPerMinute, null)) + if (propRequestsPerMinute.TryReadProperty(ref reader, options, PropRequestsPerMinute, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,11 +57,16 @@ public override Elastic.Clients.Elasticsearch.Inference.RateLimitSetting Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.RateLimitSetting value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRequestsPerMinute, value.RequestsPerMinute, null, null); + writer.WriteProperty(options, PropRequestsPerMinute, value.RequestsPerMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } +/// +/// +/// This setting helps to minimize the number of rate limit errors returned from the service. +/// +/// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.RateLimitSettingConverter))] public sealed partial class RateLimitSetting { @@ -84,11 +89,99 @@ internal RateLimitSetting(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// /// The number of requests allowed per minute. + /// By default, the number of requests allowed per minute is set by each service as follows: /// + /// + /// + /// + /// alibabacloud-ai-search service: 1000 + /// + /// + /// + /// + /// anthropic service: 50 + /// + /// + /// + /// + /// azureaistudio service: 240 + /// + /// + /// + /// + /// azureopenai service and task type text_embedding: 1440 + /// + /// + /// + /// + /// azureopenai service and task type completion: 120 + /// + /// + /// + /// + /// cohere service: 10000 + /// + /// + /// + /// + /// elastic service and task type chat_completion: 240 + /// + /// + /// + /// + /// googleaistudio service: 360 + /// + /// + /// + /// + /// googlevertexai service: 30000 + /// + /// + /// + /// + /// hugging_face service: 3000 + /// + /// + /// + /// + /// jinaai service: 2000 + /// + /// + /// + /// + /// mistral service: 240 + /// + /// + /// + /// + /// openai service and task type text_embedding: 3000 + /// + /// + /// + /// + /// openai service and task type completion: 500 + /// + /// + /// + /// + /// voyageai service: 2000 + /// + /// + /// + /// + /// watsonxai service: 120 + /// + /// + /// /// public int? RequestsPerMinute { get; set; } } +/// +/// +/// This setting helps to minimize the number of rate limit errors returned from the service. +/// +/// public readonly partial struct RateLimitSettingDescriptor { internal Elastic.Clients.Elasticsearch.Inference.RateLimitSetting Instance { get; init; } @@ -111,7 +204,90 @@ public RateLimitSettingDescriptor() /// /// /// The number of requests allowed per minute. + /// By default, the number of requests allowed per minute is set by each service as follows: + /// + /// + /// + /// + /// alibabacloud-ai-search service: 1000 + /// + /// + /// + /// + /// anthropic service: 50 + /// + /// + /// + /// + /// azureaistudio service: 240 + /// + /// + /// + /// + /// azureopenai service and task type text_embedding: 1440 + /// + /// + /// + /// + /// azureopenai service and task type completion: 120 + /// + /// + /// + /// + /// cohere service: 10000 + /// + /// + /// + /// + /// elastic service and task type chat_completion: 240 + /// + /// + /// + /// + /// googleaistudio service: 360 + /// + /// + /// + /// + /// googlevertexai service: 30000 + /// + /// + /// + /// + /// hugging_face service: 3000 + /// + /// + /// + /// + /// jinaai service: 2000 + /// + /// + /// + /// + /// mistral service: 240 + /// + /// + /// + /// + /// openai service and task type text_embedding: 3000 + /// + /// + /// + /// + /// openai service and task type completion: 500 + /// + /// + /// + /// + /// voyageai service: 2000 + /// + /// + /// + /// + /// watsonxai service: 120 /// + /// + /// /// public Elastic.Clients.Elasticsearch.Inference.RateLimitSettingDescriptor RequestsPerMinute(int? value) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs index 84311acaddc..27a1cae4ba6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re LocalJsonValue propTopP = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxCompletionTokens.TryReadProperty(ref reader, options, PropMaxCompletionTokens, null)) + if (propMaxCompletionTokens.TryReadProperty(ref reader, options, PropMaxCompletionTokens, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,14 +113,14 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxCompletionTokens, value.MaxCompletionTokens, null, null); + writer.WriteProperty(options, PropMaxCompletionTokens, value.MaxCompletionTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMessages, value.Messages, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropModel, value.Model, null, null); writer.WriteProperty(options, PropStop, value.Stop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropToolChoice, value.ToolChoice, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropTools, value.Tools, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -194,14 +194,51 @@ internal RequestChatCompletion(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// /// Controls which tool is called by the model. + /// String representation: One of auto, none, or requrired. auto allows the model to choose between calling tools and generating a message. none causes the model to not call any tools. required forces the model to call one or more tools. + /// Example (object representation): /// + /// + /// { + /// "tool_choice": { + /// "type": "function", + /// "function": { + /// "name": "get_current_weather" + /// } + /// } + /// } + /// /// public Elastic.Clients.Elasticsearch.Union? ToolChoice { get; set; } /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public System.Collections.Generic.ICollection? Tools { get; set; } @@ -335,7 +372,19 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// Controls which tool is called by the model. + /// String representation: One of auto, none, or requrired. auto allows the model to choose between calling tools and generating a message. none causes the model to not call any tools. required forces the model to call one or more tools. + /// Example (object representation): /// + /// + /// { + /// "tool_choice": { + /// "type": "function", + /// "function": { + /// "name": "get_current_weather" + /// } + /// } + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor ToolChoice(Elastic.Clients.Elasticsearch.Union? value) { @@ -346,7 +395,32 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor Tools(System.Collections.Generic.ICollection? value) { @@ -357,7 +431,32 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor Tools(params Elastic.Clients.Elasticsearch.Inference.CompletionTool[] values) { @@ -368,7 +467,32 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor Tools(params System.Action[] actions) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs index 41e63a2b182..4f70809a62a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.Inference.VoyageAIServiceSettings LocalJsonValue propRateLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, null)) + if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, null)) + if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,8 +81,8 @@ public override Elastic.Clients.Elasticsearch.Inference.VoyageAIServiceSettings public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.VoyageAIServiceSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDimensions, value.Dimensions, null, null); - writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, null); + writer.WriteProperty(options, PropDimensions, value.Dimensions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs index 185c1c66a86..d73e91e77c2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Inference.VoyageAITaskSettings Rea continue; } - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopK.TryReadProperty(ref reader, options, PropTopK, null)) + if (propTopK.TryReadProperty(ref reader, options, PropTopK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncation.TryReadProperty(ref reader, options, PropTruncation, null)) + if (propTruncation.TryReadProperty(ref reader, options, PropTruncation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropInputType, value.InputType, null, null); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); - writer.WriteProperty(options, PropTopK, value.TopK, null, null); - writer.WriteProperty(options, PropTruncation, value.Truncation, null, null); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopK, value.TopK, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncation, value.Truncation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs index c0236eabc3e..da8d939f5d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy LocalJsonValue> propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowDuplicates.TryReadProperty(ref reader, options, PropAllowDuplicates, null)) + if (propAllowDuplicates.TryReadProperty(ref reader, options, PropAllowDuplicates, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,11 +113,11 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.AppendProcessor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowDuplicates, value.AllowDuplicates, null, null); + writer.WriteProperty(options, PropAllowDuplicates, value.AllowDuplicates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs index 8a7ccd7b303..33fc6571fd9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs @@ -72,17 +72,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessor Read(re continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedChars.TryReadProperty(ref reader, options, PropIndexedChars, null)) + if (propIndexedChars.TryReadProperty(ref reader, options, PropIndexedChars, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessor Read(re continue; } - if (propRemoveBinary.TryReadProperty(ref reader, options, PropRemoveBinary, null)) + if (propRemoveBinary.TryReadProperty(ref reader, options, PropRemoveBinary, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -156,13 +156,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropIndexedChars, value.IndexedChars, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedChars, value.IndexedChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexedCharsField, value.IndexedCharsField, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRemoveBinary, value.RemoveBinary, null, null); + writer.WriteProperty(options, PropRemoveBinary, value.RemoveBinary, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResourceName, value.ResourceName, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs index 59bc1c66bb9..19be11967cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.BytesProcessor Read(ref Sys continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs index 940a2538649..81d5ddfa03e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.CircleProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,8 +133,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropErrorDistance, value.ErrorDistance, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropShapeType, value.ShapeType, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs index 1c8cce666d7..7b82c7827bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs @@ -98,12 +98,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.CommunityIDProcessor Read(r continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CommunityIDProcessor Read(r continue; } - if (propSeed.TryReadProperty(ref reader, options, PropSeed, null)) + if (propSeed.TryReadProperty(ref reader, options, PropSeed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,10 +184,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIcmpCode, value.IcmpCode, null, null); writer.WriteProperty(options, PropIcmpType, value.IcmpType, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSeed, value.Seed, null, null); + writer.WriteProperty(options, PropSeed, value.Seed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSourceIp, value.SourceIp, null, null); writer.WriteProperty(options, PropSourcePort, value.SourcePort, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs index 3a0aeda7c5d..5deea221414 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.ConvertProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,8 +124,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs index f04323329d9..c188ac91b76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs @@ -75,12 +75,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.CsvProcessor Read(ref Syste continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CsvProcessor Read(ref Syste continue; } - if (propTrim.TryReadProperty(ref reader, options, PropTrim, null)) + if (propTrim.TryReadProperty(ref reader, options, PropTrim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -149,14 +149,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropEmptyValue, value.EmptyValue, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuote, value.Quote, null, null); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetFields, value.TargetFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropTrim, value.Trim, null, null); + writer.WriteProperty(options, PropTrim, value.Trim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs index 2daec74e2d0..91f007ea026 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessor Read continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -150,7 +150,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexNameFormat, value.IndexNameFormat, null, null); writer.WriteProperty(options, PropIndexNamePrefix, value.IndexNamePrefix, null, null); writer.WriteProperty(options, PropLocale, value.Locale, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs index edc1bf52ca5..1981132e775 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,7 +141,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormats, value.Formats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropOutputFormat, value.OutputFormat, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs index fbe7b4eb0a4..e9cede0a93d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs @@ -69,12 +69,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.DissectProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,8 +125,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs index 72b69fee3c3..0206cfa98c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs @@ -71,18 +71,18 @@ public override Elastic.Clients.Elasticsearch.Ingest.DocumentSimulation Read(ref continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out string value, null, null); + reader.ReadProperty(options, out string key, out string value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -108,13 +108,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIngest, value.Ingest, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); if (value.Metadata is not null) { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs index 5d28d340aec..a84ca819053 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessor Read(r continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessor Read(r continue; } - if (propOverride.TryReadProperty(ref reader, options, PropOverride, null)) + if (propOverride.TryReadProperty(ref reader, options, PropOverride, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,9 +116,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropOverride, value.Override, null, null); + writer.WriteProperty(options, PropOverride, value.Override, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs index 9ecc53e205a..03d5231b1b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DropProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs index 90f74247a4f..3b354c91444 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs @@ -70,17 +70,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxMatches.TryReadProperty(ref reader, options, PropMaxMatches, null)) + if (propMaxMatches.TryReadProperty(ref reader, options, PropMaxMatches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy continue; } - if (propOverride.TryReadProperty(ref reader, options, PropOverride, null)) + if (propOverride.TryReadProperty(ref reader, options, PropOverride, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy continue; } - if (propShapeRelation.TryReadProperty(ref reader, options, PropShapeRelation, null)) + if (propShapeRelation.TryReadProperty(ref reader, options, PropShapeRelation, static Elastic.Clients.Elasticsearch.GeoShapeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,13 +148,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropMaxMatches, value.MaxMatches, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxMatches, value.MaxMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropOverride, value.Override, null, null); + writer.WriteProperty(options, PropOverride, value.Override, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPolicyName, value.PolicyName, null, null); - writer.WriteProperty(options, PropShapeRelation, value.ShapeRelation, null, null); + writer.WriteProperty(options, PropShapeRelation, value.ShapeRelation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoShapeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs index 88e8bea5953..64f373d6de1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.FailProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMessage, value.Message, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs index 35e8a4fc6d3..59d3ae5bfa1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs @@ -66,17 +66,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessor Read(r continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMethod.TryReadProperty(ref reader, options, PropMethod, null)) + if (propMethod.TryReadProperty(ref reader, options, PropMethod, static Elastic.Clients.Elasticsearch.Ingest.FingerprintDigest? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,9 +132,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropMethod, value.Method, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMethod, value.Method, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.FingerprintDigest? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSalt, value.Salt, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs index 3b38cf1cc87..89d90e33628 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProcessor, value.Processor, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs index 2615af4e7f9..75422676386 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor Read(ref S continue; } - if (propTargetFormat.TryReadProperty(ref reader, options, PropTargetFormat, null)) + if (propTargetFormat.TryReadProperty(ref reader, options, PropTargetFormat, static Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,15 +165,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNonChildrenField, value.NonChildrenField, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropParentField, value.ParentField, null, null); writer.WriteProperty(options, PropPrecisionField, value.PrecisionField, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); - writer.WriteProperty(options, PropTargetFormat, value.TargetFormat, null, null); + writer.WriteProperty(options, PropTargetFormat, value.TargetFormat, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTileType, value.TileType, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs index f57710930a1..d3a87fe3c8f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys continue; } - if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, null)) + if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys continue; } - if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, null)) + if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -147,12 +147,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDatabaseFile, value.DatabaseFile, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, null); + writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, null); + writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs index 824896503e6..34a07fcf120 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GrokProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GrokProcessor Read(ref Syst continue; } - if (propTraceMatch.TryReadProperty(ref reader, options, PropTraceMatch, null)) + if (propTraceMatch.TryReadProperty(ref reader, options, PropTraceMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,13 +141,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPatternDefinitions, value.PatternDefinitions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropPatterns, value.Patterns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); - writer.WriteProperty(options, PropTraceMatch, value.TraceMatch, null, null); + writer.WriteProperty(options, PropTraceMatch, value.TraceMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs index adf190f45a3..5bcfc062437 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GsubProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,8 +132,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropReplacement, value.Replacement, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs index d7b4e21b32d..be17953f9cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs index 1e1be6d92ff..b9059dda8ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigClassificati LocalJsonValue propTopClassesResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigClassificati public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.InferenceConfigClassification value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldType, value.PredictionFieldType, null, null); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTopClassesResultsField, value.TopClassesResultsField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs index ee7fc47234a..69ee088a1bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigRegression R LocalJsonValue propResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigRegression R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.InferenceConfigRegression value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs index 6d4639e637a..a8cb7feb2f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,8 +140,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropFieldMap, value.FieldMap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInputOutput, value.InputOutput, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs index 858411580a5..e9b56001a11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpDatabaseConfigurationMeta continue; } - if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propModifiedDateMillis.TryReadProperty(ref reader, options, PropModifiedDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propModifiedDateMillis.TryReadProperty(ref reader, options, PropModifiedDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -91,8 +91,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDatabase, value.Database, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropModifiedDateMillis, value.ModifiedDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropModifiedDateMillis, value.ModifiedDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs index af7afb63e3d..9d4907c2d82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re continue; } - if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, null)) + if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re continue; } - if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, null)) + if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -147,12 +147,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDatabaseFile, value.DatabaseFile, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, null); + writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, null); + writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs index c11e7dcf51d..b9460fecbfe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.JoinProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,7 +116,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs index b103ce95d56..c2ace87b7cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.JsonProcessor Read(ref Syst LocalJsonValue propTargetField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAddToRoot.TryReadProperty(ref reader, options, PropAddToRoot, null)) + if (propAddToRoot.TryReadProperty(ref reader, options, PropAddToRoot, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAddToRootConflictStrategy.TryReadProperty(ref reader, options, PropAddToRootConflictStrategy, null)) + if (propAddToRootConflictStrategy.TryReadProperty(ref reader, options, PropAddToRootConflictStrategy, static Elastic.Clients.Elasticsearch.Ingest.JsonProcessorConflictStrategy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAllowDuplicateKeys.TryReadProperty(ref reader, options, PropAllowDuplicateKeys, null)) + if (propAllowDuplicateKeys.TryReadProperty(ref reader, options, PropAllowDuplicateKeys, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.JsonProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,13 +129,13 @@ public override Elastic.Clients.Elasticsearch.Ingest.JsonProcessor Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.JsonProcessor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAddToRoot, value.AddToRoot, null, null); - writer.WriteProperty(options, PropAddToRootConflictStrategy, value.AddToRootConflictStrategy, null, null); - writer.WriteProperty(options, PropAllowDuplicateKeys, value.AllowDuplicateKeys, null, null); + writer.WriteProperty(options, PropAddToRoot, value.AddToRoot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAddToRootConflictStrategy, value.AddToRootConflictStrategy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.JsonProcessorConflictStrategy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAllowDuplicateKeys, value.AllowDuplicateKeys, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs index 73b76a45501..aee2791ea0f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs @@ -88,12 +88,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessor Read(ref continue; } - if (propStripBrackets.TryReadProperty(ref reader, options, PropStripBrackets, null)) + if (propStripBrackets.TryReadProperty(ref reader, options, PropStripBrackets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -182,12 +182,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFieldSplit, value.FieldSplit, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIncludeKeys, value.IncludeKeys, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrefix, value.Prefix, null, null); - writer.WriteProperty(options, PropStripBrackets, value.StripBrackets, null, null); + writer.WriteProperty(options, PropStripBrackets, value.StripBrackets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteProperty(options, PropTrimKey, value.TrimKey, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs index 5c0f1ad8083..05d74d429db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs index 5fd983c86aa..256c0eaac92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessor R continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,8 +140,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDestinationIp, value.DestinationIp, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInternalNetworks, value.InternalNetworks, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropInternalNetworksField, value.InternalNetworksField, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs index 2a9331c54f4..2e3a1927463 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.Pipeline value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProcessors, value.Processors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs index 4589b421f77..7294700dd90 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineConfig Read(ref Sys continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropProcessors, value.Processors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs index 807f9d09d75..a56cd4fda44 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissingPipeline.TryReadProperty(ref reader, options, PropIgnoreMissingPipeline, null)) + if (propIgnoreMissingPipeline.TryReadProperty(ref reader, options, PropIgnoreMissingPipeline, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,8 +107,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissingPipeline, value.IgnoreMissingPipeline, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissingPipeline, value.IgnoreMissingPipeline, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs index 7e31e8e3281..d05d18274d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorResult Rea continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.Ingest.PipelineSimulationStatusOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropIgnoredError, value.IgnoredError, null, null); writer.WriteProperty(options, PropProcessorType, value.ProcessorType, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.PipelineSimulationStatusOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs index 9f0894415ae..6cc7a2eb681 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy continue; } - if (propSkipIfUnlicensed.TryReadProperty(ref reader, options, PropSkipIfUnlicensed, null)) + if (propSkipIfUnlicensed.TryReadProperty(ref reader, options, PropSkipIfUnlicensed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,7 +117,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy continue; } - if (propTraceRedact.TryReadProperty(ref reader, options, PropTraceRedact, null)) + if (propTraceRedact.TryReadProperty(ref reader, options, PropTraceRedact, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -156,16 +156,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPatternDefinitions, value.PatternDefinitions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropPatterns, value.Patterns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrefix, value.Prefix, null, null); - writer.WriteProperty(options, PropSkipIfUnlicensed, value.SkipIfUnlicensed, null, null); + writer.WriteProperty(options, PropSkipIfUnlicensed, value.SkipIfUnlicensed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSuffix, value.Suffix, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); - writer.WriteProperty(options, PropTraceRedact, value.TraceRedact, null, null); + writer.WriteProperty(options, PropTraceRedact, value.TraceRedact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs index 98668d9fd25..f1b4a6f788c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessor R continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs index ee01e3bf6f0..7ddfd1d435e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeep, value.Keep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs index e10084b3a11..e97d22525f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RenameProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs index b8d0e553338..bed5c25b1df 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RerouteProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,7 +117,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDestination, value.Destination, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNamespace, value.Namespace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs index d295f8a2fad..fe73feafa49 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.ScriptProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLang.TryReadProperty(ref reader, options, PropLang, null)) + if (propLang.TryReadProperty(ref reader, options, PropLang, static Elastic.Clients.Elasticsearch.ScriptLanguage? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,8 +124,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropLang, value.Lang, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLang, value.Lang, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.ScriptLanguage? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs index 03d476eabda..063710e909b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetProcessor Read(ref Syste continue; } - if (propIgnoreEmptyValue.TryReadProperty(ref reader, options, PropIgnoreEmptyValue, null)) + if (propIgnoreEmptyValue.TryReadProperty(ref reader, options, PropIgnoreEmptyValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetProcessor Read(ref Syste continue; } - if (propOverride.TryReadProperty(ref reader, options, PropOverride, null)) + if (propOverride.TryReadProperty(ref reader, options, PropOverride, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,11 +141,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreEmptyValue, value.IgnoreEmptyValue, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreEmptyValue, value.IgnoreEmptyValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMediaType, value.MediaType, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropOverride, value.Override, null, null); + writer.WriteProperty(options, PropOverride, value.Override, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs index aa8f9e687e7..f107e5b9e12 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessor Re continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,7 +108,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs index 4e68a7fce1c..474647a4dba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SortProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SortProcessor Read(ref Syst continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,9 +116,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs index 3414e2f7b58..9cdb0d03b6c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.SplitProcessor Read(ref Sys continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SplitProcessor Read(ref Sys continue; } - if (propPreserveTrailing.TryReadProperty(ref reader, options, PropPreserveTrailing, null)) + if (propPreserveTrailing.TryReadProperty(ref reader, options, PropPreserveTrailing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,10 +132,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPreserveTrailing, value.PreserveTrailing, null, null); + writer.WriteProperty(options, PropPreserveTrailing, value.PreserveTrailing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs index 2e103a3a538..02df042a9cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.TerminateProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs index ae620133de2..a7bec568812 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.TrimProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs index c41b363e571..d10668b2f9b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs index cc92a66dd15..bcc3b0851da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs @@ -66,17 +66,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propKeepOriginal.TryReadProperty(ref reader, options, PropKeepOriginal, null)) + if (propKeepOriginal.TryReadProperty(ref reader, options, PropKeepOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessor Read(ref continue; } - if (propRemoveIfSuccessful.TryReadProperty(ref reader, options, PropRemoveIfSuccessful, null)) + if (propRemoveIfSuccessful.TryReadProperty(ref reader, options, PropRemoveIfSuccessful, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,11 +132,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropKeepOriginal, value.KeepOriginal, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropKeepOriginal, value.KeepOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRemoveIfSuccessful, value.RemoveIfSuccessful, null, null); + writer.WriteProperty(options, PropRemoveIfSuccessful, value.RemoveIfSuccessful, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs index 5cd7f35f782..0872a673818 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs index f2c89acd4bb..f675d0151f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessor Read(ref continue; } - if (propExtractDeviceType.TryReadProperty(ref reader, options, PropExtractDeviceType, null)) + if (propExtractDeviceType.TryReadProperty(ref reader, options, PropExtractDeviceType, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,11 +138,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropExtractDeviceType, value.ExtractDeviceType, null, null); + writer.WriteProperty(options, PropExtractDeviceType, value.ExtractDeviceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropRegexFile, value.RegexFile, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs index 03b8f83ff3c..d9334b5b425 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.InlineGet Read(ref Syst continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.InlineGet Read(ref Syst continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.InlineGet Read(ref Syst } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -97,15 +97,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFound, value.Found, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); if (value.Metadata is not null) { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerRetriever.g.cs new file mode 100644 index 00000000000..23bcebc4138 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerRetriever.g.cs @@ -0,0 +1,235 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class InnerRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropNormalizer = System.Text.Json.JsonEncodedText.Encode("normalizer"); + private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); + private static readonly System.Text.Json.JsonEncodedText PropWeight = System.Text.Json.JsonEncodedText.Encode("weight"); + + public override Elastic.Clients.Elasticsearch.InnerRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propNormalizer = default; + LocalJsonValue propRetriever = default; + LocalJsonValue propWeight = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propNormalizer.TryReadProperty(ref reader, options, PropNormalizer, null)) + { + continue; + } + + if (propRetriever.TryReadProperty(ref reader, options, PropRetriever, null)) + { + continue; + } + + if (propWeight.TryReadProperty(ref reader, options, PropWeight, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Normalizer = propNormalizer.Value, + Retriever = propRetriever.Value, + Weight = propWeight.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.InnerRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropNormalizer, value.Normalizer, null, null); + writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); + writer.WriteProperty(options, PropWeight, value.Weight, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.InnerRetrieverConverter))] +public sealed partial class InnerRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetriever(Elastic.Clients.Elasticsearch.ScoreNormalizer normalizer, Elastic.Clients.Elasticsearch.Retriever retriever, float weight) + { + Normalizer = normalizer; + Retriever = retriever; + Weight = weight; + } +#if NET7_0_OR_GREATER + public InnerRetriever() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public InnerRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.ScoreNormalizer Normalizer { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Retriever Retriever { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + float Weight { get; set; } +} + +public readonly partial struct InnerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.InnerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) => new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Normalizer(Elastic.Clients.Elasticsearch.ScoreNormalizer value) + { + Instance.Normalizer = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Weight(float value) + { + Instance.Weight = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.InnerRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct InnerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.InnerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) => new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Normalizer(Elastic.Clients.Elasticsearch.ScoreNormalizer value) + { + Instance.Normalizer = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(System.Action action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Weight(float value) + { + Instance.Weight = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.InnerRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs index 3e96a50040e..757efad5f50 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json LocalJsonValue propSimilarity = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json continue; } - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, null)) + if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.KnnQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropQueryVector, value.QueryVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs index 2625c338e41..242567e04bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs @@ -29,6 +29,7 @@ internal sealed partial class KnnRetrieverConverter : System.Text.Json.Serializa private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropK = System.Text.Json.JsonEncodedText.Encode("k"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropNumCandidates = System.Text.Json.JsonEncodedText.Encode("num_candidates"); private static readonly System.Text.Json.JsonEncodedText PropQueryVector = System.Text.Json.JsonEncodedText.Encode("query_vector"); private static readonly System.Text.Json.JsonEncodedText PropQueryVectorBuilder = System.Text.Json.JsonEncodedText.Encode("query_vector_builder"); @@ -42,6 +43,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. LocalJsonValue?> propFilter = default; LocalJsonValue propK = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propNumCandidates = default; LocalJsonValue?> propQueryVector = default; LocalJsonValue propQueryVectorBuilder = default; @@ -64,7 +66,12 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; } @@ -89,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,6 +117,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. Filter = propFilter.Value, K = propK.Value, MinScore = propMinScore.Value, + Name = propName.Value, NumCandidates = propNumCandidates.Value, QueryVector = propQueryVector.Value, QueryVectorBuilder = propQueryVectorBuilder.Value, @@ -124,12 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, null); writer.WriteProperty(options, PropQueryVector, value.QueryVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -197,6 +206,13 @@ internal KnnRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// Number of nearest neighbor candidates to consider per shard. @@ -328,6 +344,17 @@ public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor MinScore( return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Number of nearest neighbor candidates to consider per shard. @@ -533,6 +560,17 @@ public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor MinScore(float? valu return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Number of nearest neighbor candidates to consider per shard. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs index d4e1b274902..06b073001e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso LocalJsonValue propSimilarity = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso continue; } - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, null)) + if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.KnnSearch value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryVector, value.QueryVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs index 7d786b70299..de26596cdb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.License Read(ref continue; } - if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, null)) + if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, null)) + if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.License Read(ref continue; } - if (propStartDateInMillis.TryReadProperty(ref reader, options, PropStartDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartDateInMillis.TryReadProperty(ref reader, options, PropStartDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -133,10 +133,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIssueDateInMillis, value.IssueDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssuedTo, value.IssuedTo, null, null); writer.WriteProperty(options, PropIssuer, value.Issuer, null, null); - writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, null); - writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, null); + writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSignature, value.Signature, null, null); - writer.WriteProperty(options, PropStartDateInMillis, value.StartDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStartDateInMillis, value.StartDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUid, value.Uid, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs index 5cfd081f890..f0a511d44be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformati LocalJsonValue propUid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpiryDate.TryReadProperty(ref reader, options, PropExpiryDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpiryDate.TryReadProperty(ref reader, options, PropExpiryDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExpiryDateInMillis.TryReadProperty(ref reader, options, PropExpiryDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpiryDateInMillis.TryReadProperty(ref reader, options, PropExpiryDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformati continue; } - if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, null)) + if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, null)) + if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,14 +145,14 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformati public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpiryDate, value.ExpiryDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropExpiryDateInMillis, value.ExpiryDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpiryDate, value.ExpiryDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExpiryDateInMillis, value.ExpiryDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssueDate, value.IssueDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropIssueDateInMillis, value.IssueDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssuedTo, value.IssuedTo, null, null); writer.WriteProperty(options, PropIssuer, value.Issuer, null, null); - writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, null); - writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, null); + writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStartDateInMillis, value.StartDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropStatus, value.Status, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearRetriever.g.cs new file mode 100644 index 00000000000..e339bd77146 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearRetriever.g.cs @@ -0,0 +1,460 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class LinearRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); + private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); + private static readonly System.Text.Json.JsonEncodedText PropRetrievers = System.Text.Json.JsonEncodedText.Encode("retrievers"); + + public override Elastic.Clients.Elasticsearch.LinearRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue?> propFilter = default; + LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; + LocalJsonValue propRankWindowSize = default; + LocalJsonValue?> propRetrievers = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propFilter.TryReadProperty(ref reader, options, PropFilter, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + { + continue; + } + + if (propRetrievers.TryReadProperty(ref reader, options, PropRetrievers, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Filter = propFilter.Value, + MinScore = propMinScore.Value, + Name = propName.Value, + RankWindowSize = propRankWindowSize.Value, + Retrievers = propRetrievers.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.LinearRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropRetrievers, value.Retrievers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.LinearRetrieverConverter))] +public sealed partial class LinearRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetriever(int rankWindowSize) + { + RankWindowSize = rankWindowSize; + } +#if NET7_0_OR_GREATER + public LinearRetriever() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public LinearRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public System.Collections.Generic.ICollection? Filter { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public float? MinScore { get; set; } + + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int RankWindowSize { get; set; } + + /// + /// + /// Inner retrievers. + /// + /// + public System.Collections.Generic.ICollection? Retrievers { get; set; } +} + +public readonly partial struct LinearRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.LinearRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) => new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(System.Collections.Generic.ICollection? value) + { + Instance.Retrievers = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params Elastic.Clients.Elasticsearch.InnerRetriever[] values) + { + Instance.Retrievers = [.. values]; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor.Build(action)); + } + + Instance.Retrievers = items; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.LinearRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct LinearRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.LinearRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) => new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(System.Collections.Generic.ICollection? value) + { + Instance.Retrievers = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params Elastic.Clients.Elasticsearch.InnerRetriever[] values) + { + Instance.Retrievers = [.. values]; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor.Build(action)); + } + + Instance.Retrievers = items; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor.Build(action)); + } + + Instance.Retrievers = items; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.LinearRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs index d12d38d3a77..e869ddcca30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AdaptiveAllocation continue; } - if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, null)) + if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, null)) + if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, null); - writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, null); + writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs index 6bf7eacc3b6..3a01ed0721b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfig Rea continue; } - if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, null)) + if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInfluencers, value.Influencers, null, null); writer.WriteProperty(options, PropLatency, value.Latency, null, null); writer.WriteProperty(options, PropModelPruneWindow, value.ModelPruneWindow, null, null); - writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, null); + writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerPartitionCategorization, value.PerPartitionCategorization, null, null); writer.WriteProperty(options, PropSummaryCountFieldName, value.SummaryCountFieldName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs index 96d0cf84fef..275d6ee826e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfigRead continue; } - if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, null)) + if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInfluencers, value.Influencers, null, null); writer.WriteProperty(options, PropLatency, value.Latency, null, null); writer.WriteProperty(options, PropModelPruneWindow, value.ModelPruneWindow, null, null); - writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, null); + writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerPartitionCategorization, value.PerPartitionCategorization, null, null); writer.WriteProperty(options, PropSummaryCountFieldName, value.SummaryCountFieldName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs index dd8414c6fb0..5b3bbc73df9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisLimits Rea LocalJsonValue propModelMemoryLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCategorizationExamplesLimit.TryReadProperty(ref reader, options, PropCategorizationExamplesLimit, null)) + if (propCategorizationExamplesLimit.TryReadProperty(ref reader, options, PropCategorizationExamplesLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisLimits Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.AnalysisLimits value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCategorizationExamplesLimit, value.CategorizationExamplesLimit, null, null); + writer.WriteProperty(options, PropCategorizationExamplesLimit, value.CategorizationExamplesLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs index 53b90b62bae..2608051edd8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation LocalJsonValue propUpperConfidenceBound = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAnomalyCharacteristicsImpact.TryReadProperty(ref reader, options, PropAnomalyCharacteristicsImpact, null)) + if (propAnomalyCharacteristicsImpact.TryReadProperty(ref reader, options, PropAnomalyCharacteristicsImpact, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAnomalyLength.TryReadProperty(ref reader, options, PropAnomalyLength, null)) + if (propAnomalyLength.TryReadProperty(ref reader, options, PropAnomalyLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,37 +66,37 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation continue; } - if (propHighVariancePenalty.TryReadProperty(ref reader, options, PropHighVariancePenalty, null)) + if (propHighVariancePenalty.TryReadProperty(ref reader, options, PropHighVariancePenalty, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncompleteBucketPenalty.TryReadProperty(ref reader, options, PropIncompleteBucketPenalty, null)) + if (propIncompleteBucketPenalty.TryReadProperty(ref reader, options, PropIncompleteBucketPenalty, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowerConfidenceBound.TryReadProperty(ref reader, options, PropLowerConfidenceBound, null)) + if (propLowerConfidenceBound.TryReadProperty(ref reader, options, PropLowerConfidenceBound, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMultiBucketImpact.TryReadProperty(ref reader, options, PropMultiBucketImpact, null)) + if (propMultiBucketImpact.TryReadProperty(ref reader, options, PropMultiBucketImpact, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSingleBucketImpact.TryReadProperty(ref reader, options, PropSingleBucketImpact, null)) + if (propSingleBucketImpact.TryReadProperty(ref reader, options, PropSingleBucketImpact, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTypicalValue.TryReadProperty(ref reader, options, PropTypicalValue, null)) + if (propTypicalValue.TryReadProperty(ref reader, options, PropTypicalValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpperConfidenceBound.TryReadProperty(ref reader, options, PropUpperConfidenceBound, null)) + if (propUpperConfidenceBound.TryReadProperty(ref reader, options, PropUpperConfidenceBound, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAnomalyCharacteristicsImpact, value.AnomalyCharacteristicsImpact, null, null); - writer.WriteProperty(options, PropAnomalyLength, value.AnomalyLength, null, null); + writer.WriteProperty(options, PropAnomalyCharacteristicsImpact, value.AnomalyCharacteristicsImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAnomalyLength, value.AnomalyLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnomalyType, value.AnomalyType, null, null); - writer.WriteProperty(options, PropHighVariancePenalty, value.HighVariancePenalty, null, null); - writer.WriteProperty(options, PropIncompleteBucketPenalty, value.IncompleteBucketPenalty, null, null); - writer.WriteProperty(options, PropLowerConfidenceBound, value.LowerConfidenceBound, null, null); - writer.WriteProperty(options, PropMultiBucketImpact, value.MultiBucketImpact, null, null); - writer.WriteProperty(options, PropSingleBucketImpact, value.SingleBucketImpact, null, null); - writer.WriteProperty(options, PropTypicalValue, value.TypicalValue, null, null); - writer.WriteProperty(options, PropUpperConfidenceBound, value.UpperConfidenceBound, null, null); + writer.WriteProperty(options, PropHighVariancePenalty, value.HighVariancePenalty, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncompleteBucketPenalty, value.IncompleteBucketPenalty, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowerConfidenceBound, value.LowerConfidenceBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMultiBucketImpact, value.MultiBucketImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSingleBucketImpact, value.SingleBucketImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTypicalValue, value.TypicalValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpperConfidenceBound, value.UpperConfidenceBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs index 728144ce700..6a083661574 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.BucketInfluencer R continue; } - if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -147,7 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRawAnomalyScore, value.RawAnomalyScore, null, null); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs index 6e21baafd59..a1d1aa46b6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.BucketSummary Read continue; } - if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -147,7 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropProcessingTimeMs, value.ProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs index 63058c73929..bd7e21aa60e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs @@ -67,17 +67,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CalendarEvent Read continue; } - if (propForceTimeShift.TryReadProperty(ref reader, options, PropForceTimeShift, null)) + if (propForceTimeShift.TryReadProperty(ref reader, options, PropForceTimeShift, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkipModelUpdate.TryReadProperty(ref reader, options, PropSkipModelUpdate, null)) + if (propSkipModelUpdate.TryReadProperty(ref reader, options, PropSkipModelUpdate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkipResult.TryReadProperty(ref reader, options, PropSkipResult, null)) + if (propSkipResult.TryReadProperty(ref reader, options, PropSkipResult, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,9 +117,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropEventId, value.EventId, null, null); - writer.WriteProperty(options, PropForceTimeShift, value.ForceTimeShift, null, null); - writer.WriteProperty(options, PropSkipModelUpdate, value.SkipModelUpdate, null, null); - writer.WriteProperty(options, PropSkipResult, value.SkipResult, null, null); + writer.WriteProperty(options, PropForceTimeShift, value.ForceTimeShift, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkipModelUpdate, value.SkipModelUpdate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkipResult, value.SkipResult, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs index 9f7fcf40f9a..594ca4dc5f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Category Read(ref continue; } - if (propNumMatches.TryReadProperty(ref reader, options, PropNumMatches, null)) + if (propNumMatches.TryReadProperty(ref reader, options, PropNumMatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -167,7 +167,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropMaxMatchingLength, value.MaxMatchingLength, null, null); writer.WriteProperty(options, PropMlcategory, value.Mlcategory, null, null); - writer.WriteProperty(options, PropNumMatches, value.NumMatches, null, null); + writer.WriteProperty(options, PropNumMatches, value.NumMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropP, value.P, null, null); writer.WriteProperty(options, PropPartitionFieldName, value.PartitionFieldName, null, null); writer.WriteProperty(options, PropPartitionFieldValue, value.PartitionFieldValue, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs index 08852730365..1bc4d270947 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ClassificationInfe LocalJsonValue propTopClassesResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ClassificationInfe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ClassificationInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldType, value.PredictionFieldType, null, null); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTopClassesResultsField, value.TopClassesResultsField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs index 00be60ce302..5dd3f7a6e1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataCounts Read(re continue; } - if (propEarliestRecordTimestamp.TryReadProperty(ref reader, options, PropEarliestRecordTimestamp, null)) + if (propEarliestRecordTimestamp.TryReadProperty(ref reader, options, PropEarliestRecordTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,32 +109,32 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataCounts Read(re continue; } - if (propLastDataTime.TryReadProperty(ref reader, options, PropLastDataTime, null)) + if (propLastDataTime.TryReadProperty(ref reader, options, PropLastDataTime, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestBucketTimestamp.TryReadProperty(ref reader, options, PropLatestBucketTimestamp, null)) + if (propLatestBucketTimestamp.TryReadProperty(ref reader, options, PropLatestBucketTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestEmptyBucketTimestamp.TryReadProperty(ref reader, options, PropLatestEmptyBucketTimestamp, null)) + if (propLatestEmptyBucketTimestamp.TryReadProperty(ref reader, options, PropLatestEmptyBucketTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestRecordTimestamp.TryReadProperty(ref reader, options, PropLatestRecordTimestamp, null)) + if (propLatestRecordTimestamp.TryReadProperty(ref reader, options, PropLatestRecordTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestSparseBucketTimestamp.TryReadProperty(ref reader, options, PropLatestSparseBucketTimestamp, null)) + if (propLatestSparseBucketTimestamp.TryReadProperty(ref reader, options, PropLatestSparseBucketTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLogTime.TryReadProperty(ref reader, options, PropLogTime, null)) + if (propLogTime.TryReadProperty(ref reader, options, PropLogTime, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -202,19 +202,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); - writer.WriteProperty(options, PropEarliestRecordTimestamp, value.EarliestRecordTimestamp, null, null); + writer.WriteProperty(options, PropEarliestRecordTimestamp, value.EarliestRecordTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropEmptyBucketCount, value.EmptyBucketCount, null, null); writer.WriteProperty(options, PropInputBytes, value.InputBytes, null, null); writer.WriteProperty(options, PropInputFieldCount, value.InputFieldCount, null, null); writer.WriteProperty(options, PropInputRecordCount, value.InputRecordCount, null, null); writer.WriteProperty(options, PropInvalidDateCount, value.InvalidDateCount, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropLastDataTime, value.LastDataTime, null, null); - writer.WriteProperty(options, PropLatestBucketTimestamp, value.LatestBucketTimestamp, null, null); - writer.WriteProperty(options, PropLatestEmptyBucketTimestamp, value.LatestEmptyBucketTimestamp, null, null); - writer.WriteProperty(options, PropLatestRecordTimestamp, value.LatestRecordTimestamp, null, null); - writer.WriteProperty(options, PropLatestSparseBucketTimestamp, value.LatestSparseBucketTimestamp, null, null); - writer.WriteProperty(options, PropLogTime, value.LogTime, null, null); + writer.WriteProperty(options, PropLastDataTime, value.LastDataTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestBucketTimestamp, value.LatestBucketTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestEmptyBucketTimestamp, value.LatestEmptyBucketTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestRecordTimestamp, value.LatestRecordTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestSparseBucketTimestamp, value.LatestSparseBucketTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLogTime, value.LogTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissingFieldCount, value.MissingFieldCount, null, null); writer.WriteProperty(options, PropOutOfOrderTimestampCount, value.OutOfOrderTimestampCount, null, null); writer.WriteProperty(options, PropProcessedFieldCount, value.ProcessedFieldCount, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs index b2c7e11250f..753ccee94dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Datafeed Read(ref continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,7 +139,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Datafeed Read(ref continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -188,12 +188,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs index 77242dd4b45..e1c8b249fef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs @@ -101,7 +101,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedConfig Rea continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,7 +126,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedConfig Rea continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -171,12 +171,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs index 509ba4b3624..f50d4fa5145 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedTimingStat LocalJsonValue propTotalSearchTimeMs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageSearchTimePerBucketMs.TryReadProperty(ref reader, options, PropAverageSearchTimePerBucketMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageSearchTimePerBucketMs.TryReadProperty(ref reader, options, PropAverageSearchTimePerBucketMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedTimingStat public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DatafeedTimingStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageSearchTimePerBucketMs, value.AverageSearchTimePerBucketMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageSearchTimePerBucketMs, value.AverageSearchTimePerBucketMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); writer.WriteProperty(options, PropExponentialAverageCalculationContext, value.ExponentialAverageCalculationContext, null, null); writer.WriteProperty(options, PropExponentialAverageSearchTimePerHourMs, value.ExponentialAverageSearchTimePerHourMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs index ed1b036a2f7..f9e3031c3e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC LocalJsonValue propTrainingPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, null)) + if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,27 +87,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC continue; } - if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, null)) + if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, null)) + if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEta.TryReadProperty(ref reader, options, PropEta, null)) + if (propEta.TryReadProperty(ref reader, options, PropEta, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, null)) + if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, null)) + if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,32 +117,32 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC continue; } - if (propGamma.TryReadProperty(ref reader, options, PropGamma, null)) + if (propGamma.TryReadProperty(ref reader, options, PropGamma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLambda.TryReadProperty(ref reader, options, PropLambda, null)) + if (propLambda.TryReadProperty(ref reader, options, PropLambda, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, null)) + if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, null) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, null)) + if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,17 +152,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC continue; } - if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, null)) + if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, null)) + if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, null)) + if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -210,25 +210,25 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisClassification value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlpha, value.Alpha, null, null); + writer.WriteProperty(options, PropAlpha, value.Alpha, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClassAssignmentObjective, value.ClassAssignmentObjective, null, null); writer.WriteProperty(options, PropDependentVariable, value.DependentVariable, null, null); - writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, null); - writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, null); - writer.WriteProperty(options, PropEta, value.Eta, null, null); - writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, null); - writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, null); + writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEta, value.Eta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeatureProcessors, value.FeatureProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropGamma, value.Gamma, null, null); - writer.WriteProperty(options, PropLambda, value.Lambda, null, null); - writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, null); - writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropGamma, value.Gamma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLambda, value.Lambda, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldName, value.PredictionFieldName, null, null); - writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, null); - writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, null); - writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, null); + writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrainingPercent, value.TrainingPercent, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs index c490af203fc..699aa4d1341 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCustom.TryReadProperty(ref reader, options, PropCustom, null)) + if (propCustom.TryReadProperty(ref reader, options, PropCustom, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF continue; } - if (propLength.TryReadProperty(ref reader, options, PropLength, null)) + if (propLength.TryReadProperty(ref reader, options, PropLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, null)) + if (propStart.TryReadProperty(ref reader, options, PropStart, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisFeatureProcessorNGramEncoding value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCustom, value.Custom, null, null); + writer.WriteProperty(options, PropCustom, value.Custom, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeaturePrefix, value.FeaturePrefix, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropLength, value.Length, null, null); + writer.WriteProperty(options, PropLength, value.Length, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNGrams, value.NGrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropStart, value.Start, null, null); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs index d77c6f16d76..2e433899141 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisO LocalJsonValue propStandardizationEnabled = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propComputeFeatureInfluence.TryReadProperty(ref reader, options, PropComputeFeatureInfluence, null)) + if (propComputeFeatureInfluence.TryReadProperty(ref reader, options, PropComputeFeatureInfluence, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFeatureInfluenceThreshold.TryReadProperty(ref reader, options, PropFeatureInfluenceThreshold, null)) + if (propFeatureInfluenceThreshold.TryReadProperty(ref reader, options, PropFeatureInfluenceThreshold, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisO continue; } - if (propNNeighbors.TryReadProperty(ref reader, options, PropNNeighbors, null)) + if (propNNeighbors.TryReadProperty(ref reader, options, PropNNeighbors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutlierFraction.TryReadProperty(ref reader, options, PropOutlierFraction, null)) + if (propOutlierFraction.TryReadProperty(ref reader, options, PropOutlierFraction, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStandardizationEnabled.TryReadProperty(ref reader, options, PropStandardizationEnabled, null)) + if (propStandardizationEnabled.TryReadProperty(ref reader, options, PropStandardizationEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisO public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisOutlierDetection value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropComputeFeatureInfluence, value.ComputeFeatureInfluence, null, null); - writer.WriteProperty(options, PropFeatureInfluenceThreshold, value.FeatureInfluenceThreshold, null, null); + writer.WriteProperty(options, PropComputeFeatureInfluence, value.ComputeFeatureInfluence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFeatureInfluenceThreshold, value.FeatureInfluenceThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMethod, value.Method, null, null); - writer.WriteProperty(options, PropNNeighbors, value.NNeighbors, null, null); - writer.WriteProperty(options, PropOutlierFraction, value.OutlierFraction, null, null); - writer.WriteProperty(options, PropStandardizationEnabled, value.StandardizationEnabled, null, null); + writer.WriteProperty(options, PropNNeighbors, value.NNeighbors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutlierFraction, value.OutlierFraction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStandardizationEnabled, value.StandardizationEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs index d714b6cddb8..64030936e1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR LocalJsonValue propTrainingPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, null)) + if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,27 +82,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, null)) + if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, null)) + if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEta.TryReadProperty(ref reader, options, PropEta, null)) + if (propEta.TryReadProperty(ref reader, options, PropEta, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, null)) + if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, null)) + if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propGamma.TryReadProperty(ref reader, options, PropGamma, null)) + if (propGamma.TryReadProperty(ref reader, options, PropGamma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLambda.TryReadProperty(ref reader, options, PropLambda, null)) + if (propLambda.TryReadProperty(ref reader, options, PropLambda, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,22 +127,22 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propLossFunctionParameter.TryReadProperty(ref reader, options, PropLossFunctionParameter, null)) + if (propLossFunctionParameter.TryReadProperty(ref reader, options, PropLossFunctionParameter, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, null)) + if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, null) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, null)) + if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,17 +152,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, null)) + if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, null)) + if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, null)) + if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -210,25 +210,25 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisRegression value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlpha, value.Alpha, null, null); + writer.WriteProperty(options, PropAlpha, value.Alpha, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDependentVariable, value.DependentVariable, null, null); - writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, null); - writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, null); - writer.WriteProperty(options, PropEta, value.Eta, null, null); - writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, null); - writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, null); + writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEta, value.Eta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeatureProcessors, value.FeatureProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropGamma, value.Gamma, null, null); - writer.WriteProperty(options, PropLambda, value.Lambda, null, null); + writer.WriteProperty(options, PropGamma, value.Gamma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLambda, value.Lambda, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLossFunction, value.LossFunction, null, null); - writer.WriteProperty(options, PropLossFunctionParameter, value.LossFunctionParameter, null, null); - writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, null); - writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropLossFunctionParameter, value.LossFunctionParameter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldName, value.PredictionFieldName, null, null); - writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, null); - writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, null); - writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, null); + writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrainingPercent, value.TrainingPercent, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs index 4edacb8e013..6b75e16a831 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics LocalJsonValue propTimestamp = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMemoryReestimateBytes.TryReadProperty(ref reader, options, PropMemoryReestimateBytes, null)) + if (propMemoryReestimateBytes.TryReadProperty(ref reader, options, PropMemoryReestimateBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsStatsMemoryUsage value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMemoryReestimateBytes, value.MemoryReestimateBytes, null, null); + writer.WriteProperty(options, PropMemoryReestimateBytes, value.MemoryReestimateBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPeakUsageBytes, value.PeakUsageBytes, null, null); writer.WriteProperty(options, PropStatus, value.Status, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs index 955d9cefccc..ef980fbb58c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,15 +153,15 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSummary value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); writer.WriteProperty(options, PropAuthorization, value.Authorization, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs index 9ae2088ecd1..4c82b9a88d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio continue; } - if (propIncludeCurve.TryReadProperty(ref reader, options, PropIncludeCurve, null)) + if (propIncludeCurve.TryReadProperty(ref reader, options, PropIncludeCurve, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClassName, value.ClassName, null, null); - writer.WriteProperty(options, PropIncludeCurve, value.IncludeCurve, null, null); + writer.WriteProperty(options, PropIncludeCurve, value.IncludeCurve, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs index 083a5cbd37f..75ade7ef216 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio LocalJsonValue propDelta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDelta.TryReadProperty(ref reader, options, PropDelta, null)) + if (propDelta.TryReadProperty(ref reader, options, PropDelta, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluationRegressionMetricsHuber value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDelta, value.Delta, null, null); + writer.WriteProperty(options, PropDelta, value.Delta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs index 1ca8cf39e01..c8351f60ebd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio LocalJsonValue propOffset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOffset.TryReadProperty(ref reader, options, PropOffset, null)) + if (propOffset.TryReadProperty(ref reader, options, PropOffset, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluationRegressionMetricsMsle value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOffset, value.Offset, null, null); + writer.WriteProperty(options, PropOffset, value.Offset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs index d2c74fbf910..69e3769a798 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewCo continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs index 54c5e795de9..52b774d1ad6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Detector Read(ref continue; } - if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, null)) + if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, null)) + if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, static Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Detector Read(ref continue; } - if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, null)) + if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropByFieldName, value.ByFieldName, null, null); writer.WriteProperty(options, PropCustomRules, value.CustomRules, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDetectorDescription, value.DetectorDescription, null, null); - writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, null); - writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, null); + writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldName, value.FieldName, null, null); writer.WriteProperty(options, PropFunction, value.Function, null, null); writer.WriteProperty(options, PropOverFieldName, value.OverFieldName, null, null); writer.WriteProperty(options, PropPartitionFieldName, value.PartitionFieldName, null, null); - writer.WriteProperty(options, PropUseNull, value.UseNull, null, null); + writer.WriteProperty(options, PropUseNull, value.UseNull, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs index e2a0dd70c88..82d7f57ecab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DetectorRead Read( continue; } - if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, null)) + if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, null)) + if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, static Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DetectorRead Read( continue; } - if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, null)) + if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropByFieldName, value.ByFieldName, null, null); writer.WriteProperty(options, PropCustomRules, value.CustomRules, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDetectorDescription, value.DetectorDescription, null, null); - writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, null); - writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, null); + writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldName, value.FieldName, null, null); writer.WriteProperty(options, PropFunction, value.Function, null, null); writer.WriteProperty(options, PropOverFieldName, value.OverFieldName, null, null); writer.WriteProperty(options, PropPartitionFieldName, value.PartitionFieldName, null, null); - writer.WriteProperty(options, PropUseNull, value.UseNull, null, null); + writer.WriteProperty(options, PropUseNull, value.UseNull, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs index f9a306941b0..154069553a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExponentialAverage continue; } - if (propLatestTimestamp.TryReadProperty(ref reader, options, PropLatestTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propLatestTimestamp.TryReadProperty(ref reader, options, PropLatestTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propPreviousExponentialAverageMs.TryReadProperty(ref reader, options, PropPreviousExponentialAverageMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propPreviousExponentialAverageMs.TryReadProperty(ref reader, options, PropPreviousExponentialAverageMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIncrementalMetricValueMs, value.IncrementalMetricValueMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropLatestTimestamp, value.LatestTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropPreviousExponentialAverageMs, value.PreviousExponentialAverageMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropLatestTimestamp, value.LatestTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropPreviousExponentialAverageMs, value.PreviousExponentialAverageMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs index edb30011fca..7a211e3d0c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceO continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaskToken, value.MaskToken, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteProperty(options, PropVocabulary, value.Vocabulary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs index 26750344e69..7495768c552 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceU LocalJsonValue propTokenization = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceU public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceUpdateOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs index a97cacb7104..a045392302b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FilterRef Read(ref continue; } - if (propFilterType.TryReadProperty(ref reader, options, PropFilterType, null)) + if (propFilterType.TryReadProperty(ref reader, options, PropFilterType, static Elastic.Clients.Elasticsearch.MachineLearning.FilterType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilterId, value.FilterId, null, null); - writer.WriteProperty(options, PropFilterType, value.FilterType, null, null); + writer.WriteProperty(options, PropFilterType, value.FilterType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.FilterType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs index 1a266d5b7d9..893ec048cd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter Rea LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAbsoluteImportance.TryReadProperty(ref reader, options, PropAbsoluteImportance, null)) + if (propAbsoluteImportance.TryReadProperty(ref reader, options, PropAbsoluteImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter Rea continue; } - if (propRelativeImportance.TryReadProperty(ref reader, options, PropRelativeImportance, null)) + if (propRelativeImportance.TryReadProperty(ref reader, options, PropRelativeImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAbsoluteImportance, value.AbsoluteImportance, null, null); + writer.WriteProperty(options, PropAbsoluteImportance, value.AbsoluteImportance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropRelativeImportance, value.RelativeImportance, null, null); + writer.WriteProperty(options, PropRelativeImportance, value.RelativeImportance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSupplied, value.Supplied, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs index 123fb584671..1a48dfb655d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.InferenceResponseR continue; } - if (propIsTruncated.TryReadProperty(ref reader, options, PropIsTruncated, null)) + if (propIsTruncated.TryReadProperty(ref reader, options, PropIsTruncated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.InferenceResponseR continue; } - if (propPredictionProbability.TryReadProperty(ref reader, options, PropPredictionProbability, null)) + if (propPredictionProbability.TryReadProperty(ref reader, options, PropPredictionProbability, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPredictionScore.TryReadProperty(ref reader, options, PropPredictionScore, null)) + if (propPredictionScore.TryReadProperty(ref reader, options, PropPredictionScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -123,11 +123,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEntities, value.Entities, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropFeatureImportance, value.FeatureImportance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIsTruncated, value.IsTruncated, null, null); + writer.WriteProperty(options, PropIsTruncated, value.IsTruncated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictedValue, value.PredictedValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); writer.WriteProperty(options, PropPredictedValueSequence, value.PredictedValueSequence, null, null); - writer.WriteProperty(options, PropPredictionProbability, value.PredictionProbability, null, null); - writer.WriteProperty(options, PropPredictionScore, value.PredictionScore, null, null); + writer.WriteProperty(options, PropPredictionProbability, value.PredictionProbability, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPredictionScore, value.PredictionScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTopClasses, value.TopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropWarning, value.Warning, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs index f2943c7e2c8..375af9b2ac3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs @@ -102,7 +102,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, null)) + if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,7 +127,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, null)) + if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,7 +137,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -177,7 +177,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -187,7 +187,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -238,14 +238,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalysisLimits, value.AnalysisLimits, null, null); writer.WriteProperty(options, PropBackgroundPersistInterval, value.BackgroundPersistInterval, null, null); writer.WriteProperty(options, PropBlocked, value.Blocked, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropCustomSettings, value.CustomSettings, null, null); - writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, null); + writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataDescription, value.DataDescription, null, null); writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); - writer.WriteProperty(options, PropDeleting, value.Deleting, null, null); + writer.WriteProperty(options, PropDeleting, value.Deleting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropGroups, value.Groups, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropJobType, value.JobType, null, null); @@ -253,9 +253,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs index 92ba4fda1dc..be6a246d76d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobStats Read(ref continue; } - if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, null)) + if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobStats Read(ref continue; } - if (propOpenTime.TryReadProperty(ref reader, options, PropOpenTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propOpenTime.TryReadProperty(ref reader, options, PropOpenTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -131,12 +131,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAssignmentExplanation, value.AssignmentExplanation, null, null); writer.WriteProperty(options, PropDataCounts, value.DataCounts, null, null); - writer.WriteProperty(options, PropDeleting, value.Deleting, null, null); + writer.WriteProperty(options, PropDeleting, value.Deleting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropForecastsStats, value.ForecastsStats, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelSizeStats, value.ModelSizeStats, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); - writer.WriteProperty(options, PropOpenTime, value.OpenTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropOpenTime, value.OpenTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropState, value.State, null, null); writer.WriteProperty(options, PropTimingStats, value.TimingStats, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs index 364ff2fd7a4..6be5fe2fe10 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea LocalJsonValue propTotalBucketProcessingTimeMs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea continue; } - if (propExponentialAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropExponentialAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propExponentialAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropExponentialAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea continue; } - if (propMaximumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMaximumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMaximumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMaximumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propMinimumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMinimumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMinimumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMinimumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -113,13 +113,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageBucketProcessingTimeMs, value.AverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageBucketProcessingTimeMs, value.AverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); - writer.WriteProperty(options, PropExponentialAverageBucketProcessingTimeMs, value.ExponentialAverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropExponentialAverageBucketProcessingTimeMs, value.ExponentialAverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropExponentialAverageBucketProcessingTimePerHourMs, value.ExponentialAverageBucketProcessingTimePerHourMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaximumBucketProcessingTimeMs, value.MaximumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropMinimumBucketProcessingTimeMs, value.MinimumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMaximumBucketProcessingTimeMs, value.MaximumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMinimumBucketProcessingTimeMs, value.MinimumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropTotalBucketProcessingTimeMs, value.TotalBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs index 022e2a46f55..fbc671aa8d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Limits Read(ref Sy continue; } - if (propMaxSingleMlNodeProcessors.TryReadProperty(ref reader, options, PropMaxSingleMlNodeProcessors, null)) + if (propMaxSingleMlNodeProcessors.TryReadProperty(ref reader, options, PropMaxSingleMlNodeProcessors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Limits Read(ref Sy continue; } - if (propTotalMlProcessors.TryReadProperty(ref reader, options, PropTotalMlProcessors, null)) + if (propTotalMlProcessors.TryReadProperty(ref reader, options, PropTotalMlProcessors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEffectiveMaxModelMemoryLimit, value.EffectiveMaxModelMemoryLimit, null, null); writer.WriteProperty(options, PropMaxModelMemoryLimit, value.MaxModelMemoryLimit, null, null); - writer.WriteProperty(options, PropMaxSingleMlNodeProcessors, value.MaxSingleMlNodeProcessors, null, null); + writer.WriteProperty(options, PropMaxSingleMlNodeProcessors, value.MaxSingleMlNodeProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalMlMemory, value.TotalMlMemory, null, null); - writer.WriteProperty(options, PropTotalMlProcessors, value.TotalMlProcessors, null, null); + writer.WriteProperty(options, PropTotalMlProcessors, value.TotalMlProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs index af574532ceb..e9e903f0220 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPackageConfig LocalJsonValue propVocabularyFile = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -161,7 +161,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPackageConfig public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ModelPackageConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs index 432d22547d8..74d2a5931e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs @@ -37,12 +37,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPlotConfig Re LocalJsonValue propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAnnotationsEnabled.TryReadProperty(ref reader, options, PropAnnotationsEnabled, null)) + if (propAnnotationsEnabled.TryReadProperty(ref reader, options, PropAnnotationsEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,8 +73,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPlotConfig Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ModelPlotConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAnnotationsEnabled, value.AnnotationsEnabled, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropAnnotationsEnabled, value.AnnotationsEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTerms, value.Terms, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs index 595fb1b9af8..8ba7eb35939 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs @@ -160,7 +160,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelSizeStats Rea continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -242,7 +242,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPeakModelBytes, value.PeakModelBytes, null, null); writer.WriteProperty(options, PropRareCategoryCount, value.RareCategoryCount, null, null); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalByFieldCount, value.TotalByFieldCount, null, null); writer.WriteProperty(options, PropTotalCategoryCount, value.TotalCategoryCount, null, null); writer.WriteProperty(options, PropTotalOverFieldCount, value.TotalOverFieldCount, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs index f8e7025a2e7..2c63809a87e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs @@ -61,12 +61,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelSnapshot Read continue; } - if (propLatestRecordTimeStamp.TryReadProperty(ref reader, options, PropLatestRecordTimeStamp, null)) + if (propLatestRecordTimeStamp.TryReadProperty(ref reader, options, PropLatestRecordTimeStamp, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestResultTimeStamp.TryReadProperty(ref reader, options, PropLatestResultTimeStamp, null)) + if (propLatestResultTimeStamp.TryReadProperty(ref reader, options, PropLatestResultTimeStamp, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,8 +131,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropLatestRecordTimeStamp, value.LatestRecordTimeStamp, null, null); - writer.WriteProperty(options, PropLatestResultTimeStamp, value.LatestResultTimeStamp, null, null); + writer.WriteProperty(options, PropLatestRecordTimeStamp, value.LatestRecordTimeStamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestResultTimeStamp, value.LatestResultTimeStamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinVersion, value.MinVersion, null, null); writer.WriteProperty(options, PropModelSizeStats, value.ModelSizeStats, null, null); writer.WriteProperty(options, PropRetain, value.Retain, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs index 2902d6e024e..3345ba50678 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs @@ -41,27 +41,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpBertTokenizatio LocalJsonValue propWithSpecialTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, null)) + if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, null)) + if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, null)) + if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpBertTokenizatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.NlpBertTokenizationConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, null); - writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, null); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); - writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, null); + writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs index 9aa5b04df80..521b29cdb9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpRobertaTokeniza LocalJsonValue propWithSpecialTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAddPrefixSpace.TryReadProperty(ref reader, options, PropAddPrefixSpace, null)) + if (propAddPrefixSpace.TryReadProperty(ref reader, options, PropAddPrefixSpace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, null)) + if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, null)) + if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, null)) + if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpRobertaTokeniza public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.NlpRobertaTokenizationConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAddPrefixSpace, value.AddPrefixSpace, null, null); - writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, null); - writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, null); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); - writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, null); + writer.WriteProperty(options, PropAddPrefixSpace, value.AddPrefixSpace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs index a664c82e64f..de9407568bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpTokenizationUpd LocalJsonValue propTruncate = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpTokenizationUpd public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.NlpTokenizationUpdateOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs index a2152a3cf17..6a605780719 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.OverallBucket Read continue; } - if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -111,7 +111,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropOverallScore, value.OverallScore, null, null); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs index 50bc0409b47..8a2e6240be8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Page Read(ref Syst LocalJsonValue propSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Page Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.Page value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs index 45fd29983cb..4ac9aa8443f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PerPartitionCatego LocalJsonValue propStopOnWarn = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStopOnWarn.TryReadProperty(ref reader, options, PropStopOnWarn, null)) + if (propStopOnWarn.TryReadProperty(ref reader, options, PropStopOnWarn, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PerPartitionCatego public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.PerPartitionCategorization value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropStopOnWarn, value.StopOnWarn, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStopOnWarn, value.StopOnWarn, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs index c1102a62db5..ed6caac50b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QueryFeatureExtrac LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDefaultScore.TryReadProperty(ref reader, options, PropDefaultScore, null)) + if (propDefaultScore.TryReadProperty(ref reader, options, PropDefaultScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QueryFeatureExtrac public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.QueryFeatureExtractor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDefaultScore, value.DefaultScore, null, null); + writer.WriteProperty(options, PropDefaultScore, value.DefaultScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeatureName, value.FeatureName, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs index 52636601311..fe30b1b01b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI LocalJsonValue propTokenization = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, null)) + if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,8 +81,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs index cfdcc7af759..a36a9a647ce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI LocalJsonValue propTokenization = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, null)) + if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringInferenceUpdateOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuestion, value.Question, null, null); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs index fa3ef84e1d6..743d684eabf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RegressionInferenc LocalJsonValue propResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RegressionInferenc public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.RegressionInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs index 1dd085b1cd1..5110562d5af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextClassification continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClassificationLabels, value.ClassificationLabels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteProperty(options, PropVocabulary, value.Vocabulary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs index 2b8941efac8..6be011e9cab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextClassification continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClassificationLabels, value.ClassificationLabels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs index 25437e0274c..3e23ac87a11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextEmbeddingInfer LocalJsonValue propVocabulary = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEmbeddingSize.TryReadProperty(ref reader, options, PropEmbeddingSize, null)) + if (propEmbeddingSize.TryReadProperty(ref reader, options, PropEmbeddingSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextEmbeddingInfer public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.TextEmbeddingInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEmbeddingSize, value.EmbeddingSize, null, null); + writer.WriteProperty(options, PropEmbeddingSize, value.EmbeddingSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteProperty(options, PropVocabulary, value.Vocabulary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs index 4f995474ce2..3fa8047e4cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelAssign continue; } - if (propMaxAssignedAllocations.TryReadProperty(ref reader, options, PropMaxAssignedAllocations, null)) + if (propMaxAssignedAllocations.TryReadProperty(ref reader, options, PropMaxAssignedAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); writer.WriteProperty(options, PropAssignmentState, value.AssignmentState, null, null); - writer.WriteProperty(options, PropMaxAssignedAllocations, value.MaxAssignedAllocations, null, null); + writer.WriteProperty(options, PropMaxAssignedAllocations, value.MaxAssignedAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReason, value.Reason, null, null); writer.WriteProperty(options, PropRoutingTable, value.RoutingTable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs index 020a88aab20..5c4d98fae9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelConfig continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelConfig continue; } - if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, null)) + if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, null)) + if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, null)) + if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,7 +153,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelConfig continue; } - if (propModelType.TryReadProperty(ref reader, options, PropModelType, null)) + if (propModelType.TryReadProperty(ref reader, options, PropModelType, static Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -219,12 +219,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCompressedDefinition, value.CompressedDefinition, null, null); writer.WriteProperty(options, PropCreatedBy, value.CreatedBy, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDefaultFieldMap, value.DefaultFieldMap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, null); - writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, null); - writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, null); + writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInput, value.Input, null, null); writer.WriteProperty(options, PropLicenseLevel, value.LicenseLevel, null, null); @@ -233,7 +233,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropModelPackage, value.ModelPackage, null, null); writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, null); - writer.WriteProperty(options, PropModelType, value.ModelType, null, null); + writer.WriteProperty(options, PropModelType, value.ModelType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPlatformArchitecture, value.PlatformArchitecture, null, null); writer.WriteProperty(options, PropPrefixStrings, value.PrefixStrings, null, null); writer.WriteProperty(options, PropTags, value.Tags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs index 82fb4e35a7c..882af60f97e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs @@ -67,42 +67,42 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy LocalJsonValue propTimeoutCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageInferenceTimeMs.TryReadProperty(ref reader, options, PropAverageInferenceTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageInferenceTimeMs.TryReadProperty(ref reader, options, PropAverageInferenceTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propAverageInferenceTimeMsExcludingCacheHits.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsExcludingCacheHits, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageInferenceTimeMsExcludingCacheHits.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsExcludingCacheHits, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propAverageInferenceTimeMsLastMinute.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsLastMinute, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageInferenceTimeMsLastMinute.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsLastMinute, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, null)) + if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCacheHitCount.TryReadProperty(ref reader, options, PropInferenceCacheHitCount, null)) + if (propInferenceCacheHitCount.TryReadProperty(ref reader, options, PropInferenceCacheHitCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCacheHitCountLastMinute.TryReadProperty(ref reader, options, PropInferenceCacheHitCountLastMinute, null)) + if (propInferenceCacheHitCountLastMinute.TryReadProperty(ref reader, options, PropInferenceCacheHitCountLastMinute, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, null)) + if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLastAccess.TryReadProperty(ref reader, options, PropLastAccess, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propLastAccess.TryReadProperty(ref reader, options, PropLastAccess, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, null)) + if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfPendingRequests.TryReadProperty(ref reader, options, PropNumberOfPendingRequests, null)) + if (propNumberOfPendingRequests.TryReadProperty(ref reader, options, PropNumberOfPendingRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,7 +127,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, null)) + if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,12 +137,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, null)) + if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,7 +152,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, null)) + if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -193,24 +193,24 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploymentNodesStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageInferenceTimeMs, value.AverageInferenceTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropAverageInferenceTimeMsExcludingCacheHits, value.AverageInferenceTimeMsExcludingCacheHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropAverageInferenceTimeMsLastMinute, value.AverageInferenceTimeMsLastMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, null); - writer.WriteProperty(options, PropInferenceCacheHitCount, value.InferenceCacheHitCount, null, null); - writer.WriteProperty(options, PropInferenceCacheHitCountLastMinute, value.InferenceCacheHitCountLastMinute, null, null); - writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, null); - writer.WriteProperty(options, PropLastAccess, value.LastAccess, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropAverageInferenceTimeMs, value.AverageInferenceTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageInferenceTimeMsExcludingCacheHits, value.AverageInferenceTimeMsExcludingCacheHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageInferenceTimeMsLastMinute, value.AverageInferenceTimeMsLastMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCacheHitCount, value.InferenceCacheHitCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCacheHitCountLastMinute, value.InferenceCacheHitCountLastMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLastAccess, value.LastAccess, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropNode, value.Node, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair? v) => w.WriteKeyValuePairValue(o, v, null, null)); - writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, null); - writer.WriteProperty(options, PropNumberOfPendingRequests, value.NumberOfPendingRequests, null, null); + writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfPendingRequests, value.NumberOfPendingRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPeakThroughputPerMinute, value.PeakThroughputPerMinute, null, null); - writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, null); + writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoutingState, value.RoutingState, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, null); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropThroughputLastMinute, value.ThroughputLastMinute, null, null); - writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, null); + writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs index 74d0a1fa91f..3f2ed9e0782 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs @@ -87,12 +87,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, null)) + if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, null)) + if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, null)) + if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,7 +122,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propQueueCapacity.TryReadProperty(ref reader, options, PropQueueCapacity, null)) + if (propQueueCapacity.TryReadProperty(ref reader, options, PropQueueCapacity, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,7 +132,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, null)) + if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -142,17 +142,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propState.TryReadProperty(ref reader, options, PropState, null)) + if (propState.TryReadProperty(ref reader, options, PropState, static Elastic.Clients.Elasticsearch.MachineLearning.DeploymentAssignmentState? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, null)) + if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, null)) + if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -197,20 +197,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllocationStatus, value.AllocationStatus, null, null); writer.WriteProperty(options, PropCacheSize, value.CacheSize, null, null); writer.WriteProperty(options, PropDeploymentId, value.DeploymentId, null, null); - writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, null); - writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, null); + writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropNodes, value.Nodes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, null); + writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPeakThroughputPerMinute, value.PeakThroughputPerMinute, null, null); writer.WriteProperty(options, PropPriority, value.Priority, null, null); - writer.WriteProperty(options, PropQueueCapacity, value.QueueCapacity, null, null); + writer.WriteProperty(options, PropQueueCapacity, value.QueueCapacity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReason, value.Reason, null, null); - writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, null); + writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropState, value.State, null, null); - writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, null); - writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, null); + writer.WriteProperty(options, PropState, value.State, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.DeploymentAssignmentState? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs index a997e9f1320..395abb3f6d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelInfere continue; } - if (propImportance.TryReadProperty(ref reader, options, PropImportance, null)) + if (propImportance.TryReadProperty(ref reader, options, PropImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropClasses, value.Classes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropFeatureName, value.FeatureName, null, null); - writer.WriteProperty(options, PropImportance, value.Importance, null, null); + writer.WriteProperty(options, PropImportance, value.Importance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs index c0c23ace428..03e8f15cc5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs @@ -54,17 +54,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelTreeNo continue; } - if (propDefaultLeft.TryReadProperty(ref reader, options, PropDefaultLeft, null)) + if (propDefaultLeft.TryReadProperty(ref reader, options, PropDefaultLeft, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLeafValue.TryReadProperty(ref reader, options, PropLeafValue, null)) + if (propLeafValue.TryReadProperty(ref reader, options, PropLeafValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLeftChild.TryReadProperty(ref reader, options, PropLeftChild, null)) + if (propLeftChild.TryReadProperty(ref reader, options, PropLeftChild, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,22 +74,22 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelTreeNo continue; } - if (propRightChild.TryReadProperty(ref reader, options, PropRightChild, null)) + if (propRightChild.TryReadProperty(ref reader, options, PropRightChild, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitFeature.TryReadProperty(ref reader, options, PropSplitFeature, null)) + if (propSplitFeature.TryReadProperty(ref reader, options, PropSplitFeature, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitGain.TryReadProperty(ref reader, options, PropSplitGain, null)) + if (propSplitGain.TryReadProperty(ref reader, options, PropSplitGain, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propThreshold.TryReadProperty(ref reader, options, PropThreshold, null)) + if (propThreshold.TryReadProperty(ref reader, options, PropThreshold, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,14 +122,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDecisionType, value.DecisionType, null, null); - writer.WriteProperty(options, PropDefaultLeft, value.DefaultLeft, null, null); - writer.WriteProperty(options, PropLeafValue, value.LeafValue, null, null); - writer.WriteProperty(options, PropLeftChild, value.LeftChild, null, null); + writer.WriteProperty(options, PropDefaultLeft, value.DefaultLeft, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLeafValue, value.LeafValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLeftChild, value.LeftChild, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNodeIndex, value.NodeIndex, null, null); - writer.WriteProperty(options, PropRightChild, value.RightChild, null, null); - writer.WriteProperty(options, PropSplitFeature, value.SplitFeature, null, null); - writer.WriteProperty(options, PropSplitGain, value.SplitGain, null, null); - writer.WriteProperty(options, PropThreshold, value.Threshold, null, null); + writer.WriteProperty(options, PropRightChild, value.RightChild, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitFeature, value.SplitFeature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitGain, value.SplitGain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropThreshold, value.Threshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs index 0e4f03a24f8..7faa03118e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs @@ -41,27 +41,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.XlmRobertaTokeniza LocalJsonValue propWithSpecialTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, null)) + if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, null)) + if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, null)) + if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.XlmRobertaTokeniza public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.XlmRobertaTokenizationConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, null); - writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, null); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); - writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, null); + writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs index cc838106081..6800d6ee885 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ZeroShotClassifica continue; } - if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, null)) + if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClassificationLabels, value.ClassificationLabels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropHypothesisTemplate, value.HypothesisTemplate, null, null); writer.WriteProperty(options, PropLabels, value.Labels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMultiLabel, value.MultiLabel, null, null); + writer.WriteProperty(options, PropMultiLabel, value.MultiLabel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs index 1397aa5982b..b8ec648f3cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ZeroShotClassifica continue; } - if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, null)) + if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLabels, value.Labels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMultiLabel, value.MultiLabel, null, null); + writer.WriteProperty(options, PropMultiLabel, value.MultiLabel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs index cb6ab28d31f..c2779988f79 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.AggregateMetricDoublePrope continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.AggregateMetricDoublePrope continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.AggregateMetricDoublePrope continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDefaultMetric, value.DefaultMetric, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropMetrics, value.Metrics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs index e876e8c452b..c8e83d3a3ce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BinaryProperty Read(ref Sy continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.BinaryProperty Read(ref Sy continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BinaryProperty Read(ref Sy continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs index b7c6ef3ec61..d658d5f1425 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S LocalJsonValue propTimeSeriesDimension = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,12 +76,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,17 +96,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,12 +116,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -136,17 +136,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -192,23 +192,23 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.BooleanProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs index e3aa8d3565f..c52cb587eac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static byte? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, byte? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs index fb08a98c18e..e5a684fe19d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -77,12 +77,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,12 +92,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInputLength.TryReadProperty(ref reader, options, PropMaxInputLength, null)) + if (propMaxInputLength.TryReadProperty(ref reader, options, PropMaxInputLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,12 +107,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propPreservePositionIncrements.TryReadProperty(ref reader, options, PropPreservePositionIncrements, null)) + if (propPreservePositionIncrements.TryReadProperty(ref reader, options, PropPreservePositionIncrements, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveSeparators.TryReadProperty(ref reader, options, PropPreserveSeparators, null)) + if (propPreserveSeparators.TryReadProperty(ref reader, options, PropPreserveSeparators, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,18 +179,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropContexts, value.Contexts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropMaxInputLength, value.MaxInputLength, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInputLength, value.MaxInputLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPreservePositionIncrements, value.PreservePositionIncrements, null, null); - writer.WriteProperty(options, PropPreserveSeparators, value.PreserveSeparators, null, null); + writer.WriteProperty(options, PropPreservePositionIncrements, value.PreservePositionIncrements, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveSeparators, value.PreserveSeparators, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs index 745b951a28e..0552f59c865 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,7 +71,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs index d5c4839fb17..3f6bb929cbc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs index 5403a3d5cf2..8308bbaf535 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,12 +76,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,17 +96,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,17 +116,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, null)) + if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,12 +141,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -192,23 +192,23 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); - writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs index 300216c795a..4db4d7c1fa3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,12 +80,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,17 +105,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,17 +130,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, null)) + if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,12 +155,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -208,25 +208,25 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DateProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); - writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs index c1fbe6edf8f..721ef629a94 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,12 +93,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,19 +160,19 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs index 6c5d0af94dd..c7303601b11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions Re LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConfidenceInterval.TryReadProperty(ref reader, options, PropConfidenceInterval, null)) + if (propConfidenceInterval.TryReadProperty(ref reader, options, PropConfidenceInterval, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEfConstruction.TryReadProperty(ref reader, options, PropEfConstruction, null)) + if (propEfConstruction.TryReadProperty(ref reader, options, PropEfConstruction, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propM.TryReadProperty(ref reader, options, PropM, null)) + if (propM.TryReadProperty(ref reader, options, PropM, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConfidenceInterval, value.ConfidenceInterval, null, null); - writer.WriteProperty(options, PropEfConstruction, value.EfConstruction, null, null); - writer.WriteProperty(options, PropM, value.M, null, null); + writer.WriteProperty(options, PropConfidenceInterval, value.ConfidenceInterval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEfConstruction, value.EfConstruction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropM, value.M, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs index fb0e1a963ad..95bdd0b7c8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs @@ -54,17 +54,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDims.TryReadProperty(ref reader, options, PropDims, null)) + if (propDims.TryReadProperty(ref reader, options, PropDims, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propElementType.TryReadProperty(ref reader, options, PropElementType, null)) + if (propElementType.TryReadProperty(ref reader, options, PropElementType, static Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -144,17 +144,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDims, value.Dims, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropElementType, value.ElementType, null, null); + writer.WriteProperty(options, PropDims, value.Dims, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropElementType, value.ElementType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs index 3df5bb65fea..cbbf2324a73 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs index 7c8eb06b433..46aef4c0cf7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs index 22cfb98740d..95e50ae9c60 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,22 +114,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -144,27 +144,27 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, null)) + if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,7 +184,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -194,17 +194,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, null)) + if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, null)) + if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -229,22 +229,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, null)) + if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, static Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -305,36 +305,36 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); - writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexPrefixes, value.IndexPrefixes, null, null); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); - writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, null); - writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); writer.WriteProperty(options, PropSearchQuoteAnalyzer, value.SearchQuoteAnalyzer, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTermVector, value.TermVector, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTermVector, value.TermVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs index 3b5530ee031..8aa4a5505b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate Read(ref S continue; } - if (propMatchPattern.TryReadProperty(ref reader, options, PropMatchPattern, null)) + if (propMatchPattern.TryReadProperty(ref reader, options, PropMatchPattern, static Elastic.Clients.Elasticsearch.Mapping.MatchType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -143,7 +143,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMatch, value.Match, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMatchMappingType, value.MatchMappingType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMatchPattern, value.MatchPattern, null, null); + writer.WriteProperty(options, PropMatchPattern, value.MatchPattern, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.MatchType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPathMatch, value.PathMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropPathUnmatch, value.PathUnmatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropUnmatch, value.Unmatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs index 9d5e3704a1e..85020207303 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs index 93c85f39f5a..1b463444c59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs @@ -62,27 +62,27 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDepthLimit.TryReadProperty(ref reader, options, PropDepthLimit, null)) + if (propDepthLimit.TryReadProperty(ref reader, options, PropDepthLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,17 +92,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref continue; } - if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, null)) + if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -176,21 +176,21 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropDepthLimit, value.DepthLimit, null, null); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDepthLimit, value.DepthLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs index dea713017d3..6552082019b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs index 287a7928cb7..507824ff8db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs index fb1f38600e3..a50990daf9b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs @@ -67,12 +67,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,22 +82,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,20 +177,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs index 5463cc871cc..53fd20bc316 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,22 +87,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, null)) + if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, static Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,17 +122,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStrategy.TryReadProperty(ref reader, options, PropStrategy, null)) + if (propStrategy.TryReadProperty(ref reader, options, PropStrategy, static Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -176,21 +176,21 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropOrientation, value.Orientation, null, null); + writer.WriteProperty(options, PropOrientation, value.Orientation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropStrategy, value.Strategy, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStrategy, value.Strategy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs index c7214bd5462..0b0f1fc3496 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs index 2aafaa6a2a3..5c22b48282d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.HistogramProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs index d0af9e5dc94..c1436301755 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs @@ -82,17 +82,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( LocalJsonValue propVariant = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, null)) + if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, null)) + if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, null)) + if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,17 +107,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, null)) + if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,22 +127,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, null)) + if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -157,7 +157,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -167,7 +167,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, null)) + if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -182,17 +182,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStrength.TryReadProperty(ref reader, options, PropStrength, null)) + if (propStrength.TryReadProperty(ref reader, options, PropStrength, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -256,29 +256,29 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlternate, value.Alternate, null, null); - writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, null); - writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, null); + writer.WriteProperty(options, PropAlternate, value.Alternate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropCountry, value.Country, null, null); - writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, null); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); + writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLanguage, value.Language, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropNumeric, value.Numeric, null, null); + writer.WriteProperty(options, PropNumeric, value.Numeric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRules, value.Rules, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropStrength, value.Strength, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStrength, value.Strength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVariableTop, value.VariableTop, null, null); writer.WriteProperty(options, PropVariant, value.Variant, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs index 8c28bc0ad6a..29481d60dd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs index 23388acac9f..b073085bc64 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs index e4691667ada..d0f3ea2e00f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System LocalJsonValue propTimeSeriesDimension = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,17 +89,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,17 +129,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,22 +184,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IpProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs index c162146f6a4..07d7d60e95e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs index 717bf19d7d0..83968a038ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs @@ -48,12 +48,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,14 +120,14 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.JoinProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRelations, value.Relations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs index 334bb4016b6..ab736045544 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S LocalJsonValue propTimeSeriesDimension = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,17 +84,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,17 +104,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,7 +129,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,7 +139,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,22 +159,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, null)) + if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -224,27 +224,27 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.KeywordProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNormalizer, value.Normalizer, null, null); - writer.WriteProperty(options, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs index a76c3b762a8..a2f1aca80d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs index 079547bd19d..43c819273dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs index b8c2e22dd8f..a6cfa4bbeea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.Murmur3HashProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.Murmur3HashProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.Murmur3HashProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs index 5b518745f45..b1e3461f066 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.NestedProperty Read(ref Sy continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,17 +74,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.NestedProperty Read(ref Sy continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeInParent.TryReadProperty(ref reader, options, PropIncludeInParent, null)) + if (propIncludeInParent.TryReadProperty(ref reader, options, PropIncludeInParent, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeInRoot.TryReadProperty(ref reader, options, PropIncludeInRoot, null)) + if (propIncludeInRoot.TryReadProperty(ref reader, options, PropIncludeInRoot, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.NestedProperty Read(ref Sy continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,16 +145,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIncludeInParent, value.IncludeInParent, null, null); - writer.WriteProperty(options, PropIncludeInRoot, value.IncludeInRoot, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeInParent, value.IncludeInParent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeInRoot, value.IncludeInRoot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs index 46d6a62cb1f..74b0d06742d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs @@ -57,12 +57,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ObjectProperty Read(ref Sy continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ObjectProperty Read(ref Sy continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,17 +87,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ObjectProperty Read(ref Sy continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, null)) + if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, static Elastic.Clients.Elasticsearch.Mapping.Subobjects? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,15 +137,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.Subobjects? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs index 25e884b6864..c4d4de33778 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,17 +94,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,16 +145,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs index 5577e8d6690..59227dfadde 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs index 16344f2d164..dd3499ef5a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs @@ -61,12 +61,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PointProperty Read(ref Sys continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,17 +76,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.PointProperty Read(ref Sys continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PointProperty Read(ref Sys continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,17 +153,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs index 27eab76564a..a7c5b2342b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r continue; } - if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, null)) + if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPositiveScoreImpact, value.PositiveScoreImpact, null, null); + writer.WriteProperty(options, PropPositiveScoreImpact, value.PositiveScoreImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs index 26737fb521b..5cb8bb5e6c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( continue; } - if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, null)) + if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPositiveScoreImpact, value.PositiveScoreImpact, null, null); + writer.WriteProperty(options, PropPositiveScoreImpact, value.PositiveScoreImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs index 3d3db47587f..991e2a5b3b9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,17 +100,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,12 +120,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propScalingFactor.TryReadProperty(ref reader, options, PropScalingFactor, null)) + if (propScalingFactor.TryReadProperty(ref reader, options, PropScalingFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,22 +145,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -208,25 +208,25 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropScalingFactor, value.ScalingFactor, null, null); + writer.WriteProperty(options, PropScalingFactor, value.ScalingFactor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs index 46970d27001..5d0c6375d21 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,22 +86,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, null)) + if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -136,17 +136,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, null)) + if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, static Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -194,21 +194,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); - writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); writer.WriteProperty(options, PropSearchQuoteAnalyzer, value.SearchQuoteAnalyzer, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTermVector, value.TermVector, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTermVector, value.TermVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs index 60577dcb307..e28fcbd601b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,17 +83,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, null)) + if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, static Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,19 +160,19 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ShapeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropOrientation, value.Orientation, null, null); + writer.WriteProperty(options, PropOrientation, value.Orientation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs index 88f2b1cf293..1bb328da407 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static short? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, short? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs index dff20e7d5da..453934aaf31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste LocalJsonValue propMode = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Mapping.SourceFieldMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.SourceField value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCompressThreshold, value.CompressThreshold, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExcludes, value.Excludes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIncludes, value.Includes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SourceFieldMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs index de1cdc3a393..085d503fee1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs index 6eeca87fb60..955e8dff5fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,17 +93,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFielddata.TryReadProperty(ref reader, options, PropFielddata, null)) + if (propFielddata.TryReadProperty(ref reader, options, PropFielddata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,22 +118,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, null)) + if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,12 +148,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, null)) + if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,17 +178,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, null)) + if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, static Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -241,28 +241,28 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); - writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFielddata, value.Fielddata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFielddataFrequencyFilter, value.FielddataFrequencyFilter, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); - writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexPrefixes, value.IndexPrefixes, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNorms, value.Norms, null, null); - writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); writer.WriteProperty(options, PropSearchQuoteAnalyzer, value.SearchQuoteAnalyzer, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTermVector, value.TermVector, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTermVector, value.TermVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs index 114ed3d8f93..448663ac3cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,17 +75,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, null)) + if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,12 +95,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,12 +120,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -169,19 +169,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs index e01dcebd005..1b3e2ebe82a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs @@ -75,12 +75,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, null)) + if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,7 +95,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -115,7 +115,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, null)) + if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, null)) + if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, static Elastic.Clients.Elasticsearch.Mapping.Subobjects? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -187,21 +187,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllField, value.AllField, null, null); writer.WriteProperty(options, PropDataStreamTimestamp, value.DataStreamTimestamp, null, null); - writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDynamicDateFormats, value.DynamicDateFormats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDynamicTemplates, value.DynamicTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldNames, value.FieldNames, null, null); writer.WriteProperty(options, PropIndexField, value.IndexField, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNumericDetection, value.NumericDetection, null, null); + writer.WriteProperty(options, PropNumericDetection, value.NumericDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropRuntime, value.Runtime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSize, value.Size, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); - writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, null); + writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.Subobjects? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs index 10fef02df29..f7866fe4de3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs index 787561e779c..8566a0539ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.VersionProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.VersionProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.VersionProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs index 5ea0c1ae8bd..f9b07a18195 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs @@ -57,12 +57,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.WildcardProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.WildcardProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,12 +92,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.WildcardProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,15 +137,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs index f7dfc437035..4e3eacd6096 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.NestedSortValue Read(ref System.Te continue; } - if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, null)) + if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, null); + writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs index eca1c35f769..7efa35f1e18 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S LocalJsonValue propRank = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvgQueueSize.TryReadProperty(ref reader, options, PropAvgQueueSize, null)) + if (propAvgQueueSize.TryReadProperty(ref reader, options, PropAvgQueueSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S continue; } - if (propAvgResponseTimeNs.TryReadProperty(ref reader, options, PropAvgResponseTimeNs, null)) + if (propAvgResponseTimeNs.TryReadProperty(ref reader, options, PropAvgResponseTimeNs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,12 +65,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S continue; } - if (propAvgServiceTimeNs.TryReadProperty(ref reader, options, PropAvgServiceTimeNs, null)) + if (propAvgServiceTimeNs.TryReadProperty(ref reader, options, PropAvgServiceTimeNs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutgoingSearches.TryReadProperty(ref reader, options, PropOutgoingSearches, null)) + if (propOutgoingSearches.TryReadProperty(ref reader, options, PropOutgoingSearches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvgQueueSize, value.AvgQueueSize, null, null); + writer.WriteProperty(options, PropAvgQueueSize, value.AvgQueueSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgResponseTime, value.AvgResponseTime, null, null); - writer.WriteProperty(options, PropAvgResponseTimeNs, value.AvgResponseTimeNs, null, null); + writer.WriteProperty(options, PropAvgResponseTimeNs, value.AvgResponseTimeNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgServiceTime, value.AvgServiceTime, null, null); - writer.WriteProperty(options, PropAvgServiceTimeNs, value.AvgServiceTimeNs, null, null); - writer.WriteProperty(options, PropOutgoingSearches, value.OutgoingSearches, null, null); + writer.WriteProperty(options, PropAvgServiceTimeNs, value.AvgServiceTimeNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutgoingSearches, value.OutgoingSearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRank, value.Rank, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs index 546d2e417a1..88a6ef8da8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Breaker Read(ref System.Text continue; } - if (propEstimatedSizeInBytes.TryReadProperty(ref reader, options, PropEstimatedSizeInBytes, null)) + if (propEstimatedSizeInBytes.TryReadProperty(ref reader, options, PropEstimatedSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Breaker Read(ref System.Text continue; } - if (propLimitSizeInBytes.TryReadProperty(ref reader, options, PropLimitSizeInBytes, null)) + if (propLimitSizeInBytes.TryReadProperty(ref reader, options, PropLimitSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOverhead.TryReadProperty(ref reader, options, PropOverhead, null)) + if (propOverhead.TryReadProperty(ref reader, options, PropOverhead, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTripped.TryReadProperty(ref reader, options, PropTripped, null)) + if (propTripped.TryReadProperty(ref reader, options, PropTripped, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropEstimatedSize, value.EstimatedSize, null, null); - writer.WriteProperty(options, PropEstimatedSizeInBytes, value.EstimatedSizeInBytes, null, null); + writer.WriteProperty(options, PropEstimatedSizeInBytes, value.EstimatedSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLimitSize, value.LimitSize, null, null); - writer.WriteProperty(options, PropLimitSizeInBytes, value.LimitSizeInBytes, null, null); - writer.WriteProperty(options, PropOverhead, value.Overhead, null, null); - writer.WriteProperty(options, PropTripped, value.Tripped, null, null); + writer.WriteProperty(options, PropLimitSizeInBytes, value.LimitSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOverhead, value.Overhead, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTripped, value.Tripped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs index e321961c21a..47f2bee5d63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpu Read(ref System.Te LocalJsonValue propStat = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCfsPeriodMicros.TryReadProperty(ref reader, options, PropCfsPeriodMicros, null)) + if (propCfsPeriodMicros.TryReadProperty(ref reader, options, PropCfsPeriodMicros, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCfsQuotaMicros.TryReadProperty(ref reader, options, PropCfsQuotaMicros, null)) + if (propCfsQuotaMicros.TryReadProperty(ref reader, options, PropCfsQuotaMicros, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,8 +81,8 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpu Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.CgroupCpu value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCfsPeriodMicros, value.CfsPeriodMicros, null, null); - writer.WriteProperty(options, PropCfsQuotaMicros, value.CfsQuotaMicros, null, null); + writer.WriteProperty(options, PropCfsPeriodMicros, value.CfsPeriodMicros, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCfsQuotaMicros, value.CfsQuotaMicros, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropControlGroup, value.ControlGroup, null, null); writer.WriteProperty(options, PropStat, value.Stat, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs index cb451e3d9dd..60a24b5d546 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpuStat Read(ref Syste LocalJsonValue propTimeThrottledNanos = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumberOfElapsedPeriods.TryReadProperty(ref reader, options, PropNumberOfElapsedPeriods, null)) + if (propNumberOfElapsedPeriods.TryReadProperty(ref reader, options, PropNumberOfElapsedPeriods, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfTimesThrottled.TryReadProperty(ref reader, options, PropNumberOfTimesThrottled, null)) + if (propNumberOfTimesThrottled.TryReadProperty(ref reader, options, PropNumberOfTimesThrottled, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeThrottledNanos.TryReadProperty(ref reader, options, PropTimeThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propTimeThrottledNanos.TryReadProperty(ref reader, options, PropTimeThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpuStat Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.CgroupCpuStat value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumberOfElapsedPeriods, value.NumberOfElapsedPeriods, null, null); - writer.WriteProperty(options, PropNumberOfTimesThrottled, value.NumberOfTimesThrottled, null, null); - writer.WriteProperty(options, PropTimeThrottledNanos, value.TimeThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropNumberOfElapsedPeriods, value.NumberOfElapsedPeriods, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfTimesThrottled, value.NumberOfTimesThrottled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeThrottledNanos, value.TimeThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs index bdf388d08be..1b97264e411 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Client Read(ref System.Text. continue; } - if (propClosedTimeMillis.TryReadProperty(ref reader, options, PropClosedTimeMillis, null)) + if (propClosedTimeMillis.TryReadProperty(ref reader, options, PropClosedTimeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propId.TryReadProperty(ref reader, options, PropId, null)) + if (propId.TryReadProperty(ref reader, options, PropId, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLastRequestTimeMillis.TryReadProperty(ref reader, options, PropLastRequestTimeMillis, null)) + if (propLastRequestTimeMillis.TryReadProperty(ref reader, options, PropLastRequestTimeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Client Read(ref System.Text. continue; } - if (propOpenedTimeMillis.TryReadProperty(ref reader, options, PropOpenedTimeMillis, null)) + if (propOpenedTimeMillis.TryReadProperty(ref reader, options, PropOpenedTimeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,12 +93,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.Client Read(ref System.Text. continue; } - if (propRequestCount.TryReadProperty(ref reader, options, PropRequestCount, null)) + if (propRequestCount.TryReadProperty(ref reader, options, PropRequestCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestSizeBytes.TryReadProperty(ref reader, options, PropRequestSizeBytes, null)) + if (propRequestSizeBytes.TryReadProperty(ref reader, options, PropRequestSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,15 +138,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAgent, value.Agent, null, null); - writer.WriteProperty(options, PropClosedTimeMillis, value.ClosedTimeMillis, null, null); - writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropLastRequestTimeMillis, value.LastRequestTimeMillis, null, null); + writer.WriteProperty(options, PropClosedTimeMillis, value.ClosedTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropId, value.Id, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLastRequestTimeMillis, value.LastRequestTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLastUri, value.LastUri, null, null); writer.WriteProperty(options, PropLocalAddress, value.LocalAddress, null, null); - writer.WriteProperty(options, PropOpenedTimeMillis, value.OpenedTimeMillis, null, null); + writer.WriteProperty(options, PropOpenedTimeMillis, value.OpenedTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRemoteAddress, value.RemoteAddress, null, null); - writer.WriteProperty(options, PropRequestCount, value.RequestCount, null, null); - writer.WriteProperty(options, PropRequestSizeBytes, value.RequestSizeBytes, null, null); + writer.WriteProperty(options, PropRequestCount, value.RequestCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestSizeBytes, value.RequestSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropXOpaqueId, value.XOpaqueId, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs index 480530769fe..e3cf5feab2b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateQueue Read(ref S LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCommitted.TryReadProperty(ref reader, options, PropCommitted, null)) + if (propCommitted.TryReadProperty(ref reader, options, PropCommitted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPending.TryReadProperty(ref reader, options, PropPending, null)) + if (propPending.TryReadProperty(ref reader, options, PropPending, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateQueue Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ClusterStateQueue value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCommitted, value.Committed, null, null); - writer.WriteProperty(options, PropPending, value.Pending, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropCommitted, value.Committed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPending, value.Pending, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs index 9c832de2c25..07eb4255579 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propCommitTimeMillis.TryReadProperty(ref reader, options, PropCommitTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propCommitTimeMillis.TryReadProperty(ref reader, options, PropCommitTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propCompletionTimeMillis.TryReadProperty(ref reader, options, PropCompletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propCompletionTimeMillis.TryReadProperty(ref reader, options, PropCompletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propComputationTimeMillis.TryReadProperty(ref reader, options, PropComputationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propComputationTimeMillis.TryReadProperty(ref reader, options, PropComputationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propContextConstructionTimeMillis.TryReadProperty(ref reader, options, PropContextConstructionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propContextConstructionTimeMillis.TryReadProperty(ref reader, options, PropContextConstructionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propMasterApplyTimeMillis.TryReadProperty(ref reader, options, PropMasterApplyTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMasterApplyTimeMillis.TryReadProperty(ref reader, options, PropMasterApplyTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propNotificationTimeMillis.TryReadProperty(ref reader, options, PropNotificationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propNotificationTimeMillis.TryReadProperty(ref reader, options, PropNotificationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -131,7 +131,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propPublicationTimeMillis.TryReadProperty(ref reader, options, PropPublicationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propPublicationTimeMillis.TryReadProperty(ref reader, options, PropPublicationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -170,20 +170,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCommitTime, value.CommitTime, null, null); - writer.WriteProperty(options, PropCommitTimeMillis, value.CommitTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCommitTimeMillis, value.CommitTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, null); - writer.WriteProperty(options, PropCompletionTimeMillis, value.CompletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCompletionTimeMillis, value.CompletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropComputationTime, value.ComputationTime, null, null); - writer.WriteProperty(options, PropComputationTimeMillis, value.ComputationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropComputationTimeMillis, value.ComputationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropContextConstructionTime, value.ContextConstructionTime, null, null); - writer.WriteProperty(options, PropContextConstructionTimeMillis, value.ContextConstructionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropContextConstructionTimeMillis, value.ContextConstructionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropMasterApplyTime, value.MasterApplyTime, null, null); - writer.WriteProperty(options, PropMasterApplyTimeMillis, value.MasterApplyTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMasterApplyTimeMillis, value.MasterApplyTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropNotificationTime, value.NotificationTime, null, null); - writer.WriteProperty(options, PropNotificationTimeMillis, value.NotificationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropNotificationTimeMillis, value.NotificationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropPublicationTime, value.PublicationTime, null, null); - writer.WriteProperty(options, PropPublicationTimeMillis, value.PublicationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropPublicationTimeMillis, value.PublicationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs index b2545231f48..17a67d4cdae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Context Read(ref System.Text LocalJsonValue propContext2 = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, null)) + if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, null)) + if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, null)) + if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.Context Read(ref System.Text public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Context value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, null); - writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, null); - writer.WriteProperty(options, PropCompilations, value.Compilations, null, null); + writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilations, value.Compilations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContext2, value.Context2, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs index 276e918336c..4f4907ba5ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs @@ -52,7 +52,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propPercent.TryReadProperty(ref reader, options, PropPercent, null)) + if (propPercent.TryReadProperty(ref reader, options, PropPercent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propSysInMillis.TryReadProperty(ref reader, options, PropSysInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propSysInMillis.TryReadProperty(ref reader, options, PropSysInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propTotalInMillis.TryReadProperty(ref reader, options, PropTotalInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTotalInMillis.TryReadProperty(ref reader, options, PropTotalInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propUserInMillis.TryReadProperty(ref reader, options, PropUserInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propUserInMillis.TryReadProperty(ref reader, options, PropUserInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -114,13 +114,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLoadAverage, value.LoadAverage, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPercent, value.Percent, null, null); + writer.WriteProperty(options, PropPercent, value.Percent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSys, value.Sys, null, null); - writer.WriteProperty(options, PropSysInMillis, value.SysInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropSysInMillis, value.SysInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTotalInMillis, value.TotalInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotalInMillis, value.TotalInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropUser, value.User, null, null); - writer.WriteProperty(options, PropUserInMillis, value.UserInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropUserInMillis, value.UserInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs index 6fe40b1d472..4ef4d282d2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.CpuAcct Read(ref System.Text continue; } - if (propUsageNanos.TryReadProperty(ref reader, options, PropUsageNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propUsageNanos.TryReadProperty(ref reader, options, PropUsageNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropControlGroup, value.ControlGroup, null, null); - writer.WriteProperty(options, PropUsageNanos, value.UsageNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropUsageNanos, value.UsageNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs index 4fafe3c6ffd..b0f042ff56f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, null)) + if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,7 +78,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propDiskReads.TryReadProperty(ref reader, options, PropDiskReads, null)) + if (propDiskReads.TryReadProperty(ref reader, options, PropDiskReads, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,12 +88,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propDiskReadSizeInBytes.TryReadProperty(ref reader, options, PropDiskReadSizeInBytes, null)) + if (propDiskReadSizeInBytes.TryReadProperty(ref reader, options, PropDiskReadSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiskWrites.TryReadProperty(ref reader, options, PropDiskWrites, null)) + if (propDiskWrites.TryReadProperty(ref reader, options, PropDiskWrites, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propDiskWriteSizeInBytes.TryReadProperty(ref reader, options, PropDiskWriteSizeInBytes, null)) + if (propDiskWriteSizeInBytes.TryReadProperty(ref reader, options, PropDiskWriteSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,7 +133,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,20 +178,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); - writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, null); + writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDiskQueue, value.DiskQueue, null, null); - writer.WriteProperty(options, PropDiskReads, value.DiskReads, null, null); + writer.WriteProperty(options, PropDiskReads, value.DiskReads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDiskReadSize, value.DiskReadSize, null, null); - writer.WriteProperty(options, PropDiskReadSizeInBytes, value.DiskReadSizeInBytes, null, null); - writer.WriteProperty(options, PropDiskWrites, value.DiskWrites, null, null); + writer.WriteProperty(options, PropDiskReadSizeInBytes, value.DiskReadSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiskWrites, value.DiskWrites, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDiskWriteSize, value.DiskWriteSize, null, null); - writer.WriteProperty(options, PropDiskWriteSizeInBytes, value.DiskWriteSizeInBytes, null, null); + writer.WriteProperty(options, PropDiskWriteSizeInBytes, value.DiskWriteSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFree, value.Free, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMount, value.Mount, null, null); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs index e24f5239b10..f7b6fb4d69b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs @@ -55,17 +55,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref LocalJsonValue propUsedPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, null)) + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFreePercent.TryReadProperty(ref reader, options, PropFreePercent, null)) + if (propFreePercent.TryReadProperty(ref reader, options, PropFreePercent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref continue; } - if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, null)) + if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref continue; } - if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, null)) + if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,17 +100,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref continue; } - if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, null)) + if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedPercent.TryReadProperty(ref reader, options, PropUsedPercent, null)) + if (propUsedPercent.TryReadProperty(ref reader, options, PropUsedPercent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,18 +145,18 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); - writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, null); + writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResident, value.Resident, null, null); - writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, null); + writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShare, value.Share, null, null); - writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalVirtual, value.TotalVirtual, null, null); - writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); - writer.WriteProperty(options, PropUsedPercent, value.UsedPercent, null, null); + writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedPercent, value.UsedPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs index 13c9c18f141..01753213186 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystem Read(ref System.T continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIoStats, value.IoStats, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs index 62fa4708641..04f1bbc4bb5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystemTotal Read(ref Sys continue; } - if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, null)) + if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystemTotal Read(ref Sys continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystemTotal Read(ref Sys continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); - writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, null); + writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFree, value.Free, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs index 0167567d61a..04295ce175c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal Read(r LocalJsonValue propCollectionTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollectionCount.TryReadProperty(ref reader, options, PropCollectionCount, null)) + if (propCollectionCount.TryReadProperty(ref reader, options, PropCollectionCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal Read(r continue; } - if (propCollectionTimeInMillis.TryReadProperty(ref reader, options, PropCollectionTimeInMillis, null)) + if (propCollectionTimeInMillis.TryReadProperty(ref reader, options, PropCollectionTimeInMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollectionCount, value.CollectionCount, null, null); + writer.WriteProperty(options, PropCollectionCount, value.CollectionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCollectionTime, value.CollectionTime, null, null); - writer.WriteProperty(options, PropCollectionTimeInMillis, value.CollectionTimeInMillis, null, null); + writer.WriteProperty(options, PropCollectionTimeInMillis, value.CollectionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs index cd2b2b9a767..15e035f2a80 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Http Read(ref System.Text.Js continue; } - if (propCurrentOpen.TryReadProperty(ref reader, options, PropCurrentOpen, null)) + if (propCurrentOpen.TryReadProperty(ref reader, options, PropCurrentOpen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Http Read(ref System.Text.Js continue; } - if (propTotalOpened.TryReadProperty(ref reader, options, PropTotalOpened, null)) + if (propTotalOpened.TryReadProperty(ref reader, options, PropTotalOpened, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClients, value.Clients, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropCurrentOpen, value.CurrentOpen, null, null); + writer.WriteProperty(options, PropCurrentOpen, value.CurrentOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoutes, value.Routes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropTotalOpened, value.TotalOpened, null, null); + writer.WriteProperty(options, PropTotalOpened, value.TotalOpened, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs index f9599a6d567..a368fb0e90b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.IndexingPressureMemory Read( continue; } - if (propLimitInBytes.TryReadProperty(ref reader, options, PropLimitInBytes, null)) + if (propLimitInBytes.TryReadProperty(ref reader, options, PropLimitInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCurrent, value.Current, null, null); writer.WriteProperty(options, PropLimit, value.Limit, null, null); - writer.WriteProperty(options, PropLimitInBytes, value.LimitInBytes, null, null); + writer.WriteProperty(options, PropLimitInBytes, value.LimitInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs index dc9b44f066d..c4a4b0d5a08 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs @@ -48,27 +48,27 @@ public override Elastic.Clients.Elasticsearch.Nodes.IoStatDevice Read(ref System continue; } - if (propOperations.TryReadProperty(ref reader, options, PropOperations, null)) + if (propOperations.TryReadProperty(ref reader, options, PropOperations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadKilobytes.TryReadProperty(ref reader, options, PropReadKilobytes, null)) + if (propReadKilobytes.TryReadProperty(ref reader, options, PropReadKilobytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadOperations.TryReadProperty(ref reader, options, PropReadOperations, null)) + if (propReadOperations.TryReadProperty(ref reader, options, PropReadOperations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWriteKilobytes.TryReadProperty(ref reader, options, PropWriteKilobytes, null)) + if (propWriteKilobytes.TryReadProperty(ref reader, options, PropWriteKilobytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWriteOperations.TryReadProperty(ref reader, options, PropWriteOperations, null)) + if (propWriteOperations.TryReadProperty(ref reader, options, PropWriteOperations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDeviceName, value.DeviceName, null, null); - writer.WriteProperty(options, PropOperations, value.Operations, null, null); - writer.WriteProperty(options, PropReadKilobytes, value.ReadKilobytes, null, null); - writer.WriteProperty(options, PropReadOperations, value.ReadOperations, null, null); - writer.WriteProperty(options, PropWriteKilobytes, value.WriteKilobytes, null, null); - writer.WriteProperty(options, PropWriteOperations, value.WriteOperations, null, null); + writer.WriteProperty(options, PropOperations, value.Operations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadKilobytes, value.ReadKilobytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadOperations, value.ReadOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWriteKilobytes, value.WriteKilobytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWriteOperations, value.WriteOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs index 551c29fe2d2..4dca710c2cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Jvm Read(ref System.Text.Jso continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Jvm Read(ref System.Text.Jso continue; } - if (propUptimeInMillis.TryReadProperty(ref reader, options, PropUptimeInMillis, null)) + if (propUptimeInMillis.TryReadProperty(ref reader, options, PropUptimeInMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,9 +118,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropGc, value.Gc, null, null); writer.WriteProperty(options, PropMem, value.Mem, null, null); writer.WriteProperty(options, PropThreads, value.Threads, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUptime, value.Uptime, null, null); - writer.WriteProperty(options, PropUptimeInMillis, value.UptimeInMillis, null, null); + writer.WriteProperty(options, PropUptimeInMillis, value.UptimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs index b04612e5aa7..540b54f7db8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmClasses Read(ref System.T LocalJsonValue propTotalUnloadedCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCurrentLoadedCount.TryReadProperty(ref reader, options, PropCurrentLoadedCount, null)) + if (propCurrentLoadedCount.TryReadProperty(ref reader, options, PropCurrentLoadedCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalLoadedCount.TryReadProperty(ref reader, options, PropTotalLoadedCount, null)) + if (propTotalLoadedCount.TryReadProperty(ref reader, options, PropTotalLoadedCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalUnloadedCount.TryReadProperty(ref reader, options, PropTotalUnloadedCount, null)) + if (propTotalUnloadedCount.TryReadProperty(ref reader, options, PropTotalUnloadedCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmClasses Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.JvmClasses value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCurrentLoadedCount, value.CurrentLoadedCount, null, null); - writer.WriteProperty(options, PropTotalLoadedCount, value.TotalLoadedCount, null, null); - writer.WriteProperty(options, PropTotalUnloadedCount, value.TotalUnloadedCount, null, null); + writer.WriteProperty(options, PropCurrentLoadedCount, value.CurrentLoadedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalLoadedCount, value.TotalLoadedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalUnloadedCount, value.TotalUnloadedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs index fbfcc345887..d69025d8588 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs @@ -45,32 +45,32 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst LocalJsonValue?> propPools = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propHeapCommittedInBytes.TryReadProperty(ref reader, options, PropHeapCommittedInBytes, null)) + if (propHeapCommittedInBytes.TryReadProperty(ref reader, options, PropHeapCommittedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHeapMaxInBytes.TryReadProperty(ref reader, options, PropHeapMaxInBytes, null)) + if (propHeapMaxInBytes.TryReadProperty(ref reader, options, PropHeapMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHeapUsedInBytes.TryReadProperty(ref reader, options, PropHeapUsedInBytes, null)) + if (propHeapUsedInBytes.TryReadProperty(ref reader, options, PropHeapUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHeapUsedPercent.TryReadProperty(ref reader, options, PropHeapUsedPercent, null)) + if (propHeapUsedPercent.TryReadProperty(ref reader, options, PropHeapUsedPercent, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNonHeapCommittedInBytes.TryReadProperty(ref reader, options, PropNonHeapCommittedInBytes, null)) + if (propNonHeapCommittedInBytes.TryReadProperty(ref reader, options, PropNonHeapCommittedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNonHeapUsedInBytes.TryReadProperty(ref reader, options, PropNonHeapUsedInBytes, null)) + if (propNonHeapUsedInBytes.TryReadProperty(ref reader, options, PropNonHeapUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropHeapCommittedInBytes, value.HeapCommittedInBytes, null, null); - writer.WriteProperty(options, PropHeapMaxInBytes, value.HeapMaxInBytes, null, null); - writer.WriteProperty(options, PropHeapUsedInBytes, value.HeapUsedInBytes, null, null); - writer.WriteProperty(options, PropHeapUsedPercent, value.HeapUsedPercent, null, null); - writer.WriteProperty(options, PropNonHeapCommittedInBytes, value.NonHeapCommittedInBytes, null, null); - writer.WriteProperty(options, PropNonHeapUsedInBytes, value.NonHeapUsedInBytes, null, null); + writer.WriteProperty(options, PropHeapCommittedInBytes, value.HeapCommittedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapMaxInBytes, value.HeapMaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapUsedInBytes, value.HeapUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapUsedPercent, value.HeapUsedPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNonHeapCommittedInBytes, value.NonHeapCommittedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNonHeapUsedInBytes, value.NonHeapUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPools, value.Pools, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs index b9c827ed7ac..2b7c6b6a2cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmThreads Read(ref System.T LocalJsonValue propPeakCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPeakCount.TryReadProperty(ref reader, options, PropPeakCount, null)) + if (propPeakCount.TryReadProperty(ref reader, options, PropPeakCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmThreads Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.JvmThreads value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropPeakCount, value.PeakCount, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPeakCount, value.PeakCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs index de64118d19b..ae85cf96e09 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. LocalJsonValue propUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, null)) + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. continue; } - if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, null)) + if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,12 +76,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. continue; } - if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, null)) + if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,12 +91,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. continue; } - if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, null)) + if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.MemoryStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); + writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResident, value.Resident, null, null); - writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, null); + writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShare, value.Share, null, null); - writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalVirtual, value.TotalVirtual, null, null); - writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); + writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs index 286a31df671..512f68d9492 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst LocalJsonValue propUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst continue; } - if (propTotalCapacityInBytes.TryReadProperty(ref reader, options, PropTotalCapacityInBytes, null)) + if (propTotalCapacityInBytes.TryReadProperty(ref reader, options, PropTotalCapacityInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalCapacity, value.TotalCapacity, null, null); - writer.WriteProperty(options, PropTotalCapacityInBytes, value.TotalCapacityInBytes, null, null); + writer.WriteProperty(options, PropTotalCapacityInBytes, value.TotalCapacityInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUsed, value.Used, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs index 9ca45578720..edcd6a8bbd9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs @@ -174,7 +174,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfo Read(ref System.Tex continue; } - if (propTotalIndexingBuffer.TryReadProperty(ref reader, options, PropTotalIndexingBuffer, null)) + if (propTotalIndexingBuffer.TryReadProperty(ref reader, options, PropTotalIndexingBuffer, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -260,7 +260,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRoles, value.Roles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSettings, value.Settings, null, null); writer.WriteProperty(options, PropThreadPool, value.ThreadPool, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropTotalIndexingBuffer, value.TotalIndexingBuffer, null, null); + writer.WriteProperty(options, PropTotalIndexingBuffer, value.TotalIndexingBuffer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalIndexingBufferInBytes, value.TotalIndexingBufferInBytes, null, null); writer.WriteProperty(options, PropTransport, value.Transport, null, null); writer.WriteProperty(options, PropTransportAddress, value.TransportAddress, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs index f216a269074..eca816be62d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfoDiscover Read(ref Sy } propSettings ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propSettings[key] = value; } @@ -78,7 +78,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Settings) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs index 40a686df83d..5fce2ad57b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfoXpackMl Read(ref Sys LocalJsonValue propUseAutoMachineMemoryPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propUseAutoMachineMemoryPercent.TryReadProperty(ref reader, options, PropUseAutoMachineMemoryPercent, null)) + if (propUseAutoMachineMemoryPercent.TryReadProperty(ref reader, options, PropUseAutoMachineMemoryPercent, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfoXpackMl Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeInfoXpackMl value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropUseAutoMachineMemoryPercent, value.UseAutoMachineMemoryPercent, null, null); + writer.WriteProperty(options, PropUseAutoMachineMemoryPercent, value.UseAutoMachineMemoryPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs index 01eb879235c..6ae5f7a40fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeOperatingSystemInfo Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllocatedProcessors.TryReadProperty(ref reader, options, PropAllocatedProcessors, null)) + if (propAllocatedProcessors.TryReadProperty(ref reader, options, PropAllocatedProcessors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,7 +129,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeOperatingSystemInfo Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeOperatingSystemInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllocatedProcessors, value.AllocatedProcessors, null, null); + writer.WriteProperty(options, PropAllocatedProcessors, value.AllocatedProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropArch, value.Arch, null, null); writer.WriteProperty(options, PropAvailableProcessors, value.AvailableProcessors, null, null); writer.WriteProperty(options, PropCpu, value.Cpu, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs index 4c7a7451161..d059f8888db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCore.TryReadProperty(ref reader, options, PropCore, null)) + if (propCore.TryReadProperty(ref reader, options, PropCore, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,11 +97,11 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCore, value.Core, null, null); + writer.WriteProperty(options, PropCore, value.Core, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueueSize, value.QueueSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs index 295b3dac164..21ca652ff65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.OperatingSystem Read(ref Sys continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCpu, value.Cpu, null, null); writer.WriteProperty(options, PropMem, value.Mem, null, null); writer.WriteProperty(options, PropSwap, value.Swap, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs index 1a600eb9812..216a8136394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Nodes.Pool Read(ref System.Text.Js LocalJsonValue propUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxInBytes.TryReadProperty(ref reader, options, PropMaxInBytes, null)) + if (propMaxInBytes.TryReadProperty(ref reader, options, PropMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPeakMaxInBytes.TryReadProperty(ref reader, options, PropPeakMaxInBytes, null)) + if (propPeakMaxInBytes.TryReadProperty(ref reader, options, PropPeakMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPeakUsedInBytes.TryReadProperty(ref reader, options, PropPeakUsedInBytes, null)) + if (propPeakUsedInBytes.TryReadProperty(ref reader, options, PropPeakUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Nodes.Pool Read(ref System.Text.Js public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Pool value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxInBytes, value.MaxInBytes, null, null); - writer.WriteProperty(options, PropPeakMaxInBytes, value.PeakMaxInBytes, null, null); - writer.WriteProperty(options, PropPeakUsedInBytes, value.PeakUsedInBytes, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); + writer.WriteProperty(options, PropMaxInBytes, value.MaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPeakMaxInBytes, value.PeakMaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPeakUsedInBytes, value.PeakUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs index 92ef43b4c8e..dfb4531044b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propAllInBytes.TryReadProperty(ref reader, options, PropAllInBytes, null)) + if (propAllInBytes.TryReadProperty(ref reader, options, PropAllInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propCombinedCoordinatingAndPrimaryInBytes.TryReadProperty(ref reader, options, PropCombinedCoordinatingAndPrimaryInBytes, null)) + if (propCombinedCoordinatingAndPrimaryInBytes.TryReadProperty(ref reader, options, PropCombinedCoordinatingAndPrimaryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,12 +82,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propCoordinatingInBytes.TryReadProperty(ref reader, options, PropCoordinatingInBytes, null)) + if (propCoordinatingInBytes.TryReadProperty(ref reader, options, PropCoordinatingInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, null)) + if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propPrimaryInBytes.TryReadProperty(ref reader, options, PropPrimaryInBytes, null)) + if (propPrimaryInBytes.TryReadProperty(ref reader, options, PropPrimaryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, null)) + if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propReplicaInBytes.TryReadProperty(ref reader, options, PropReplicaInBytes, null)) + if (propReplicaInBytes.TryReadProperty(ref reader, options, PropReplicaInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, null)) + if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -154,18 +154,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAll, value.All, null, null); - writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, null); + writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCombinedCoordinatingAndPrimary, value.CombinedCoordinatingAndPrimary, null, null); - writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, null); + writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCoordinating, value.Coordinating, null, null); - writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, null); - writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, null); + writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimary, value.Primary, null, null); - writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, null); - writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, null); + writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReplica, value.Replica, null, null); - writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, null); - writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, null); + writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs index aedcb9977e6..e1a447b98c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Process Read(ref System.Text continue; } - if (propMaxFileDescriptors.TryReadProperty(ref reader, options, PropMaxFileDescriptors, null)) + if (propMaxFileDescriptors.TryReadProperty(ref reader, options, PropMaxFileDescriptors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.Process Read(ref System.Text continue; } - if (propOpenFileDescriptors.TryReadProperty(ref reader, options, PropOpenFileDescriptors, null)) + if (propOpenFileDescriptors.TryReadProperty(ref reader, options, PropOpenFileDescriptors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCpu, value.Cpu, null, null); - writer.WriteProperty(options, PropMaxFileDescriptors, value.MaxFileDescriptors, null, null); + writer.WriteProperty(options, PropMaxFileDescriptors, value.MaxFileDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMem, value.Mem, null, null); - writer.WriteProperty(options, PropOpenFileDescriptors, value.OpenFileDescriptors, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropOpenFileDescriptors, value.OpenFileDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs index fbe829ac1d7..693a0706f4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Nodes.Processor Read(ref System.Te LocalJsonValue propTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCurrent.TryReadProperty(ref reader, options, PropCurrent, null)) + if (propCurrent.TryReadProperty(ref reader, options, PropCurrent, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFailed.TryReadProperty(ref reader, options, PropFailed, null)) + if (propFailed.TryReadProperty(ref reader, options, PropFailed, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeInMillis.TryReadProperty(ref reader, options, PropTimeInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTimeInMillis.TryReadProperty(ref reader, options, PropTimeInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Nodes.Processor Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Processor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropCurrent, value.Current, null, null); - writer.WriteProperty(options, PropFailed, value.Failed, null, null); - writer.WriteProperty(options, PropTimeInMillis, value.TimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCurrent, value.Current, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFailed, value.Failed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeInMillis, value.TimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs index df25ae134bd..ba93613e746 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.PublishedClusterStates Read( LocalJsonValue propIncompatibleDiffs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompatibleDiffs.TryReadProperty(ref reader, options, PropCompatibleDiffs, null)) + if (propCompatibleDiffs.TryReadProperty(ref reader, options, PropCompatibleDiffs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFullStates.TryReadProperty(ref reader, options, PropFullStates, null)) + if (propFullStates.TryReadProperty(ref reader, options, PropFullStates, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncompatibleDiffs.TryReadProperty(ref reader, options, PropIncompatibleDiffs, null)) + if (propIncompatibleDiffs.TryReadProperty(ref reader, options, PropIncompatibleDiffs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.PublishedClusterStates Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.PublishedClusterStates value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompatibleDiffs, value.CompatibleDiffs, null, null); - writer.WriteProperty(options, PropFullStates, value.FullStates, null, null); - writer.WriteProperty(options, PropIncompatibleDiffs, value.IncompatibleDiffs, null, null); + writer.WriteProperty(options, PropCompatibleDiffs, value.CompatibleDiffs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFullStates, value.FullStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncompatibleDiffs, value.IncompatibleDiffs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs index 7a891bf7acd..f03f394d653 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Recording Read(ref System.Te LocalJsonValue propName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCumulativeExecutionCount.TryReadProperty(ref reader, options, PropCumulativeExecutionCount, null)) + if (propCumulativeExecutionCount.TryReadProperty(ref reader, options, PropCumulativeExecutionCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Recording Read(ref System.Te continue; } - if (propCumulativeExecutionTimeMillis.TryReadProperty(ref reader, options, PropCumulativeExecutionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propCumulativeExecutionTimeMillis.TryReadProperty(ref reader, options, PropCumulativeExecutionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.Recording Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Recording value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCumulativeExecutionCount, value.CumulativeExecutionCount, null, null); + writer.WriteProperty(options, PropCumulativeExecutionCount, value.CumulativeExecutionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCumulativeExecutionTime, value.CumulativeExecutionTime, null, null); - writer.WriteProperty(options, PropCumulativeExecutionTimeMillis, value.CumulativeExecutionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCumulativeExecutionTimeMillis, value.CumulativeExecutionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs index 90fa8ad9893..a62bda17cbf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.RepositoryMeteringInformatio continue; } - if (propClusterVersion.TryReadProperty(ref reader, options, PropClusterVersion, null)) + if (propClusterVersion.TryReadProperty(ref reader, options, PropClusterVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.RepositoryMeteringInformatio continue; } - if (propRepositoryStoppedAt.TryReadProperty(ref reader, options, PropRepositoryStoppedAt, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propRepositoryStoppedAt.TryReadProperty(ref reader, options, PropRepositoryStoppedAt, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -122,12 +122,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropArchived, value.Archived, null, null); - writer.WriteProperty(options, PropClusterVersion, value.ClusterVersion, null, null); + writer.WriteProperty(options, PropClusterVersion, value.ClusterVersion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRepositoryEphemeralId, value.RepositoryEphemeralId, null, null); writer.WriteProperty(options, PropRepositoryLocation, value.RepositoryLocation, null, null); writer.WriteProperty(options, PropRepositoryName, value.RepositoryName, null, null); writer.WriteProperty(options, PropRepositoryStartedAt, value.RepositoryStartedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropRepositoryStoppedAt, value.RepositoryStoppedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropRepositoryStoppedAt, value.RepositoryStoppedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropRepositoryType, value.RepositoryType, null, null); writer.WriteProperty(options, PropRequestCounts, value.RequestCounts, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs index d848d96f017..da050da3403 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs @@ -53,57 +53,57 @@ public override Elastic.Clients.Elasticsearch.Nodes.RequestCounts Read(ref Syste LocalJsonValue propPutObject = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propGetBlob.TryReadProperty(ref reader, options, PropGetBlob, null)) + if (propGetBlob.TryReadProperty(ref reader, options, PropGetBlob, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGetBlobProperties.TryReadProperty(ref reader, options, PropGetBlobProperties, null)) + if (propGetBlobProperties.TryReadProperty(ref reader, options, PropGetBlobProperties, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGetObject.TryReadProperty(ref reader, options, PropGetObject, null)) + if (propGetObject.TryReadProperty(ref reader, options, PropGetObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInsertObject.TryReadProperty(ref reader, options, PropInsertObject, null)) + if (propInsertObject.TryReadProperty(ref reader, options, PropInsertObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propListBlobs.TryReadProperty(ref reader, options, PropListBlobs, null)) + if (propListBlobs.TryReadProperty(ref reader, options, PropListBlobs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propListObjects.TryReadProperty(ref reader, options, PropListObjects, null)) + if (propListObjects.TryReadProperty(ref reader, options, PropListObjects, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutBlob.TryReadProperty(ref reader, options, PropPutBlob, null)) + if (propPutBlob.TryReadProperty(ref reader, options, PropPutBlob, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutBlock.TryReadProperty(ref reader, options, PropPutBlock, null)) + if (propPutBlock.TryReadProperty(ref reader, options, PropPutBlock, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutBlockList.TryReadProperty(ref reader, options, PropPutBlockList, null)) + if (propPutBlockList.TryReadProperty(ref reader, options, PropPutBlockList, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutMultipartObject.TryReadProperty(ref reader, options, PropPutMultipartObject, null)) + if (propPutMultipartObject.TryReadProperty(ref reader, options, PropPutMultipartObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutObject.TryReadProperty(ref reader, options, PropPutObject, null)) + if (propPutObject.TryReadProperty(ref reader, options, PropPutObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,17 +137,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.RequestCounts Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.RequestCounts value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropGetBlob, value.GetBlob, null, null); - writer.WriteProperty(options, PropGetBlobProperties, value.GetBlobProperties, null, null); - writer.WriteProperty(options, PropGetObject, value.GetObject, null, null); - writer.WriteProperty(options, PropInsertObject, value.InsertObject, null, null); - writer.WriteProperty(options, PropListBlobs, value.ListBlobs, null, null); - writer.WriteProperty(options, PropListObjects, value.ListObjects, null, null); - writer.WriteProperty(options, PropPutBlob, value.PutBlob, null, null); - writer.WriteProperty(options, PropPutBlock, value.PutBlock, null, null); - writer.WriteProperty(options, PropPutBlockList, value.PutBlockList, null, null); - writer.WriteProperty(options, PropPutMultipartObject, value.PutMultipartObject, null, null); - writer.WriteProperty(options, PropPutObject, value.PutObject, null, null); + writer.WriteProperty(options, PropGetBlob, value.GetBlob, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGetBlobProperties, value.GetBlobProperties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGetObject, value.GetObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInsertObject, value.InsertObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropListBlobs, value.ListBlobs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropListObjects, value.ListObjects, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutBlob, value.PutBlob, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutBlock, value.PutBlock, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutBlockList, value.PutBlockList, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutMultipartObject, value.PutMultipartObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutObject, value.PutObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs index 28106c42c3b..19fcd1980e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ScriptCache Read(ref System. LocalJsonValue propContext = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, null)) + if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, null)) + if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, null)) + if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.ScriptCache Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ScriptCache value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, null); - writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, null); - writer.WriteProperty(options, PropCompilations, value.Compilations, null, null); + writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilations, value.Compilations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContext, value.Context, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs index 66b7e7620b5..ed7ad48bff9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs @@ -41,17 +41,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Scripting Read(ref System.Te LocalJsonValue?> propContexts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, null)) + if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, null)) + if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, null)) + if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.Scripting Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Scripting value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, null); - writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, null); - writer.WriteProperty(options, PropCompilations, value.Compilations, null, null); + writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilations, value.Compilations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCompilationsHistory, value.CompilationsHistory, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropContexts, value.Contexts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs index 8ba51414af9..9738e5ea98c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs @@ -46,12 +46,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.SerializedClusterStateDetail continue; } - if (propCompressedSizeInBytes.TryReadProperty(ref reader, options, PropCompressedSizeInBytes, null)) + if (propCompressedSizeInBytes.TryReadProperty(ref reader, options, PropCompressedSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.SerializedClusterStateDetail continue; } - if (propUncompressedSizeInBytes.TryReadProperty(ref reader, options, PropUncompressedSizeInBytes, null)) + if (propUncompressedSizeInBytes.TryReadProperty(ref reader, options, PropUncompressedSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCompressedSize, value.CompressedSize, null, null); - writer.WriteProperty(options, PropCompressedSizeInBytes, value.CompressedSizeInBytes, null, null); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropCompressedSizeInBytes, value.CompressedSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUncompressedSize, value.UncompressedSize, null, null); - writer.WriteProperty(options, PropUncompressedSizeInBytes, value.UncompressedSizeInBytes, null, null); + writer.WriteProperty(options, PropUncompressedSizeInBytes, value.UncompressedSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs index 5299ab4a963..551b0fef31d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.SizeHttpHistogram Read(ref S continue; } - if (propGeBytes.TryReadProperty(ref reader, options, PropGeBytes, null)) + if (propGeBytes.TryReadProperty(ref reader, options, PropGeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLtBytes.TryReadProperty(ref reader, options, PropLtBytes, null)) + if (propLtBytes.TryReadProperty(ref reader, options, PropLtBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropGeBytes, value.GeBytes, null, null); - writer.WriteProperty(options, PropLtBytes, value.LtBytes, null, null); + writer.WriteProperty(options, PropGeBytes, value.GeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLtBytes, value.LtBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs index b6186f43493..e60d4e8ca94 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs @@ -170,7 +170,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Stats Read(ref System.Text.J continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -244,7 +244,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropScriptCache, value.ScriptCache, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); writer.WriteProperty(options, PropThreadPool, value.ThreadPool, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTransport, value.Transport, null, null); writer.WriteProperty(options, PropTransportAddress, value.TransportAddress, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs index 9777c645bd0..625dfed042d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.Nodes.ThreadCount Read(ref System. LocalJsonValue propThreads = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propActive.TryReadProperty(ref reader, options, PropActive, null)) + if (propActive.TryReadProperty(ref reader, options, PropActive, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompleted.TryReadProperty(ref reader, options, PropCompleted, null)) + if (propCompleted.TryReadProperty(ref reader, options, PropCompleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLargest.TryReadProperty(ref reader, options, PropLargest, null)) + if (propLargest.TryReadProperty(ref reader, options, PropLargest, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propQueue.TryReadProperty(ref reader, options, PropQueue, null)) + if (propQueue.TryReadProperty(ref reader, options, PropQueue, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRejected.TryReadProperty(ref reader, options, PropRejected, null)) + if (propRejected.TryReadProperty(ref reader, options, PropRejected, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propThreads.TryReadProperty(ref reader, options, PropThreads, null)) + if (propThreads.TryReadProperty(ref reader, options, PropThreads, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.ThreadCount Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ThreadCount value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropActive, value.Active, null, null); - writer.WriteProperty(options, PropCompleted, value.Completed, null, null); - writer.WriteProperty(options, PropLargest, value.Largest, null, null); - writer.WriteProperty(options, PropQueue, value.Queue, null, null); - writer.WriteProperty(options, PropRejected, value.Rejected, null, null); - writer.WriteProperty(options, PropThreads, value.Threads, null, null); + writer.WriteProperty(options, PropActive, value.Active, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompleted, value.Completed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLargest, value.Largest, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropQueue, value.Queue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRejected, value.Rejected, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropThreads, value.Threads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs index 351c660c236..45de580dc9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.TimeHttpHistogram Read(ref S continue; } - if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, null)) + if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, null)) + if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, null); - writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, null); + writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs index 720ab418ac9..bfc005aa806 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Transport Read(ref System.Te continue; } - if (propRxCount.TryReadProperty(ref reader, options, PropRxCount, null)) + if (propRxCount.TryReadProperty(ref reader, options, PropRxCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,22 +71,22 @@ public override Elastic.Clients.Elasticsearch.Nodes.Transport Read(ref System.Te continue; } - if (propRxSizeInBytes.TryReadProperty(ref reader, options, PropRxSizeInBytes, null)) + if (propRxSizeInBytes.TryReadProperty(ref reader, options, PropRxSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propServerOpen.TryReadProperty(ref reader, options, PropServerOpen, null)) + if (propServerOpen.TryReadProperty(ref reader, options, PropServerOpen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalOutboundConnections.TryReadProperty(ref reader, options, PropTotalOutboundConnections, null)) + if (propTotalOutboundConnections.TryReadProperty(ref reader, options, PropTotalOutboundConnections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTxCount.TryReadProperty(ref reader, options, PropTxCount, null)) + if (propTxCount.TryReadProperty(ref reader, options, PropTxCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Transport Read(ref System.Te continue; } - if (propTxSizeInBytes.TryReadProperty(ref reader, options, PropTxSizeInBytes, null)) + if (propTxSizeInBytes.TryReadProperty(ref reader, options, PropTxSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,14 +131,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropInboundHandlingTimeHistogram, value.InboundHandlingTimeHistogram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropOutboundHandlingTimeHistogram, value.OutboundHandlingTimeHistogram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRxCount, value.RxCount, null, null); + writer.WriteProperty(options, PropRxCount, value.RxCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRxSize, value.RxSize, null, null); - writer.WriteProperty(options, PropRxSizeInBytes, value.RxSizeInBytes, null, null); - writer.WriteProperty(options, PropServerOpen, value.ServerOpen, null, null); - writer.WriteProperty(options, PropTotalOutboundConnections, value.TotalOutboundConnections, null, null); - writer.WriteProperty(options, PropTxCount, value.TxCount, null, null); + writer.WriteProperty(options, PropRxSizeInBytes, value.RxSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropServerOpen, value.ServerOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalOutboundConnections, value.TotalOutboundConnections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTxCount, value.TxCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTxSize, value.TxSize, null, null); - writer.WriteProperty(options, PropTxSizeInBytes, value.TxSizeInBytes, null, null); + writer.WriteProperty(options, PropTxSizeInBytes, value.TxSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs index 50ce61703a3..37a75605f59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.TransportHistogram Read(ref LocalJsonValue propLtMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, null)) + if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, null)) + if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.TransportHistogram Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.TransportHistogram value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, null); - writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PinnedRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/PinnedRetriever.g.cs new file mode 100644 index 00000000000..9965dae9577 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/PinnedRetriever.g.cs @@ -0,0 +1,518 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class PinnedRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropDocs = System.Text.Json.JsonEncodedText.Encode("docs"); + private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); + private static readonly System.Text.Json.JsonEncodedText PropIds = System.Text.Json.JsonEncodedText.Encode("ids"); + private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); + private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); + + public override Elastic.Clients.Elasticsearch.PinnedRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue?> propDocs = default; + LocalJsonValue?> propFilter = default; + LocalJsonValue?> propIds = default; + LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; + LocalJsonValue propRankWindowSize = default; + LocalJsonValue propRetriever = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propDocs.TryReadProperty(ref reader, options, PropDocs, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (propFilter.TryReadProperty(ref reader, options, PropFilter, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + + if (propIds.TryReadProperty(ref reader, options, PropIds, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + { + continue; + } + + if (propRetriever.TryReadProperty(ref reader, options, PropRetriever, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Docs = propDocs.Value, + Filter = propFilter.Value, + Ids = propIds.Value, + MinScore = propMinScore.Value, + Name = propName.Value, + RankWindowSize = propRankWindowSize.Value, + Retriever = propRetriever.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.PinnedRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropDocs, value.Docs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropIds, value.Ids, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.PinnedRetrieverConverter))] +public sealed partial class PinnedRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetriever(int rankWindowSize, Elastic.Clients.Elasticsearch.Retriever retriever) + { + RankWindowSize = rankWindowSize; + Retriever = retriever; + } +#if NET7_0_OR_GREATER + public PinnedRetriever() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public PinnedRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public System.Collections.Generic.ICollection? Docs { get; set; } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public System.Collections.Generic.ICollection? Filter { get; set; } + public System.Collections.Generic.ICollection? Ids { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public float? MinScore { get; set; } + + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int RankWindowSize { get; set; } + + /// + /// + /// Inner retriever. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Retriever Retriever { get; set; } +} + +public readonly partial struct PinnedRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.PinnedRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) => new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(System.Collections.Generic.ICollection? value) + { + Instance.Docs = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params Elastic.Clients.Elasticsearch.SpecifiedDocument[] values) + { + Instance.Docs = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor.Build(action)); + } + + Instance.Docs = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(System.Collections.Generic.ICollection? value) + { + Instance.Ids = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(params string[] values) + { + Instance.Ids = [.. values]; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.PinnedRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct PinnedRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.PinnedRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) => new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(System.Collections.Generic.ICollection? value) + { + Instance.Docs = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params Elastic.Clients.Elasticsearch.SpecifiedDocument[] values) + { + Instance.Docs = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor.Build(action)); + } + + Instance.Docs = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(System.Collections.Generic.ICollection? value) + { + Instance.Ids = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(params string[] values) + { + Instance.Ids = [.. values]; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(System.Action action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.PinnedRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs index 71659109a87..e0e7a056521 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoolQuery Read(ref System LocalJsonValue?> propShould = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoolQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.BoolQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropMust, value.Must, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs index cd734f376ac..67bb4c61875 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoostingQuery Read(ref Sy LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoostingQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.BoostingQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNegative, value.Negative, null, null); writer.WriteProperty(options, PropNegativeBoost, value.NegativeBoost, null, null); writer.WriteProperty(options, PropPositive, value.Positive, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs index 3df02392259..2f572c51fb7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( LocalJsonValue propZeroTermsQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsOperator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsZeroTerms? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,14 +113,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsOperator? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsZeroTerms? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs index e1516f81024..a77381fb3ac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -68,22 +68,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery Read(ref continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, null)) + if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHighFreqOperator.TryReadProperty(ref reader, options, PropHighFreqOperator, null)) + if (propHighFreqOperator.TryReadProperty(ref reader, options, PropHighFreqOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowFreqOperator.TryReadProperty(ref reader, options, PropLowFreqOperator, null)) + if (propLowFreqOperator.TryReadProperty(ref reader, options, PropLowFreqOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, null); - writer.WriteProperty(options, PropHighFreqOperator, value.HighFreqOperator, null, null); - writer.WriteProperty(options, PropLowFreqOperator, value.LowFreqOperator, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighFreqOperator, value.HighFreqOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowFreqOperator, value.LowFreqOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs index 165fc90fdf5..b06657d7a0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ConstantScoreQuery Read(r LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ConstantScoreQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ConstantScoreQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs index 159f96c5fea..125aa2752de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDecayFunction Read(re LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDecayFunction Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DateDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs index f162df44c42..68a013d6b0a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDistanceFeatureQuery LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDistanceFeatureQuery public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DateDistanceFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropPivot, value.Pivot, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs index f0d39d66d23..1afe947ae6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropGt, value.Gt, null, null); writer.WriteProperty(options, PropGte, value.Gte, null, null); writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs index af918efeb5c..4133b60f5a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DecayPlacement propScale = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDecay.TryReadProperty(ref reader, options, PropDecay, null)) + if (propDecay.TryReadProperty(ref reader, options, PropDecay, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DecayPlacement value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDecay, value.Decay, null, null); + writer.WriteProperty(options, PropDecay, value.Decay, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOffset, value.Offset, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropScale, value.Scale, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs index 2d406ab452b..2848148f7f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery Read(ref Syst LocalJsonValue propTieBreaker = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery Read(ref Syst continue; } - if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, null)) + if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueries, value.Queries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, null); + writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs index fca370f3210..219b773ecc9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ExistsQuery Read(ref Syst LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ExistsQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ExistsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs index 120f097efd6..a7fe4e55f5d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat Read(ref S continue; } - if (propIncludeUnmapped.TryReadProperty(ref reader, options, PropIncludeUnmapped, null)) + if (propIncludeUnmapped.TryReadProperty(ref reader, options, PropIncludeUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIncludeUnmapped, value.IncludeUnmapped, null, null); + writer.WriteProperty(options, PropIncludeUnmapped, value.IncludeUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs index 2e81ddb14c6..0e528752056 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunc LocalJsonValue propModifier = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFactor.TryReadProperty(ref reader, options, PropFactor, null)) + if (propFactor.TryReadProperty(ref reader, options, PropFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunc continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propModifier.TryReadProperty(ref reader, options, PropModifier, null)) + if (propModifier.TryReadProperty(ref reader, options, PropModifier, static Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorModifier? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunc public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFactor, value.Factor, null, null); + writer.WriteProperty(options, PropFactor, value.Factor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropModifier, value.Modifier, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropModifier, value.Modifier, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorModifier? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs index a6852e96464..b99f5e030a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScore Read(ref Sy continue; } - if (propWeight.TryReadProperty(ref reader, options, PropWeight, null)) + if (propWeight.TryReadProperty(ref reader, options, PropWeight, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -150,7 +150,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropWeight, value.Weight, null, null); + writer.WriteProperty(options, PropWeight, value.Weight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs index 534056a0ae0..b13b0aa8f2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r LocalJsonValue propScoreMode = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoostMode.TryReadProperty(ref reader, options, PropBoostMode, null)) + if (propBoostMode.TryReadProperty(ref reader, options, PropBoostMode, static Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r continue; } - if (propMaxBoost.TryReadProperty(ref reader, options, PropMaxBoost, null)) + if (propMaxBoost.TryReadProperty(ref reader, options, PropMaxBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,14 +122,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropBoostMode, value.BoostMode, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoostMode, value.BoostMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFunctions, value.Functions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMaxBoost, value.MaxBoost, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMaxBoost, value.MaxBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs index 308cc716ea6..0b948e3f06b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste continue; } - if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, null)) + if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,15 +132,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); - writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, null); + writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs index 1c7a81df2da..2f48cc2e270 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery Read( LocalJsonValue propValidationMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,18 +58,18 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery Read( continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.QueryDsl.GeoExecution? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, null)) + if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, static Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propBoundingBox.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propBoundingBox.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propBoundingBox.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -91,15 +91,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); #pragma warning disable CS0618 - writer.WriteProperty(options, PropType, value.Type, null, null) + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoExecution? v) => w.WriteNullableValue(o, v)) #pragma warning restore CS0618 ; - writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, null); - writer.WriteProperty(options, value.Field, value.BoundingBox, null, null); + writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.BoundingBox, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs index ef268d2083f..15f01f80bc5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDecayFunction Read(ref LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDecayFunction Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs index b964d97488c..212498d56e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceFeatureQuery R LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceFeatureQuery R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropPivot, value.Pivot, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs index c0a3fe2a67f..274237a9002 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref LocalJsonValue propValidationMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref continue; } - if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, null)) + if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, static Elastic.Clients.Elasticsearch.GeoDistanceType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,13 +70,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref continue; } - if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, null)) + if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, static Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propLocation.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propLocation.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propLocation.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -96,13 +96,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDistance, value.Distance, null, null); - writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoDistanceType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, null); - writer.WriteProperty(options, value.Field, value.Location, null, null); + writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Location, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs index 01c6ddebd99..dd0ff42e2fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs @@ -27,16 +27,16 @@ internal sealed partial class GeoGridQueryConverter : System.Text.Json.Serializa { private static readonly System.Text.Json.JsonEncodedText PropBoost = System.Text.Json.JsonEncodedText.Encode("boost"); private static readonly System.Text.Json.JsonEncodedText PropQueryName = System.Text.Json.JsonEncodedText.Encode("_name"); - private static readonly System.Text.Json.JsonEncodedText VariantGeogrid = System.Text.Json.JsonEncodedText.Encode("geogrid"); private static readonly System.Text.Json.JsonEncodedText VariantGeohash = System.Text.Json.JsonEncodedText.Encode("geohash"); private static readonly System.Text.Json.JsonEncodedText VariantGeohex = System.Text.Json.JsonEncodedText.Encode("geohex"); + private static readonly System.Text.Json.JsonEncodedText VariantGeotile = System.Text.Json.JsonEncodedText.Encode("geotile"); public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref Sys object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,25 +55,25 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref Sys continue; } - if (reader.ValueTextEquals(VariantGeogrid)) + if (reader.ValueTextEquals(VariantGeohash)) { - variantType = VariantGeogrid.Value; + variantType = VariantGeohash.Value; reader.Read(); variant = reader.ReadValue(options, null); continue; } - if (reader.ValueTextEquals(VariantGeohash)) + if (reader.ValueTextEquals(VariantGeohex)) { - variantType = VariantGeohash.Value; + variantType = VariantGeohex.Value; reader.Read(); variant = reader.ReadValue(options, null); continue; } - if (reader.ValueTextEquals(VariantGeohex)) + if (reader.ValueTextEquals(VariantGeotile)) { - variantType = VariantGeohex.Value; + variantType = VariantGeotile.Value; reader.Read(); variant = reader.ReadValue(options, null); continue; @@ -104,26 +104,26 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); switch (value.VariantType) { case null: break; - case "geogrid": - writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); - break; case "geohash": writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); break; case "geohex": writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); break; + case "geotile": + writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); + break; default: throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); writer.WriteEndObject(); @@ -152,9 +152,9 @@ internal GeoGridQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo _ = sentinel; } - public string? Geogrid { get => GetVariant("geogrid"); set => SetVariant("geogrid", value); } public string? Geohash { get => GetVariant("geohash"); set => SetVariant("geohash", value); } public string? Geohex { get => GetVariant("geohex"); set => SetVariant("geohex", value); } + public string? Geotile { get => GetVariant("geotile"); set => SetVariant("geotile", value); } /// /// @@ -210,12 +210,6 @@ public GeoGridQueryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery instance) => new Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor descriptor) => descriptor.Instance; - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geogrid(string? value) - { - Instance.Geogrid = value; - return this; - } - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geohash(string? value) { Instance.Geohash = value; @@ -228,6 +222,12 @@ public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geotile(string? value) + { + Instance.Geotile = value; + return this; + } + /// /// /// Floating point number used to decrease or increase the relevance scores of the query. @@ -288,12 +288,6 @@ public GeoGridQueryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery instance) => new Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor descriptor) => descriptor.Instance; - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geogrid(string? value) - { - Instance.Geogrid = value; - return this; - } - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geohash(string? value) { Instance.Geohash = value; @@ -306,6 +300,12 @@ public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geohex(stri return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geotile(string? value) + { + Instance.Geotile = value; + return this; + } + /// /// /// Floating point number used to decrease or increase the relevance scores of the query. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs index 2fd1cef7711..e12525ae916 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery Read(ref LocalJsonValue propValidationMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,13 +56,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery Read(ref continue; } - if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, null)) + if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, static Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPolygon.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPolygon.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPolygon.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -80,11 +80,11 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, null); - writer.WriteProperty(options, value.Field, value.Polygon, null, null); + writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Polygon, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs index 06458d927c8..b3be8a764b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeFieldQuery Read(r continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.GeoShapeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndexedShape, value.IndexedShape, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoShapeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShape, value.Shape, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs index 2e381d444b6..50463b4fba6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery Read(ref Sy LocalJsonValue propShape = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery Read(ref Sy } propField.Initialized = propShape.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propShape.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propShape.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -72,10 +72,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, value.Field, value.Shape, null, null); + writer.WriteProperty(options, value.Field, value.Shape, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs index 27ecb9b868a..bc096a2aad6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy continue; } - if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, null)) + if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinChildren.TryReadProperty(ref reader, options, PropMinChildren, null)) + if (propMinChildren.TryReadProperty(ref reader, options, PropMinChildren, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,14 +121,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); - writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, null); - writer.WriteProperty(options, PropMinChildren, value.MinChildren, null, null); + writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinChildren, value.MinChildren, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs index 22ea3783d2c..221211aac73 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery Read(ref S LocalJsonValue propScore = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery Read(ref S continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); writer.WriteProperty(options, PropParentType, value.ParentType, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs index 245fe27b1cd..dd835401562 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IdsQuery Read(ref System. LocalJsonValue propValues = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IdsQuery Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IdsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValues, value.Values, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs index 8dab9b80ef0..a41ca652cd0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs @@ -30,6 +30,8 @@ internal sealed partial class IntervalsConverter : System.Text.Json.Serializatio private static readonly System.Text.Json.JsonEncodedText VariantFuzzy = System.Text.Json.JsonEncodedText.Encode("fuzzy"); private static readonly System.Text.Json.JsonEncodedText VariantMatch = System.Text.Json.JsonEncodedText.Encode("match"); private static readonly System.Text.Json.JsonEncodedText VariantPrefix = System.Text.Json.JsonEncodedText.Encode("prefix"); + private static readonly System.Text.Json.JsonEncodedText VariantRange = System.Text.Json.JsonEncodedText.Encode("range"); + private static readonly System.Text.Json.JsonEncodedText VariantRegexp = System.Text.Json.JsonEncodedText.Encode("regexp"); private static readonly System.Text.Json.JsonEncodedText VariantWildcard = System.Text.Json.JsonEncodedText.Encode("wildcard"); public override Elastic.Clients.Elasticsearch.QueryDsl.Intervals Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -79,6 +81,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.Intervals Read(ref System continue; } + if (reader.ValueTextEquals(VariantRange)) + { + variantType = VariantRange.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantRegexp)) + { + variantType = VariantRegexp.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (reader.ValueTextEquals(VariantWildcard)) { variantType = VariantWildcard.Value; @@ -126,6 +144,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "prefix": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix)value.Variant, null, null); break; + case "range": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange)value.Variant, null, null); + break; + case "regexp": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp)value.Variant, null, null); + break; case "wildcard": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsWildcard)value.Variant, null, null); break; @@ -192,6 +216,8 @@ internal Intervals(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe /// /// public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix? Prefix { get => GetVariant("prefix"); set => SetVariant("prefix", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? Range { get => GetVariant("range"); set => SetVariant("range", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? Regexp { get => GetVariant("regexp"); set => SetVariant("regexp", value); } /// /// @@ -205,6 +231,8 @@ internal Intervals(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFuzzy value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Fuzzy = value }; public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsMatch value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Match = value }; public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Prefix = value }; + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Range = value }; + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Regexp = value }; public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsWildcard value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Wildcard = value }; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] @@ -355,6 +383,36 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Pre return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. @@ -570,6 +628,48 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Prefix(Syst return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(System.Action? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(System.Action action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs index 32c726ec3a1..f1dc1fb023f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsAllOf Read(ref S continue; } - if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, null)) + if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, null)) + if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIntervals, value.Intervals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, null); - writer.WriteProperty(options, PropOrdered, value.Ordered, null, null); + writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdered, value.Ordered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs index dca4c85cd89..72a3f510a05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFuzzy Read(ref S continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFuzzy Read(ref S continue; } - if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, null)) + if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,9 +99,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTerm, value.Term, null, null); - writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, null); + writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUseField, value.UseField, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs index 800a6c26a73..d7f656a56f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsMatch Read(ref S continue; } - if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, null)) + if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, null)) + if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, null); - writer.WriteProperty(options, PropOrdered, value.Ordered, null, null); + writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdered, value.Ordered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropUseField, value.UseField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs index daf99ae5fbb..61eac390441 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs @@ -32,6 +32,8 @@ internal sealed partial class IntervalsQueryConverter : System.Text.Json.Seriali private static readonly System.Text.Json.JsonEncodedText VariantFuzzy = System.Text.Json.JsonEncodedText.Encode("fuzzy"); private static readonly System.Text.Json.JsonEncodedText VariantMatch = System.Text.Json.JsonEncodedText.Encode("match"); private static readonly System.Text.Json.JsonEncodedText VariantPrefix = System.Text.Json.JsonEncodedText.Encode("prefix"); + private static readonly System.Text.Json.JsonEncodedText VariantRange = System.Text.Json.JsonEncodedText.Encode("range"); + private static readonly System.Text.Json.JsonEncodedText VariantRegexp = System.Text.Json.JsonEncodedText.Encode("regexp"); private static readonly System.Text.Json.JsonEncodedText VariantWildcard = System.Text.Json.JsonEncodedText.Encode("wildcard"); public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -39,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -48,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,6 +100,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S continue; } + if (reader.ValueTextEquals(VariantRange)) + { + variantType = VariantRange.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantRegexp)) + { + variantType = VariantRegexp.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (reader.ValueTextEquals(VariantWildcard)) { variantType = VariantWildcard.Value; @@ -131,7 +149,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); switch (value.VariantType) { @@ -152,6 +170,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "prefix": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix)value.Variant, null, null); break; + case "range": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange)value.Variant, null, null); + break; + case "regexp": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp)value.Variant, null, null); + break; case "wildcard": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsWildcard)value.Variant, null, null); break; @@ -159,7 +183,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); writer.WriteEndObject(); @@ -222,6 +246,8 @@ internal IntervalsQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix? Prefix { get => GetVariant("prefix"); set => SetVariant("prefix", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? Range { get => GetVariant("range"); set => SetVariant("range", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? Regexp { get => GetVariant("regexp"); set => SetVariant("regexp", value); } /// /// @@ -394,6 +420,36 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. @@ -641,6 +697,48 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Prefix return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(System.Action? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(System.Action action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRange.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRange.g.cs new file mode 100644 index 00000000000..cc4dce9a79d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRange.g.cs @@ -0,0 +1,395 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.QueryDsl; + +internal sealed partial class IntervalsRangeConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAnalyzer = System.Text.Json.JsonEncodedText.Encode("analyzer"); + private static readonly System.Text.Json.JsonEncodedText PropGt = System.Text.Json.JsonEncodedText.Encode("gt"); + private static readonly System.Text.Json.JsonEncodedText PropGte = System.Text.Json.JsonEncodedText.Encode("gte"); + private static readonly System.Text.Json.JsonEncodedText PropLt = System.Text.Json.JsonEncodedText.Encode("lt"); + private static readonly System.Text.Json.JsonEncodedText PropLte = System.Text.Json.JsonEncodedText.Encode("lte"); + private static readonly System.Text.Json.JsonEncodedText PropUseField = System.Text.Json.JsonEncodedText.Encode("use_field"); + + public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAnalyzer = default; + LocalJsonValue propGt = default; + LocalJsonValue propGte = default; + LocalJsonValue propLt = default; + LocalJsonValue propLte = default; + LocalJsonValue propUseField = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAnalyzer.TryReadProperty(ref reader, options, PropAnalyzer, null)) + { + continue; + } + + if (propGt.TryReadProperty(ref reader, options, PropGt, null)) + { + continue; + } + + if (propGte.TryReadProperty(ref reader, options, PropGte, null)) + { + continue; + } + + if (propLt.TryReadProperty(ref reader, options, PropLt, null)) + { + continue; + } + + if (propLte.TryReadProperty(ref reader, options, PropLte, null)) + { + continue; + } + + if (propUseField.TryReadProperty(ref reader, options, PropUseField, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Analyzer = propAnalyzer.Value, + Gt = propGt.Value, + Gte = propGte.Value, + Lt = propLt.Value, + Lte = propLte.Value, + UseField = propUseField.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); + writer.WriteProperty(options, PropGt, value.Gt, null, null); + writer.WriteProperty(options, PropGte, value.Gte, null, null); + writer.WriteProperty(options, PropLt, value.Lt, null, null); + writer.WriteProperty(options, PropLte, value.Lte, null, null); + writer.WriteProperty(options, PropUseField, value.UseField, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeConverter))] +public sealed partial class IntervalsRange +{ +#if NET7_0_OR_GREATER + public IntervalsRange() + { + } +#endif +#if !NET7_0_OR_GREATER + public IntervalsRange() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public string? Analyzer { get; set; } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public string? Gt { get; set; } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public string? Gte { get; set; } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public string? Lt { get; set; } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public string? Lte { get; set; } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.Field? UseField { get; set; } +} + +public readonly partial struct IntervalsRangeDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gt(string? value) + { + Instance.Gt = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gte(string? value) + { + Instance.Gte = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lt(string? value) + { + Instance.Lt = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lte(string? value) + { + Instance.Lte = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Build(System.Action>? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct IntervalsRangeDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gt(string? value) + { + Instance.Gt = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gte(string? value) + { + Instance.Gte = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lt(string? value) + { + Instance.Lt = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lte(string? value) + { + Instance.Lte = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRegexp.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRegexp.g.cs new file mode 100644 index 00000000000..e80b18399bd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRegexp.g.cs @@ -0,0 +1,281 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.QueryDsl; + +internal sealed partial class IntervalsRegexpConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAnalyzer = System.Text.Json.JsonEncodedText.Encode("analyzer"); + private static readonly System.Text.Json.JsonEncodedText PropPattern = System.Text.Json.JsonEncodedText.Encode("pattern"); + private static readonly System.Text.Json.JsonEncodedText PropUseField = System.Text.Json.JsonEncodedText.Encode("use_field"); + + public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAnalyzer = default; + LocalJsonValue propPattern = default; + LocalJsonValue propUseField = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAnalyzer.TryReadProperty(ref reader, options, PropAnalyzer, null)) + { + continue; + } + + if (propPattern.TryReadProperty(ref reader, options, PropPattern, null)) + { + continue; + } + + if (propUseField.TryReadProperty(ref reader, options, PropUseField, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Analyzer = propAnalyzer.Value, + Pattern = propPattern.Value, + UseField = propUseField.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); + writer.WriteProperty(options, PropPattern, value.Pattern, null, null); + writer.WriteProperty(options, PropUseField, value.UseField, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpConverter))] +public sealed partial class IntervalsRegexp +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexp(string pattern) + { + Pattern = pattern; + } +#if NET7_0_OR_GREATER + public IntervalsRegexp() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public IntervalsRegexp() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public string? Analyzer { get; set; } + + /// + /// + /// Regex pattern. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + string Pattern { get; set; } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.Field? UseField { get; set; } +} + +public readonly partial struct IntervalsRegexpDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Regex pattern. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Pattern(string value) + { + Instance.Pattern = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct IntervalsRegexpDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Regex pattern. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Pattern(string value) + { + Instance.Pattern = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs index 3b00df20070..9384a6ee7c2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -77,12 +77,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.LikeDocument Read(ref Sys continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,8 +119,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropPerFieldAnalyzer, value.PerFieldAnalyzer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs index 8387034c1f5..ff7dff9f253 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery Read(ref Sy LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs index 341261a8d6b..b4ef31aaecd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,12 +89,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -156,17 +156,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs index d675eb01e36..0d65ccc58c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchNoneQuery Read(ref S LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchNoneQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchNoneQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs index ab695bd426f..cce84a4dacb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,15 +124,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs index 4250d0d893e..01cf8f6abfe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,14 +116,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs index 435a43bf959..114be26107e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -82,17 +82,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, null)) + if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,17 +107,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -147,7 +147,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -191,26 +191,26 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); #pragma warning disable CS0618 - writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, null) + writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)) #pragma warning restore CS0618 ; writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs index 4e3aa59ecc3..807e8458960 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -76,17 +76,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoostTerms.TryReadProperty(ref reader, options, PropBoostTerms, null)) + if (propBoostTerms.TryReadProperty(ref reader, options, PropBoostTerms, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFailOnUnsupportedField.TryReadProperty(ref reader, options, PropFailOnUnsupportedField, null)) + if (propFailOnUnsupportedField.TryReadProperty(ref reader, options, PropFailOnUnsupportedField, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propInclude.TryReadProperty(ref reader, options, PropInclude, null)) + if (propInclude.TryReadProperty(ref reader, options, PropInclude, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,22 +106,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, null)) + if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxQueryTerms.TryReadProperty(ref reader, options, PropMaxQueryTerms, null)) + if (propMaxQueryTerms.TryReadProperty(ref reader, options, PropMaxQueryTerms, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, null)) + if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,12 +131,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, null)) + if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -161,12 +161,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -210,25 +210,25 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropBoostTerms, value.BoostTerms, null, null); - writer.WriteProperty(options, PropFailOnUnsupportedField, value.FailOnUnsupportedField, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoostTerms, value.BoostTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFailOnUnsupportedField, value.FailOnUnsupportedField, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropInclude, value.Include, null, null); + writer.WriteProperty(options, PropInclude, value.Include, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLike, value.Like, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, null); - writer.WriteProperty(options, PropMaxQueryTerms, value.MaxQueryTerms, null, null); - writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); + writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxQueryTerms, value.MaxQueryTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); + writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropStopWords, value.StopWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropUnlike, value.Unlike, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs index 5a3b609c678..b1e385c7ad3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs @@ -74,17 +74,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, null)) + if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,17 +104,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,12 +124,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -144,22 +144,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, null)) + if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,27 +205,27 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); #pragma warning disable CS0618 - writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, null) + writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)) #pragma warning restore CS0618 ; writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); - writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs index ff09150b73d..840560e882a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery Read(ref Syst LocalJsonValue propScoreMode = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery Read(ref Syst continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs index 5e6e186e62f..8a77610fece 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -50,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref LocalJsonValue propRelation = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,15 +113,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGt, value.Gt, null, null); writer.WriteProperty(options, PropGte, value.Gte, null, null); writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs index ddbf89dac18..9d287da02a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumericDecayFunction Read LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumericDecayFunction Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.NumericDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs index fafb54237ac..37b96ccb17b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery Read(ref Sy LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery Read(ref Sy continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs index fe7c7e1e82e..70844b65115 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery Read(ref S LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery Read(ref S continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,7 +137,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDocument, value.Document, null, null); writer.WriteProperty(options, PropDocuments, value.Documents, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropField, value.Field, null, null); @@ -147,7 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPreference, value.Preference, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs index 369ae9d7b7d..11213aeb9ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PinnedQuery Read(ref Syst object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.PinnedQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrganic, value.Organic, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs index 8cadf02b325..67094e1feef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -57,12 +57,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery Read(ref Syst LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,10 +108,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs index 9afc585991c..9c6cfb2546b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs @@ -85,7 +85,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLeadingWildcard.TryReadProperty(ref reader, options, PropAllowLeadingWildcard, null)) + if (propAllowLeadingWildcard.TryReadProperty(ref reader, options, PropAllowLeadingWildcard, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,17 +95,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, null)) + if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -115,17 +115,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, null)) + if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, null)) + if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEscape.TryReadProperty(ref reader, options, PropEscape, null)) + if (propEscape.TryReadProperty(ref reader, options, PropEscape, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,12 +140,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, null)) + if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, null)) + if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,17 +155,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, null)) + if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -175,7 +175,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propPhraseSlop.TryReadProperty(ref reader, options, PropPhraseSlop, null)) + if (propPhraseSlop.TryReadProperty(ref reader, options, PropPhraseSlop, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,7 +205,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, null)) + if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -215,7 +215,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -265,33 +265,33 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLeadingWildcard, value.AllowLeadingWildcard, null, null); + writer.WriteProperty(options, PropAllowLeadingWildcard, value.AllowLeadingWildcard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDefaultField, value.DefaultField, null, null); - writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, null); - writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, null); - writer.WriteProperty(options, PropEscape, value.Escape, null, null); + writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEscape, value.Escape, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, null); - writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, null); + writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); - writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropPhraseSlop, value.PhraseSlop, null, null); + writer.WriteProperty(options, PropPhraseSlop, value.PhraseSlop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropQuoteAnalyzer, value.QuoteAnalyzer, null, null); writer.WriteProperty(options, PropQuoteFieldSuffix, value.QuoteFieldSuffix, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); - writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, null); + writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs index a96d6fd63ac..0ae08f26668 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSatura LocalJsonValue propPivot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPivot.TryReadProperty(ref reader, options, PropPivot, null)) + if (propPivot.TryReadProperty(ref reader, options, PropPivot, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSatura public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSaturation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPivot, value.Pivot, null, null); + writer.WriteProperty(options, PropPivot, value.Pivot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs index 64ad3c18046..1a10c040f69 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureQuery Read(ref LocalJsonValue propSigmoid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropLinear, value.Linear, null, null); writer.WriteProperty(options, PropLog, value.Log, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs index ab93b14e809..4f98aa2d9ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -61,12 +61,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst continue; } - if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, null)) + if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,12 +124,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, null); + writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs index 0c3c74d149f..f52e4f2baa5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs @@ -29,6 +29,7 @@ internal sealed partial class RuleQueryConverter : System.Text.Json.Serializatio private static readonly System.Text.Json.JsonEncodedText PropMatchCriteria = System.Text.Json.JsonEncodedText.Encode("match_criteria"); private static readonly System.Text.Json.JsonEncodedText PropOrganic = System.Text.Json.JsonEncodedText.Encode("organic"); private static readonly System.Text.Json.JsonEncodedText PropQueryName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRulesetId = System.Text.Json.JsonEncodedText.Encode("ruleset_id"); private static readonly System.Text.Json.JsonEncodedText PropRulesetIds = System.Text.Json.JsonEncodedText.Encode("ruleset_ids"); public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -38,10 +39,11 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System LocalJsonValue propMatchCriteria = default; LocalJsonValue propOrganic = default; LocalJsonValue propQueryName = default; - LocalJsonValue> propRulesetIds = default; + LocalJsonValue propRulesetId = default; + LocalJsonValue?> propRulesetIds = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +63,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System continue; } - if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propRulesetId.TryReadProperty(ref reader, options, PropRulesetId, null)) + { + continue; + } + + if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) { continue; } @@ -82,6 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System MatchCriteria = propMatchCriteria.Value, Organic = propOrganic.Value, QueryName = propQueryName.Value, + RulesetId = propRulesetId.Value, RulesetIds = propRulesetIds.Value }; } @@ -89,11 +97,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMatchCriteria, value.MatchCriteria, null, null); writer.WriteProperty(options, PropOrganic, value.Organic, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropRulesetId, value.RulesetId, null, null); + writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } @@ -102,11 +111,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class RuleQuery { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RuleQuery(object matchCriteria, Elastic.Clients.Elasticsearch.QueryDsl.Query organic, System.Collections.Generic.ICollection rulesetIds) + public RuleQuery(object matchCriteria, Elastic.Clients.Elasticsearch.QueryDsl.Query organic) { MatchCriteria = matchCriteria; Organic = organic; - RulesetIds = rulesetIds; } #if NET7_0_OR_GREATER public RuleQuery() @@ -145,11 +153,8 @@ internal RuleQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe #endif Elastic.Clients.Elasticsearch.QueryDsl.Query Organic { get; set; } public string? QueryName { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.ICollection RulesetIds { get; set; } + public string? RulesetId { get; set; } + public System.Collections.Generic.ICollection? RulesetIds { get; set; } } public readonly partial struct RuleQueryDescriptor @@ -209,7 +214,13 @@ public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor Que return this; } - public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetId(string? value) + { + Instance.RulesetId = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection? value) { Instance.RulesetIds = value; return this; @@ -293,7 +304,13 @@ public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor QueryName(stri return this; } - public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetId(string? value) + { + Instance.RulesetId = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection? value) { Instance.RulesetIds = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs index 02c477b11fd..03b14ea52d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptQuery Read(ref Syst LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ScriptQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs index 6aee73013f5..4b20194eea5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptScoreQuery Read(ref LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptScoreQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ScriptScoreQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs index 1baa42a0d02..5f52f21f987 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SemanticQuery Read(ref Sy LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SemanticQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SemanticQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs index 511c29975d7..b40125ea88b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeFieldQuery Read(ref continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.GeoShapeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndexedShape, value.IndexedShape, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoShapeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShape, value.Shape, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs index 476ab5d1838..4dc1ced7e59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery Read(ref Syste LocalJsonValue propShape = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery Read(ref Syste } propField.Initialized = propShape.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propShape.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propShape.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -72,10 +72,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, value.Field, value.Shape, null, null); + writer.WriteProperty(options, value.Field, value.Shape, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs index 79131858d88..015951a04e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs @@ -66,22 +66,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringQuery Re continue; } - if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, null)) + if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, null)) + if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,27 +91,27 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringQuery Re continue; } - if (propFlags.TryReadProperty(ref reader, options, PropFlags, null)) + if (propFlags.TryReadProperty(ref reader, options, PropFlags, static Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringFlags? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, null)) + if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, null)) + if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,16 +170,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, null); + writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, null); - writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); + writer.WriteProperty(options, PropFlags, value.Flags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringFlags? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs index 5b089e0fbdb..a64036b0bb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanContainingQuery Read( continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBig, value.Big, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLittle, value.Little, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs index 0ffcd92c68e..fe187fffa63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFieldMaskingQuery Rea LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFieldMaskingQuery Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanFieldMaskingQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs index ba660394ce2..37de58f2440 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFirstQuery Read(ref S LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFirstQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanFirstQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropEnd, value.End, null, null); writer.WriteProperty(options, PropMatch, value.Match, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs index 3f5d9da6351..2078e299b65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanMultiTermQuery Read(r LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanMultiTermQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanMultiTermQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMatch, value.Match, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs index 2c0e6444b43..6466d7a49dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy LocalJsonValue propSlop = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy continue; } - if (propInOrder.TryReadProperty(ref reader, options, PropInOrder, null)) + if (propInOrder.TryReadProperty(ref reader, options, PropInOrder, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClauses, value.Clauses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropInOrder, value.InOrder, null, null); + writer.WriteProperty(options, PropInOrder, value.InOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs index 93a7fab4a82..e3be13405af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery Read(ref Sys LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDist.TryReadProperty(ref reader, options, PropDist, null)) + if (propDist.TryReadProperty(ref reader, options, PropDist, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,12 +65,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery Read(ref Sys continue; } - if (propPost.TryReadProperty(ref reader, options, PropPost, null)) + if (propPost.TryReadProperty(ref reader, options, PropPost, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPre.TryReadProperty(ref reader, options, PropPre, null)) + if (propPre.TryReadProperty(ref reader, options, PropPre, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropDist, value.Dist, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDist, value.Dist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); - writer.WriteProperty(options, PropPost, value.Post, null, null); - writer.WriteProperty(options, PropPre, value.Pre, null, null); + writer.WriteProperty(options, PropPost, value.Post, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPre, value.Pre, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs index 0bb8c1d4c29..b36393e4a3a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanOrQuery Read(ref Syst LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanOrQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanOrQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClauses, value.Clauses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs index 64a6d292c43..f75adba08c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,9 +93,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs index bc30350a122..9f75c66a26b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanWithinQuery Read(ref continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBig, value.Big, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLittle, value.Little, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs index c62b0df0ee0..cf4fec81b22 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SparseVectorQuery Read(re object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SparseVectorQuery Read(re continue; } - if (propPrune.TryReadProperty(ref reader, options, PropPrune, null)) + if (propPrune.TryReadProperty(ref reader, options, PropPrune, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,9 +121,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.SparseVectorQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropPrune, value.Prune, null, null); + writer.WriteProperty(options, PropPrune, value.Prune, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPruningConfig, value.PruningConfig, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs index 90c9e99c82b..fedfe704d21 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,10 +100,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs index 46d01c44851..f6343e31e1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -50,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S LocalJsonValue propRelation = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,15 +113,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGt, value.Gt, null, null); writer.WriteProperty(options, PropGte, value.Gte, null, null); writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs index ca8e81625c8..6df7b35d035 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery Read(ref Syste LocalJsonValue propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery Read(ref Syste } propField.Initialized = propTerms.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propTerms.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propTerms.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -64,9 +64,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, value.Field, value.Terms, null, null); + writer.WriteProperty(options, value.Field, value.Terms, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs index 765975ada69..3e6005c5143 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy LocalJsonValue> propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,9 +105,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropMinimumShouldMatchField, value.MinimumShouldMatchField, null, null); writer.WriteProperty(options, PropMinimumShouldMatchScript, value.MinimumShouldMatchScript, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs index 5af194ed7b9..8d13ed985b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery Read(r reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery Read(r LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,9 +97,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropModelText, value.ModelText, null, null); writer.WriteProperty(options, PropPruningConfig, value.PruningConfig, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs index 6d7eda07928..462ad1f0976 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TokenPruningConfig Read(r LocalJsonValue propTokensWeightThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOnlyScorePrunedTokens.TryReadProperty(ref reader, options, PropOnlyScorePrunedTokens, null)) + if (propOnlyScorePrunedTokens.TryReadProperty(ref reader, options, PropOnlyScorePrunedTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTokensFreqRatioThreshold.TryReadProperty(ref reader, options, PropTokensFreqRatioThreshold, null)) + if (propTokensFreqRatioThreshold.TryReadProperty(ref reader, options, PropTokensFreqRatioThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTokensWeightThreshold.TryReadProperty(ref reader, options, PropTokensWeightThreshold, null)) + if (propTokensWeightThreshold.TryReadProperty(ref reader, options, PropTokensWeightThreshold, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TokenPruningConfig Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TokenPruningConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOnlyScorePrunedTokens, value.OnlyScorePrunedTokens, null, null); - writer.WriteProperty(options, PropTokensFreqRatioThreshold, value.TokensFreqRatioThreshold, null, null); - writer.WriteProperty(options, PropTokensWeightThreshold, value.TokensWeightThreshold, null, null); + writer.WriteProperty(options, PropOnlyScorePrunedTokens, value.OnlyScorePrunedTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTokensFreqRatioThreshold, value.TokensFreqRatioThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTokensWeightThreshold, value.TokensWeightThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs index 527d9d711b2..7c8c9b71df8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TypeQuery Read(ref System LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TypeQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TypeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs index 4e7f947ae19..e2756365268 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDecayFunction Read LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDecayFunction Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.UntypedDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs index 3ee0b466432..d2ca74d5faf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDistanceFeatureQue LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDistanceFeatureQue public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.UntypedDistanceFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropPivot, value.Pivot, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs index 70cfeb1b20b..4ffa4604eac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropGt, value.Gt, null, null); writer.WriteProperty(options, PropGte, value.Gte, null, null); writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs index 387bd281b0c..afa9b02f95c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery Read( reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery Read( LocalJsonValue> propTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPruningConfig, value.PruningConfig, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropTokens, value.Tokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs index f3aa63bca5c..134be008ca3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery Read(ref Sy LocalJsonValue propWildcard = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,10 +116,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs index f72bda4553f..4f16f9a5335 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WrapperQuery Read(ref Sys LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WrapperQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.WrapperQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs index a8f71cdbfcc..f5fdf9fe241 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryRules.QueryRule Read(ref Syst continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropActions, value.Actions, null, null); writer.WriteProperty(options, PropCriteria, value.Criteria, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRuleId, value.RuleId, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs index 842bb5964c5..46439d71722 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs @@ -27,6 +27,7 @@ internal sealed partial class RRFRetrieverConverter : System.Text.Json.Serializa { private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropRankConstant = System.Text.Json.JsonEncodedText.Encode("rank_constant"); private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); private static readonly System.Text.Json.JsonEncodedText PropRetrievers = System.Text.Json.JsonEncodedText.Encode("retrievers"); @@ -36,6 +37,7 @@ public override Elastic.Clients.Elasticsearch.RRFRetriever Read(ref System.Text. reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue?> propFilter = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propRankConstant = default; LocalJsonValue propRankWindowSize = default; LocalJsonValue> propRetrievers = default; @@ -46,17 +48,22 @@ public override Elastic.Clients.Elasticsearch.RRFRetriever Read(ref System.Text. continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, null)) + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,6 +87,7 @@ public override Elastic.Clients.Elasticsearch.RRFRetriever Read(ref System.Text. { Filter = propFilter.Value, MinScore = propMinScore.Value, + Name = propName.Value, RankConstant = propRankConstant.Value, RankWindowSize = propRankWindowSize.Value, Retrievers = propRetrievers.Value @@ -90,9 +98,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); - writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetrievers, value.Retrievers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } @@ -137,6 +146,13 @@ internal RRFRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. @@ -232,6 +248,17 @@ public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor MinScore( return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. @@ -388,6 +415,17 @@ public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor MinScore(float? valu return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescorerRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescorerRetriever.g.cs new file mode 100644 index 00000000000..9c14a9f9919 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescorerRetriever.g.cs @@ -0,0 +1,473 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class RescorerRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); + private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRescore = System.Text.Json.JsonEncodedText.Encode("rescore"); + private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); + + public override Elastic.Clients.Elasticsearch.RescorerRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue?> propFilter = default; + LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; + LocalJsonValue> propRescore = default; + LocalJsonValue propRetriever = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propFilter.TryReadProperty(ref reader, options, PropFilter, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRescore.TryReadProperty(ref reader, options, PropRescore, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) + { + continue; + } + + if (propRetriever.TryReadProperty(ref reader, options, PropRetriever, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Filter = propFilter.Value, + MinScore = propMinScore.Value, + Name = propName.Value, + Rescore = propRescore.Value, + Retriever = propRetriever.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.RescorerRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.RescorerRetrieverConverter))] +public sealed partial class RescorerRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetriever(System.Collections.Generic.ICollection rescore, Elastic.Clients.Elasticsearch.Retriever retriever) + { + Rescore = rescore; + Retriever = retriever; + } +#if NET7_0_OR_GREATER + public RescorerRetriever() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public RescorerRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public System.Collections.Generic.ICollection? Filter { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public float? MinScore { get; set; } + + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.ICollection Rescore { get; set; } + + /// + /// + /// Inner retriever. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Retriever Retriever { get; set; } +} + +public readonly partial struct RescorerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.RescorerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) => new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(System.Collections.Generic.ICollection value) + { + Instance.Rescore = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params Elastic.Clients.Elasticsearch.Core.Search.Rescore[] values) + { + Instance.Rescore = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor.Build(action)); + } + + Instance.Rescore = items; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.RescorerRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct RescorerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.RescorerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) => new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(System.Collections.Generic.ICollection value) + { + Instance.Rescore = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params Elastic.Clients.Elasticsearch.Core.Search.Rescore[] values) + { + Instance.Rescore = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor.Build(action)); + } + + Instance.Rescore = items; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor.Build(action)); + } + + Instance.Rescore = items; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(System.Action action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.RescorerRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs index f7d1e6f2f9c..073cc728a65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs @@ -26,6 +26,9 @@ namespace Elastic.Clients.Elasticsearch; internal sealed partial class RetrieverConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText VariantKnn = System.Text.Json.JsonEncodedText.Encode("knn"); + private static readonly System.Text.Json.JsonEncodedText VariantLinear = System.Text.Json.JsonEncodedText.Encode("linear"); + private static readonly System.Text.Json.JsonEncodedText VariantPinned = System.Text.Json.JsonEncodedText.Encode("pinned"); + private static readonly System.Text.Json.JsonEncodedText VariantRescorer = System.Text.Json.JsonEncodedText.Encode("rescorer"); private static readonly System.Text.Json.JsonEncodedText VariantRrf = System.Text.Json.JsonEncodedText.Encode("rrf"); private static readonly System.Text.Json.JsonEncodedText VariantRule = System.Text.Json.JsonEncodedText.Encode("rule"); private static readonly System.Text.Json.JsonEncodedText VariantStandard = System.Text.Json.JsonEncodedText.Encode("standard"); @@ -46,6 +49,30 @@ public override Elastic.Clients.Elasticsearch.Retriever Read(ref System.Text.Jso continue; } + if (reader.ValueTextEquals(VariantLinear)) + { + variantType = VariantLinear.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantPinned)) + { + variantType = VariantPinned.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantRescorer)) + { + variantType = VariantRescorer.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (reader.ValueTextEquals(VariantRrf)) { variantType = VariantRrf.Value; @@ -105,6 +132,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "knn": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.KnnRetriever)value.Variant, null, null); break; + case "linear": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.LinearRetriever)value.Variant, null, null); + break; + case "pinned": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.PinnedRetriever)value.Variant, null, null); + break; + case "rescorer": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.RescorerRetriever)value.Variant, null, null); + break; case "rrf": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.RRFRetriever)value.Variant, null, null); break; @@ -153,6 +189,28 @@ internal Retriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe /// public Elastic.Clients.Elasticsearch.KnnRetriever? Knn { get => GetVariant("knn"); set => SetVariant("knn", value); } + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetriever? Linear { get => GetVariant("linear"); set => SetVariant("linear", value); } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetriever? Pinned { get => GetVariant("pinned"); set => SetVariant("pinned", value); } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetriever? Rescorer { get => GetVariant("rescorer"); set => SetVariant("rescorer", value); } + /// /// /// A retriever that produces top documents from reciprocal rank fusion (RRF). @@ -182,6 +240,9 @@ internal Retriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe public Elastic.Clients.Elasticsearch.TextSimilarityReranker? TextSimilarityReranker { get => GetVariant("text_similarity_reranker"); set => SetVariant("text_similarity_reranker", value); } public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.KnnRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Knn = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.LinearRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Linear = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.PinnedRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Pinned = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.RescorerRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Rescorer = value }; public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.RRFRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Rrf = value }; public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.RuleRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Rule = value }; public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.StandardRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Standard = value }; @@ -247,6 +308,74 @@ public Elastic.Clients.Elasticsearch.RetrieverDescriptor Knn(System.A return this; } + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(Elastic.Clients.Elasticsearch.LinearRetriever? value) + { + Instance.Linear = value; + return this; + } + + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(System.Action> action) + { + Instance.Linear = Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(Elastic.Clients.Elasticsearch.PinnedRetriever? value) + { + Instance.Pinned = value; + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(System.Action> action) + { + Instance.Pinned = Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(Elastic.Clients.Elasticsearch.RescorerRetriever? value) + { + Instance.Rescorer = value; + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(System.Action> action) + { + Instance.Rescorer = Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor.Build(action); + return this; + } + /// /// /// A retriever that produces top documents from reciprocal rank fusion (RRF). @@ -407,6 +536,108 @@ public Elastic.Clients.Elasticsearch.RetrieverDescriptor Knn(System.Action + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(Elastic.Clients.Elasticsearch.LinearRetriever? value) + { + Instance.Linear = value; + return this; + } + + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(System.Action action) + { + Instance.Linear = Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(System.Action> action) + { + Instance.Linear = Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(Elastic.Clients.Elasticsearch.PinnedRetriever? value) + { + Instance.Pinned = value; + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(System.Action action) + { + Instance.Pinned = Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(System.Action> action) + { + Instance.Pinned = Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(Elastic.Clients.Elasticsearch.RescorerRetriever? value) + { + Instance.Rescorer = value; + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(System.Action action) + { + Instance.Rescorer = Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(System.Action> action) + { + Instance.Rescorer = Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor.Build(action); + return this; + } + /// /// /// A retriever that produces top documents from reciprocal rank fusion (RRF). diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs index bf00bb6fa71..2eb518d0398 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Rollup.RollupJobStatus Read(ref Sy continue; } - if (propUpgradedDocId.TryReadProperty(ref reader, options, PropUpgradedDocId, null)) + if (propUpgradedDocId.TryReadProperty(ref reader, options, PropUpgradedDocId, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCurrentPosition, value.CurrentPosition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropJobState, value.JobState, null, null); - writer.WriteProperty(options, PropUpgradedDocId, value.UpgradedDocId, null, null); + writer.WriteProperty(options, PropUpgradedDocId, value.UpgradedDocId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs index 07f5fc92086..be20a9713aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.RrfRank Read(ref System.Text.Json. LocalJsonValue propRankWindowSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, null)) + if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.RrfRank Read(ref System.Text.Json. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.RrfRank value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs index d28da52f8dd..a6d838fd184 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs @@ -28,6 +28,7 @@ internal sealed partial class RuleRetrieverConverter : System.Text.Json.Serializ private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropMatchCriteria = System.Text.Json.JsonEncodedText.Encode("match_criteria"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); private static readonly System.Text.Json.JsonEncodedText PropRulesetIds = System.Text.Json.JsonEncodedText.Encode("ruleset_ids"); @@ -38,6 +39,7 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text LocalJsonValue?> propFilter = default; LocalJsonValue propMatchCriteria = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propRankWindowSize = default; LocalJsonValue propRetriever = default; LocalJsonValue> propRulesetIds = default; @@ -53,12 +55,17 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text continue; } - if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) { continue; } @@ -88,6 +95,7 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text Filter = propFilter.Value, MatchCriteria = propMatchCriteria.Value, MinScore = propMinScore.Value, + Name = propName.Value, RankWindowSize = propRankWindowSize.Value, Retriever = propRetriever.Value, RulesetIds = propRulesetIds.Value @@ -99,10 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMatchCriteria, value.MatchCriteria, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); - writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } @@ -159,6 +168,13 @@ internal RuleRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// This value determines the size of the individual result set. @@ -269,6 +285,17 @@ public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor MinScore return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines the size of the individual result set. @@ -430,6 +457,17 @@ public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor MinScore(float? val return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines the size of the individual result set. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs index 2c746ec1963..366334209c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.ScoreSort Read(ref System.Text.Jso LocalJsonValue propOrder = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.ScoreSort Read(ref System.Text.Jso public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScoreSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs index 0ff4bb31a8e..3d8e0af5615 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Script Read(ref System.Text.Json.U continue; } - if (propLang.TryReadProperty(ref reader, options, PropLang, null)) + if (propLang.TryReadProperty(ref reader, options, PropLang, static Elastic.Clients.Elasticsearch.ScriptLanguage? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropLang, value.Lang, null, null); + writer.WriteProperty(options, PropLang, value.Lang, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.ScriptLanguage? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOptions, value.Options, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs index 3d72f6596cf..2aed450990f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.ScriptField Read(ref System.Text.J LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.ScriptField Read(ref System.Text.J public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScriptField value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs index 47eadc2edf3..90041477fd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.ScriptSortType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScriptSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.ScriptSortType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs index 956170445cd..b30afe6cb3a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs @@ -92,7 +92,7 @@ public override Elastic.Clients.Elasticsearch.SearchStats Read(ref System.Text.J continue; } - if (propOpenContexts.TryReadProperty(ref reader, options, PropOpenContexts, null)) + if (propOpenContexts.TryReadProperty(ref reader, options, PropOpenContexts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -198,7 +198,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFetchTimeInMillis, value.FetchTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropFetchTotal, value.FetchTotal, null, null); writer.WriteProperty(options, PropGroups, value.Groups, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropOpenContexts, value.OpenContexts, null, null); + writer.WriteProperty(options, PropOpenContexts, value.OpenContexts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryCurrent, value.QueryCurrent, null, null); writer.WriteProperty(options, PropQueryTime, value.QueryTime, null, null); writer.WriteProperty(options, PropQueryTimeInMillis, value.QueryTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs index f8acfd0daa7..9bc31550b1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te continue; } - if (propInvalidation.TryReadProperty(ref reader, options, PropInvalidation, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propInvalidation.TryReadProperty(ref reader, options, PropInvalidation, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -179,10 +179,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAccess, value.Access, null, null); writer.WriteProperty(options, PropCreation, value.Creation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropInvalidated, value.Invalidated, null, null); - writer.WriteProperty(options, PropInvalidation, value.Invalidation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropInvalidation, value.Invalidation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropLimitedBy, value.LimitedBy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropName, value.Name, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs index dfa954dfe67..de4f121fb88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKeyFiltersAggregation continue; } - if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, null)) + if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, null)) + if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilters, value.Filters, null, null); - writer.WriteProperty(options, PropKeyed, value.Keyed, null, null); - writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, null); + writer.WriteProperty(options, PropKeyed, value.Keyed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOtherBucketKey, value.OtherBucketKey, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs index 26d37cc0d4e..53238be937a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndexPrivilegesCheck Read LocalJsonValue> propPrivileges = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndexPrivilegesCheck Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.IndexPrivilegesCheck value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNames, value.Names, null, null); writer.WriteProperty(options, PropPrivileges, value.Privileges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs index 9cf65ee4b44..a30f93c646b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndicesPrivileges Read(re LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndicesPrivileges Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.IndicesPrivileges value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldSecurity, value.FieldSecurity, null, null); writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrivileges, value.Privileges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs index 5fb8b33d475..ec15d8251f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges R LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFieldSecurity, value.FieldSecurity, null, null); writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs index 27b21e26992..03458bc56b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Security.ReplicationAccess Read(re LocalJsonValue> propNames = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.ReplicationAccess Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.ReplicationAccess value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs index 2440efb702e..c1cc0c08b05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleTemplate Read(ref Sys LocalJsonValue propTemplate = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFormat.TryReadProperty(ref reader, options, PropFormat, null)) + if (propFormat.TryReadProperty(ref reader, options, PropFormat, static Elastic.Clients.Elasticsearch.Security.TemplateFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleTemplate Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RoleTemplate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFormat, value.Format, null, null); + writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Security.TemplateFormat? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs index 4f329afeb36..c9e7822df35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Security.SearchAccess Read(ref Sys LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Security.SearchAccess Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.SearchAccess value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldSecurity, value.FieldSecurity, null, null); writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs index 09f134ea338..861d13d5f68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Security.UserProfile Read(ref Syst continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLabels, value.Labels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropUid, value.Uid, null, null); writer.WriteProperty(options, PropUser, value.User, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs index ce64bfae5c6..87e0405d6b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Security.UserProfileWithMetadata R continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropDoc, value.Doc, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLabels, value.Labels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropLastSynchronized, value.LastSynchronized, null, null); writer.WriteProperty(options, PropUid, value.Uid, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs index e77280ab225..d87428ad2bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs @@ -109,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text continue; } - if (propIndexWriterMaxMemoryInBytes.TryReadProperty(ref reader, options, PropIndexWriterMaxMemoryInBytes, null)) + if (propIndexWriterMaxMemoryInBytes.TryReadProperty(ref reader, options, PropIndexWriterMaxMemoryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -247,7 +247,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFileSizes, value.FileSizes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFixedBitSet, value.FixedBitSet, null, null); writer.WriteProperty(options, PropFixedBitSetMemoryInBytes, value.FixedBitSetMemoryInBytes, null, null); - writer.WriteProperty(options, PropIndexWriterMaxMemoryInBytes, value.IndexWriterMaxMemoryInBytes, null, null); + writer.WriteProperty(options, PropIndexWriterMaxMemoryInBytes, value.IndexWriterMaxMemoryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexWriterMemory, value.IndexWriterMemory, null, null); writer.WriteProperty(options, PropIndexWriterMemoryInBytes, value.IndexWriterMemoryInBytes, null, null); writer.WriteProperty(options, PropMaxUnsafeAutoIdTimestamp, value.MaxUnsafeAutoIdTimestamp, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs index 12f0024f2c7..c2554ee2d28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.ShardStatistics Read(ref System.Te continue; } - if (propSkipped.TryReadProperty(ref reader, options, PropSkipped, null)) + if (propSkipped.TryReadProperty(ref reader, options, PropSkipped, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFailed, value.Failed, null, null); writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropSkipped, value.Skipped, null, null); + writer.WriteProperty(options, PropSkipped, value.Skipped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSuccessful, value.Successful, null, null); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs index 0310dba2d67..0b244f0dc31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Simulate.IngestDocumentSimulation } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out string value, null, null); + reader.ReadProperty(options, out string key, out string value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -114,7 +114,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs index 2c314c0390e..8da721b9620 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,7 +78,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propDeleteObjectsMaxSize.TryReadProperty(ref reader, options, PropDeleteObjectsMaxSize, null)) + if (propDeleteObjectsMaxSize.TryReadProperty(ref reader, options, PropDeleteObjectsMaxSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propMaxConcurrentBatchDeletes.TryReadProperty(ref reader, options, PropMaxConcurrentBatchDeletes, null)) + if (propMaxConcurrentBatchDeletes.TryReadProperty(ref reader, options, PropMaxConcurrentBatchDeletes, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,14 +140,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBasePath, value.BasePath, null, null); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); writer.WriteProperty(options, PropClient, value.Client, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContainer, value.Container, null, null); - writer.WriteProperty(options, PropDeleteObjectsMaxSize, value.DeleteObjectsMaxSize, null, null); + writer.WriteProperty(options, PropDeleteObjectsMaxSize, value.DeleteObjectsMaxSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocationMode, value.LocationMode, null, null); - writer.WriteProperty(options, PropMaxConcurrentBatchDeletes, value.MaxConcurrentBatchDeletes, null, null); + writer.WriteProperty(options, PropMaxConcurrentBatchDeletes, value.MaxConcurrentBatchDeletes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); - writer.WriteProperty(options, PropReadonly, value.Readonly, null, null); + writer.WriteProperty(options, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs index 3618b89fa58..ca8dbdd3b32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.DetailsInfo Read(ref Syst continue; } - if (propOverwriteElapsedNanos.TryReadProperty(ref reader, options, PropOverwriteElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propOverwriteElapsedNanos.TryReadProperty(ref reader, options, PropOverwriteElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -115,7 +115,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBlob, value.Blob, null, null); writer.WriteProperty(options, PropOverwriteElapsed, value.OverwriteElapsed, null, null); - writer.WriteProperty(options, PropOverwriteElapsedNanos, value.OverwriteElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropOverwriteElapsedNanos, value.OverwriteElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropWriteElapsed, value.WriteElapsed, null, null); writer.WriteProperty(options, PropWriteElapsedNanos, value.WriteElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropWriterNode, value.WriterNode, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs index 0c74d9ee65b..a96e5661560 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Rea continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Rea continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,10 +132,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBucket, value.Bucket, null, null); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); writer.WriteProperty(options, PropClient, value.Client, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); - writer.WriteProperty(options, PropReadonly, value.Readonly, null, null); + writer.WriteProperty(options, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs index db02f1ff1dd..c2c57a4d9f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref LocalJsonValue propThrottledNanos = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBeforeWriteComplete.TryReadProperty(ref reader, options, PropBeforeWriteComplete, null)) + if (propBeforeWriteComplete.TryReadProperty(ref reader, options, PropBeforeWriteComplete, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref continue; } - if (propElapsedNanos.TryReadProperty(ref reader, options, PropElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propElapsedNanos.TryReadProperty(ref reader, options, PropElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref continue; } - if (propThrottledNanos.TryReadProperty(ref reader, options, PropThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propThrottledNanos.TryReadProperty(ref reader, options, PropThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -121,15 +121,15 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBeforeWriteComplete, value.BeforeWriteComplete, null, null); + writer.WriteProperty(options, PropBeforeWriteComplete, value.BeforeWriteComplete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropElapsed, value.Elapsed, null, null); - writer.WriteProperty(options, PropElapsedNanos, value.ElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropElapsedNanos, value.ElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropFirstByteTime, value.FirstByteTime, null, null); writer.WriteProperty(options, PropFirstByteTimeNanos, value.FirstByteTimeNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropFound, value.Found, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); writer.WriteProperty(options, PropThrottled, value.Throttled, null, null); - writer.WriteProperty(options, PropThrottledNanos, value.ThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropThrottledNanos, value.ThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs index 49768335a28..00b6fa3f0f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs @@ -52,12 +52,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySett continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHttpMaxRetries.TryReadProperty(ref reader, options, PropHttpMaxRetries, null)) + if (propHttpMaxRetries.TryReadProperty(ref reader, options, PropHttpMaxRetries, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySett continue; } - if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, null)) + if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,10 +114,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); - writer.WriteProperty(options, PropHttpMaxRetries, value.HttpMaxRetries, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHttpMaxRetries, value.HttpMaxRetries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHttpSocketTimeout, value.HttpSocketTimeout, null, null); - writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, null); + writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); writer.WriteProperty(options, PropUrl, value.Url, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs index 156f20f0959..d0e0d057000 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleteObjectsMaxSize.TryReadProperty(ref reader, options, PropDeleteObjectsMaxSize, null)) + if (propDeleteObjectsMaxSize.TryReadProperty(ref reader, options, PropDeleteObjectsMaxSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,12 +114,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propMaxMultipartParts.TryReadProperty(ref reader, options, PropMaxMultipartParts, null)) + if (propMaxMultipartParts.TryReadProperty(ref reader, options, PropMaxMultipartParts, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxMultipartUploadCleanupSize.TryReadProperty(ref reader, options, PropMaxMultipartUploadCleanupSize, null)) + if (propMaxMultipartUploadCleanupSize.TryReadProperty(ref reader, options, PropMaxMultipartUploadCleanupSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,12 +134,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propServerSideEncryption.TryReadProperty(ref reader, options, PropServerSideEncryption, null)) + if (propServerSideEncryption.TryReadProperty(ref reader, options, PropServerSideEncryption, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,7 +159,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propThrottledDeleteRetryMaximumNumberOfRetries.TryReadProperty(ref reader, options, PropThrottledDeleteRetryMaximumNumberOfRetries, null)) + if (propThrottledDeleteRetryMaximumNumberOfRetries.TryReadProperty(ref reader, options, PropThrottledDeleteRetryMaximumNumberOfRetries, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -207,19 +207,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCannedAcl, value.CannedAcl, null, null); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); writer.WriteProperty(options, PropClient, value.Client, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); - writer.WriteProperty(options, PropDeleteObjectsMaxSize, value.DeleteObjectsMaxSize, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleteObjectsMaxSize, value.DeleteObjectsMaxSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGetRegisterRetryDelay, value.GetRegisterRetryDelay, null, null); - writer.WriteProperty(options, PropMaxMultipartParts, value.MaxMultipartParts, null, null); - writer.WriteProperty(options, PropMaxMultipartUploadCleanupSize, value.MaxMultipartUploadCleanupSize, null, null); + writer.WriteProperty(options, PropMaxMultipartParts, value.MaxMultipartParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxMultipartUploadCleanupSize, value.MaxMultipartUploadCleanupSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); - writer.WriteProperty(options, PropReadonly, value.Readonly, null, null); - writer.WriteProperty(options, PropServerSideEncryption, value.ServerSideEncryption, null, null); + writer.WriteProperty(options, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropServerSideEncryption, value.ServerSideEncryption, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStorageClass, value.StorageClass, null, null); writer.WriteProperty(options, PropThrottledDeleteRetryDelayIncrement, value.ThrottledDeleteRetryDelayIncrement, null, null); writer.WriteProperty(options, PropThrottledDeleteRetryMaximumDelay, value.ThrottledDeleteRetryMaximumDelay, null, null); - writer.WriteProperty(options, PropThrottledDeleteRetryMaximumNumberOfRetries, value.ThrottledDeleteRetryMaximumNumberOfRetries, null, null); + writer.WriteProperty(options, PropThrottledDeleteRetryMaximumNumberOfRetries, value.ThrottledDeleteRetryMaximumNumberOfRetries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs index 04bf0fa089f..25f7bd6e4da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs @@ -50,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositor continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositor continue; } - if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, null)) + if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositor continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocation, value.Location, null, null); - writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, null); + writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); - writer.WriteProperty(options, PropReadonly, value.Readonly, null, null); + writer.WriteProperty(options, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs index f9d744ae28b..770edd990a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs @@ -83,17 +83,17 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propDurationInMillis.TryReadProperty(ref reader, options, PropDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propDurationInMillis.TryReadProperty(ref reader, options, PropDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propEndTimeInMillis.TryReadProperty(ref reader, options, PropEndTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propEndTimeInMillis.TryReadProperty(ref reader, options, PropEndTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -108,7 +108,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,12 +148,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -173,7 +173,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propVersionId.TryReadProperty(ref reader, options, PropVersionId, null)) + if (propVersionId.TryReadProperty(ref reader, options, PropVersionId, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -219,12 +219,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreams, value.DataStreams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDuration, value.Duration, null, null); - writer.WriteProperty(options, PropDurationInMillis, value.DurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropEndTimeInMillis, value.EndTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropDurationInMillis, value.DurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropEndTimeInMillis, value.EndTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropFeatureStates, value.FeatureStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, null); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexDetails, value.IndexDetails, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); @@ -232,12 +232,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRepository, value.Repository, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSnapshot, value.Snapshot, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropState, value.State, null, null); writer.WriteProperty(options, PropUuid, value.Uuid, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionId, value.VersionId, null, null); + writer.WriteProperty(options, PropVersionId, value.VersionId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs index b53950ba72b..214e93e3ded 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySetti continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySetti continue; } - if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, null)) + if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySetti continue; } - if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, null) || propReadOnly.TryReadProperty(ref reader, options, PropReadOnly1, null)) + if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propReadOnly.TryReadProperty(ref reader, options, PropReadOnly1, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,12 +107,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDelegateType, value.DelegateType, null, null); - writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, null); + writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); - writer.WriteProperty(options, PropReadOnly, value.ReadOnly, null, null); + writer.WriteProperty(options, PropReadOnly, value.ReadOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs index 8a058289062..6cc46819e7a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs @@ -48,12 +48,12 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SlmCon continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SlmCon continue; } - if (propPartial.TryReadProperty(ref reader, options, PropPartial, null)) + if (propPartial.TryReadProperty(ref reader, options, PropPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFeatureStates, value.FeatureStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); - writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, null); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropPartial, value.Partial, null, null); + writer.WriteProperty(options, PropPartial, value.Partial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs index 4275e774da4..8d8c6982e2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Snapsh continue; } - if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Snapsh continue; } - if (propNextExecution.TryReadProperty(ref reader, options, PropNextExecution, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propNextExecution.TryReadProperty(ref reader, options, PropNextExecution, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -132,9 +132,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInProgress, value.InProgress, null, null); writer.WriteProperty(options, PropLastFailure, value.LastFailure, null, null); writer.WriteProperty(options, PropLastSuccess, value.LastSuccess, null, null); - writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropModifiedDateMillis, value.ModifiedDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropNextExecution, value.NextExecution, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropNextExecution, value.NextExecution, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropNextExecutionMillis, value.NextExecutionMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropPolicy, value.Policy, null, null); writer.WriteProperty(options, PropStats, value.Stats, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotPolicyStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotPolicyStats.g.cs new file mode 100644 index 00000000000..e0f931fce93 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotPolicyStats.g.cs @@ -0,0 +1,155 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; + +internal sealed partial class SnapshotPolicyStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropPolicy = System.Text.Json.JsonEncodedText.Encode("policy"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotDeletionFailures = System.Text.Json.JsonEncodedText.Encode("snapshot_deletion_failures"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotsDeleted = System.Text.Json.JsonEncodedText.Encode("snapshots_deleted"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotsFailed = System.Text.Json.JsonEncodedText.Encode("snapshots_failed"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotsTaken = System.Text.Json.JsonEncodedText.Encode("snapshots_taken"); + + public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propPolicy = default; + LocalJsonValue propSnapshotDeletionFailures = default; + LocalJsonValue propSnapshotsDeleted = default; + LocalJsonValue propSnapshotsFailed = default; + LocalJsonValue propSnapshotsTaken = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propPolicy.TryReadProperty(ref reader, options, PropPolicy, null)) + { + continue; + } + + if (propSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropSnapshotDeletionFailures, null)) + { + continue; + } + + if (propSnapshotsDeleted.TryReadProperty(ref reader, options, PropSnapshotsDeleted, null)) + { + continue; + } + + if (propSnapshotsFailed.TryReadProperty(ref reader, options, PropSnapshotsFailed, null)) + { + continue; + } + + if (propSnapshotsTaken.TryReadProperty(ref reader, options, PropSnapshotsTaken, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Policy = propPolicy.Value, + SnapshotDeletionFailures = propSnapshotDeletionFailures.Value, + SnapshotsDeleted = propSnapshotsDeleted.Value, + SnapshotsFailed = propSnapshotsFailed.Value, + SnapshotsTaken = propSnapshotsTaken.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropPolicy, value.Policy, null, null); + writer.WriteProperty(options, PropSnapshotDeletionFailures, value.SnapshotDeletionFailures, null, null); + writer.WriteProperty(options, PropSnapshotsDeleted, value.SnapshotsDeleted, null, null); + writer.WriteProperty(options, PropSnapshotsFailed, value.SnapshotsFailed, null, null); + writer.WriteProperty(options, PropSnapshotsTaken, value.SnapshotsTaken, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStatsConverter))] +public sealed partial class SnapshotPolicyStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SnapshotPolicyStats(string policy, long snapshotDeletionFailures, long snapshotsDeleted, long snapshotsFailed, long snapshotsTaken) + { + Policy = policy; + SnapshotDeletionFailures = snapshotDeletionFailures; + SnapshotsDeleted = snapshotsDeleted; + SnapshotsFailed = snapshotsFailed; + SnapshotsTaken = snapshotsTaken; + } +#if NET7_0_OR_GREATER + public SnapshotPolicyStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public SnapshotPolicyStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SnapshotPolicyStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + string Policy { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotDeletionFailures { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotsDeleted { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotsFailed { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotsTaken { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs index aa89a668523..f9eb24c1db6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs @@ -65,42 +65,42 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Statis continue; } - if (propRetentionDeletionTimeMillis.TryReadProperty(ref reader, options, PropRetentionDeletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propRetentionDeletionTimeMillis.TryReadProperty(ref reader, options, PropRetentionDeletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propRetentionFailed.TryReadProperty(ref reader, options, PropRetentionFailed, null)) + if (propRetentionFailed.TryReadProperty(ref reader, options, PropRetentionFailed, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRetentionRuns.TryReadProperty(ref reader, options, PropRetentionRuns, null)) + if (propRetentionRuns.TryReadProperty(ref reader, options, PropRetentionRuns, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRetentionTimedOut.TryReadProperty(ref reader, options, PropRetentionTimedOut, null)) + if (propRetentionTimedOut.TryReadProperty(ref reader, options, PropRetentionTimedOut, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures, null) || propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures1, null)) + if (propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted, null) || propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted1, null)) + if (propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed, null) || propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed1, null)) + if (propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken, null) || propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken1, null)) + if (propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -135,14 +135,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropPolicy, value.Policy, null, null); writer.WriteProperty(options, PropRetentionDeletionTime, value.RetentionDeletionTime, null, null); - writer.WriteProperty(options, PropRetentionDeletionTimeMillis, value.RetentionDeletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropRetentionFailed, value.RetentionFailed, null, null); - writer.WriteProperty(options, PropRetentionRuns, value.RetentionRuns, null, null); - writer.WriteProperty(options, PropRetentionTimedOut, value.RetentionTimedOut, null, null); - writer.WriteProperty(options, PropTotalSnapshotDeletionFailures, value.TotalSnapshotDeletionFailures, null, null); - writer.WriteProperty(options, PropTotalSnapshotsDeleted, value.TotalSnapshotsDeleted, null, null); - writer.WriteProperty(options, PropTotalSnapshotsFailed, value.TotalSnapshotsFailed, null, null); - writer.WriteProperty(options, PropTotalSnapshotsTaken, value.TotalSnapshotsTaken, null, null); + writer.WriteProperty(options, PropRetentionDeletionTimeMillis, value.RetentionDeletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropRetentionFailed, value.RetentionFailed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRetentionRuns, value.RetentionRuns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRetentionTimedOut, value.RetentionTimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotDeletionFailures, value.TotalSnapshotDeletionFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotsDeleted, value.TotalSnapshotsDeleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotsFailed, value.TotalSnapshotsFailed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotsTaken, value.TotalSnapshotsTaken, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SpecifiedDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SpecifiedDocument.g.cs new file mode 100644 index 00000000000..985dc03f097 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SpecifiedDocument.g.cs @@ -0,0 +1,145 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class SpecifiedDocumentConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); + private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("index"); + + public override Elastic.Clients.Elasticsearch.SpecifiedDocument Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propId = default; + LocalJsonValue propIndex = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propId.TryReadProperty(ref reader, options, PropId, null)) + { + continue; + } + + if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Id = propId.Value, + Index = propIndex.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SpecifiedDocument value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropId, value.Id, null, null); + writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.SpecifiedDocumentConverter))] +public sealed partial class SpecifiedDocument +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SpecifiedDocument(Elastic.Clients.Elasticsearch.Id id) + { + Id = id; + } +#if NET7_0_OR_GREATER + public SpecifiedDocument() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public SpecifiedDocument() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Id Id { get; set; } + public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } +} + +public readonly partial struct SpecifiedDocumentDescriptor +{ + internal Elastic.Clients.Elasticsearch.SpecifiedDocument Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SpecifiedDocumentDescriptor(Elastic.Clients.Elasticsearch.SpecifiedDocument instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SpecifiedDocumentDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor(Elastic.Clients.Elasticsearch.SpecifiedDocument instance) => new Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.SpecifiedDocument(Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Id value) + { + Instance.Id = value; + return this; + } + + public Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? value) + { + Instance.Index = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.SpecifiedDocument Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor(new Elastic.Clients.Elasticsearch.SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs index 621665cb133..d8653cfcb36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs @@ -28,6 +28,7 @@ internal sealed partial class StandardRetrieverConverter : System.Text.Json.Seri private static readonly System.Text.Json.JsonEncodedText PropCollapse = System.Text.Json.JsonEncodedText.Encode("collapse"); private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query"); private static readonly System.Text.Json.JsonEncodedText PropSearchAfter = System.Text.Json.JsonEncodedText.Encode("search_after"); private static readonly System.Text.Json.JsonEncodedText PropSort = System.Text.Json.JsonEncodedText.Encode("sort"); @@ -39,6 +40,7 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. LocalJsonValue propCollapse = default; LocalJsonValue?> propFilter = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propQuery = default; LocalJsonValue?> propSearchAfter = default; LocalJsonValue?> propSort = default; @@ -55,7 +57,12 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; } @@ -75,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,6 +102,7 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. Collapse = propCollapse.Value, Filter = propFilter.Value, MinScore = propMinScore.Value, + Name = propName.Value, Query = propQuery.Value, SearchAfter = propSearchAfter.Value, Sort = propSort.Value, @@ -107,11 +115,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -156,6 +165,13 @@ internal StandardRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// Defines a query to retrieve a set of top documents. @@ -276,6 +292,17 @@ public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor MinS return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Defines a query to retrieve a set of top documents. @@ -503,6 +530,17 @@ public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor MinScore(float? return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Defines a query to retrieve a set of top documents. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs index 9e7c058cfe0..4e324ed688b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.StoreStats Read(ref System.Text.Js continue; } - if (propTotalDataSetSizeInBytes.TryReadProperty(ref reader, options, PropTotalDataSetSizeInBytes, null)) + if (propTotalDataSetSizeInBytes.TryReadProperty(ref reader, options, PropTotalDataSetSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropSize, value.Size, null, null); writer.WriteProperty(options, PropSizeInBytes, value.SizeInBytes, null, null); writer.WriteProperty(options, PropTotalDataSetSize, value.TotalDataSetSize, null, null); - writer.WriteProperty(options, PropTotalDataSetSizeInBytes, value.TotalDataSetSizeInBytes, null, null); + writer.WriteProperty(options, PropTotalDataSetSizeInBytes, value.TotalDataSetSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs index 840375157f5..68d6298a20a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Tasks.ParentTaskInfo Read(ref Syst continue; } - if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, null)) + if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -163,7 +163,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAction, value.Action, null, null); writer.WriteProperty(options, PropCancellable, value.Cancellable, null, null); - writer.WriteProperty(options, PropCancelled, value.Cancelled, null, null); + writer.WriteProperty(options, PropCancelled, value.Cancelled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropChildren, value.Children, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropHeaders, value.Headers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs index 80fd06c5dfd..38bc50022b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Tasks.TaskInfo Read(ref System.Tex continue; } - if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, null)) + if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,7 +155,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAction, value.Action, null, null); writer.WriteProperty(options, PropCancellable, value.Cancellable, null, null); - writer.WriteProperty(options, PropCancelled, value.Cancelled, null, null); + writer.WriteProperty(options, PropCancelled, value.Cancelled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropHeaders, value.Headers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs index ec5f68359d5..02af0a23895 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs @@ -30,6 +30,7 @@ internal sealed partial class TextSimilarityRerankerConverter : System.Text.Json private static readonly System.Text.Json.JsonEncodedText PropInferenceId = System.Text.Json.JsonEncodedText.Encode("inference_id"); private static readonly System.Text.Json.JsonEncodedText PropInferenceText = System.Text.Json.JsonEncodedText.Encode("inference_text"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); @@ -41,6 +42,7 @@ public override Elastic.Clients.Elasticsearch.TextSimilarityReranker Read(ref Sy LocalJsonValue propInferenceId = default; LocalJsonValue propInferenceText = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propRankWindowSize = default; LocalJsonValue propRetriever = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -65,12 +67,17 @@ public override Elastic.Clients.Elasticsearch.TextSimilarityReranker Read(ref Sy continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,6 +104,7 @@ public override Elastic.Clients.Elasticsearch.TextSimilarityReranker Read(ref Sy InferenceId = propInferenceId.Value, InferenceText = propInferenceText.Value, MinScore = propMinScore.Value, + Name = propName.Value, RankWindowSize = propRankWindowSize.Value, Retriever = propRetriever.Value }; @@ -109,8 +117,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropInferenceId, value.InferenceId, null, null); writer.WriteProperty(options, PropInferenceText, value.InferenceText, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); writer.WriteEndObject(); } @@ -176,6 +185,13 @@ internal TextSimilarityReranker(Elastic.Clients.Elasticsearch.Serialization.Json /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// This value determines how many documents we will consider from the nested retriever. @@ -297,6 +313,17 @@ public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how many documents we will consider from the nested retriever. @@ -458,6 +485,17 @@ public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor MinScore(f return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how many documents we will consider from the nested retriever. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs index a1753e74641..9cf5488b3d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs @@ -69,22 +69,22 @@ public override Elastic.Clients.Elasticsearch.TextStructure.FieldStat Read(ref S continue; } - if (propMaxValue.TryReadProperty(ref reader, options, PropMaxValue, null)) + if (propMaxValue.TryReadProperty(ref reader, options, PropMaxValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMeanValue.TryReadProperty(ref reader, options, PropMeanValue, null)) + if (propMeanValue.TryReadProperty(ref reader, options, PropMeanValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMedianValue.TryReadProperty(ref reader, options, PropMedianValue, null)) + if (propMedianValue.TryReadProperty(ref reader, options, PropMedianValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinValue.TryReadProperty(ref reader, options, PropMinValue, null)) + if (propMinValue.TryReadProperty(ref reader, options, PropMinValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,10 +125,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropEarliest, value.Earliest, null, null); writer.WriteProperty(options, PropLatest, value.Latest, null, null); - writer.WriteProperty(options, PropMaxValue, value.MaxValue, null, null); - writer.WriteProperty(options, PropMeanValue, value.MeanValue, null, null); - writer.WriteProperty(options, PropMedianValue, value.MedianValue, null, null); - writer.WriteProperty(options, PropMinValue, value.MinValue, null, null); + writer.WriteProperty(options, PropMaxValue, value.MaxValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMeanValue, value.MeanValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMedianValue, value.MedianValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinValue, value.MinValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTopHits, value.TopHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs index 3685030fc5a..35c259d0c87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs @@ -53,22 +53,22 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.CheckpointStat continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propTimestampMillis.TryReadProperty(ref reader, options, PropTimestampMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propTimestampMillis.TryReadProperty(ref reader, options, PropTimestampMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propTimeUpperBound.TryReadProperty(ref reader, options, PropTimeUpperBound, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimeUpperBound.TryReadProperty(ref reader, options, PropTimeUpperBound, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propTimeUpperBoundMillis.TryReadProperty(ref reader, options, PropTimeUpperBoundMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propTimeUpperBoundMillis.TryReadProperty(ref reader, options, PropTimeUpperBoundMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -99,10 +99,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCheckpoint, value.Checkpoint, null, null); writer.WriteProperty(options, PropCheckpointProgress, value.CheckpointProgress, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropTimestampMillis, value.TimestampMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimeUpperBound, value.TimeUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropTimeUpperBoundMillis, value.TimeUpperBoundMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimestampMillis, value.TimestampMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimeUpperBound, value.TimeUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimeUpperBoundMillis, value.TimeUpperBoundMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs index b6229179118..b3854e24e57 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing LocalJsonValue propOperationsBehind = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propChangesLastDetectedAt.TryReadProperty(ref reader, options, PropChangesLastDetectedAt, null)) + if (propChangesLastDetectedAt.TryReadProperty(ref reader, options, PropChangesLastDetectedAt, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propChangesLastDetectedAtString.TryReadProperty(ref reader, options, PropChangesLastDetectedAtString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propChangesLastDetectedAtString.TryReadProperty(ref reader, options, PropChangesLastDetectedAtString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -60,12 +60,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing continue; } - if (propLastSearchTime.TryReadProperty(ref reader, options, PropLastSearchTime, null)) + if (propLastSearchTime.TryReadProperty(ref reader, options, PropLastSearchTime, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLastSearchTimeString.TryReadProperty(ref reader, options, PropLastSearchTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propLastSearchTimeString.TryReadProperty(ref reader, options, PropLastSearchTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing continue; } - if (propOperationsBehind.TryReadProperty(ref reader, options, PropOperationsBehind, null)) + if (propOperationsBehind.TryReadProperty(ref reader, options, PropOperationsBehind, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropChangesLastDetectedAt, value.ChangesLastDetectedAt, null, null); - writer.WriteProperty(options, PropChangesLastDetectedAtString, value.ChangesLastDetectedAtString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropChangesLastDetectedAt, value.ChangesLastDetectedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropChangesLastDetectedAtString, value.ChangesLastDetectedAtString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropLast, value.Last, null, null); - writer.WriteProperty(options, PropLastSearchTime, value.LastSearchTime, null, null); - writer.WriteProperty(options, PropLastSearchTimeString, value.LastSearchTimeString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropLastSearchTime, value.LastSearchTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLastSearchTimeString, value.LastSearchTimeString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropNext, value.Next, null, null); - writer.WriteProperty(options, PropOperationsBehind, value.OperationsBehind, null, null); + writer.WriteProperty(options, PropOperationsBehind, value.OperationsBehind, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs index 758a9c88a74..b56d4c54394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Settings Read( LocalJsonValue propUnattended = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlignCheckpoints.TryReadProperty(ref reader, options, PropAlignCheckpoints, null)) + if (propAlignCheckpoints.TryReadProperty(ref reader, options, PropAlignCheckpoints, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDatesAsEpochMillis.TryReadProperty(ref reader, options, PropDatesAsEpochMillis, null)) + if (propDatesAsEpochMillis.TryReadProperty(ref reader, options, PropDatesAsEpochMillis, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeduceMappings.TryReadProperty(ref reader, options, PropDeduceMappings, null)) + if (propDeduceMappings.TryReadProperty(ref reader, options, PropDeduceMappings, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDocsPerSecond.TryReadProperty(ref reader, options, PropDocsPerSecond, null)) + if (propDocsPerSecond.TryReadProperty(ref reader, options, PropDocsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPageSearchSize.TryReadProperty(ref reader, options, PropMaxPageSearchSize, null)) + if (propMaxPageSearchSize.TryReadProperty(ref reader, options, PropMaxPageSearchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnattended.TryReadProperty(ref reader, options, PropUnattended, null)) + if (propUnattended.TryReadProperty(ref reader, options, PropUnattended, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Settings Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.Settings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlignCheckpoints, value.AlignCheckpoints, null, null); - writer.WriteProperty(options, PropDatesAsEpochMillis, value.DatesAsEpochMillis, null, null); - writer.WriteProperty(options, PropDeduceMappings, value.DeduceMappings, null, null); - writer.WriteProperty(options, PropDocsPerSecond, value.DocsPerSecond, null, null); - writer.WriteProperty(options, PropMaxPageSearchSize, value.MaxPageSearchSize, null, null); - writer.WriteProperty(options, PropUnattended, value.Unattended, null, null); + writer.WriteProperty(options, PropAlignCheckpoints, value.AlignCheckpoints, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDatesAsEpochMillis, value.DatesAsEpochMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeduceMappings, value.DeduceMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDocsPerSecond, value.DocsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPageSearchSize, value.MaxPageSearchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnattended, value.Unattended, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs index 7caaf185ba6..5204bfb64fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformHealt continue; } - if (propFirstOccurenceString.TryReadProperty(ref reader, options, PropFirstOccurenceString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propFirstOccurenceString.TryReadProperty(ref reader, options, PropFirstOccurenceString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propFirstOccurrence.TryReadProperty(ref reader, options, PropFirstOccurrence, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propFirstOccurrence.TryReadProperty(ref reader, options, PropFirstOccurrence, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropDetails, value.Details, null, null); - writer.WriteProperty(options, PropFirstOccurenceString, value.FirstOccurenceString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); - writer.WriteProperty(options, PropFirstOccurrence, value.FirstOccurrence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropFirstOccurenceString, value.FirstOccurenceString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropFirstOccurrence, value.FirstOccurrence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssue, value.Issue, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs index cdd25615ced..1feebb61d6b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs @@ -65,12 +65,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformIndex LocalJsonValue propTriggerCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeleteTimeInMs.TryReadProperty(ref reader, options, PropDeleteTimeInMs, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propDeleteTimeInMs.TryReadProperty(ref reader, options, PropDeleteTimeInMs, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propDocumentsDeleted.TryReadProperty(ref reader, options, PropDocumentsDeleted, null)) + if (propDocumentsDeleted.TryReadProperty(ref reader, options, PropDocumentsDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -185,8 +185,8 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformIndex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.TransformIndexerStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeleteTimeInMs, value.DeleteTimeInMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropDocumentsDeleted, value.DocumentsDeleted, null, null); + writer.WriteProperty(options, PropDeleteTimeInMs, value.DeleteTimeInMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropDocumentsDeleted, value.DocumentsDeleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDocumentsIndexed, value.DocumentsIndexed, null, null); writer.WriteProperty(options, PropDocumentsProcessed, value.DocumentsProcessed, null, null); writer.WriteProperty(options, PropExponentialAvgCheckpointDurationMs, value.ExponentialAvgCheckpointDurationMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs index d4a0026b3a6..722cdc1551a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformProgr continue; } - if (propDocsRemaining.TryReadProperty(ref reader, options, PropDocsRemaining, null)) + if (propDocsRemaining.TryReadProperty(ref reader, options, PropDocsRemaining, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPercentComplete.TryReadProperty(ref reader, options, PropPercentComplete, null)) + if (propPercentComplete.TryReadProperty(ref reader, options, PropPercentComplete, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalDocs.TryReadProperty(ref reader, options, PropTotalDocs, null)) + if (propTotalDocs.TryReadProperty(ref reader, options, PropTotalDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDocsIndexed, value.DocsIndexed, null, null); writer.WriteProperty(options, PropDocsProcessed, value.DocsProcessed, null, null); - writer.WriteProperty(options, PropDocsRemaining, value.DocsRemaining, null, null); - writer.WriteProperty(options, PropPercentComplete, value.PercentComplete, null, null); - writer.WriteProperty(options, PropTotalDocs, value.TotalDocs, null, null); + writer.WriteProperty(options, PropDocsRemaining, value.DocsRemaining, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPercentComplete, value.PercentComplete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalDocs, value.TotalDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs index eae1a5fc558..c7500d8e625 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformSumma continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propCreateTimeString.TryReadProperty(ref reader, options, PropCreateTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTimeString.TryReadProperty(ref reader, options, PropCreateTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -170,8 +170,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAuthorization, value.Authorization, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropCreateTimeString, value.CreateTimeString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreateTimeString, value.CreateTimeString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); writer.WriteProperty(options, PropFrequency, value.Frequency, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs index 441b1e7ebab..ace85cd9744 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.AnalyticsStatistics Read(ref continue; } - if (propMultiTermsUsage.TryReadProperty(ref reader, options, PropMultiTermsUsage, null)) + if (propMultiTermsUsage.TryReadProperty(ref reader, options, PropMultiTermsUsage, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,7 +124,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBoxplotUsage, value.BoxplotUsage, null, null); writer.WriteProperty(options, PropCumulativeCardinalityUsage, value.CumulativeCardinalityUsage, null, null); writer.WriteProperty(options, PropMovingPercentilesUsage, value.MovingPercentilesUsage, null, null); - writer.WriteProperty(options, PropMultiTermsUsage, value.MultiTermsUsage, null, null); + writer.WriteProperty(options, PropMultiTermsUsage, value.MultiTermsUsage, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNormalizeUsage, value.NormalizeUsage, null, null); writer.WriteProperty(options, PropRateUsage, value.RateUsage, null, null); writer.WriteProperty(options, PropStringStatsUsage, value.StringStatsUsage, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs index fcc9656279c..9d7f26a6056 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlDataFrameAnalyticsJobsAnal LocalJsonValue propRegression = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propClassification.TryReadProperty(ref reader, options, PropClassification, null)) + if (propClassification.TryReadProperty(ref reader, options, PropClassification, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutlierDetection.TryReadProperty(ref reader, options, PropOutlierDetection, null)) + if (propOutlierDetection.TryReadProperty(ref reader, options, PropOutlierDetection, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRegression.TryReadProperty(ref reader, options, PropRegression, null)) + if (propRegression.TryReadProperty(ref reader, options, PropRegression, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlDataFrameAnalyticsJobsAnal public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.MlDataFrameAnalyticsJobsAnalysis value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropClassification, value.Classification, null, null); - writer.WriteProperty(options, PropOutlierDetection, value.OutlierDetection, null, null); - writer.WriteProperty(options, PropRegression, value.Regression, null, null); + writer.WriteProperty(options, PropClassification, value.Classification, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutlierDetection, value.OutlierDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRegression, value.Regression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs index 5fbeca6e4c4..df1d5468283 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propClassification.TryReadProperty(ref reader, options, PropClassification, null)) + if (propClassification.TryReadProperty(ref reader, options, PropClassification, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNer.TryReadProperty(ref reader, options, PropNer, null)) + if (propNer.TryReadProperty(ref reader, options, PropNer, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun continue; } - if (propPassThrough.TryReadProperty(ref reader, options, PropPassThrough, null)) + if (propPassThrough.TryReadProperty(ref reader, options, PropPassThrough, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun continue; } - if (propRegression.TryReadProperty(ref reader, options, PropRegression, null)) + if (propRegression.TryReadProperty(ref reader, options, PropRegression, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTextEmbedding.TryReadProperty(ref reader, options, PropTextEmbedding, null)) + if (propTextEmbedding.TryReadProperty(ref reader, options, PropTextEmbedding, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,13 +113,13 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCount value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropClassification, value.Classification, null, null); - writer.WriteProperty(options, PropNer, value.Ner, null, null); + writer.WriteProperty(options, PropClassification, value.Classification, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNer, value.Ner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOther, value.Other, null, null); - writer.WriteProperty(options, PropPassThrough, value.PassThrough, null, null); + writer.WriteProperty(options, PropPassThrough, value.PassThrough, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrepackaged, value.Prepackaged, null, null); - writer.WriteProperty(options, PropRegression, value.Regression, null, null); - writer.WriteProperty(options, PropTextEmbedding, value.TextEmbedding, null, null); + writer.WriteProperty(options, PropRegression, value.Regression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTextEmbedding, value.TextEmbedding, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs index d01e42f8558..633eb8922aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.SearchableSnapshots Read(ref continue; } - if (propFullCopyIndicesCount.TryReadProperty(ref reader, options, PropFullCopyIndicesCount, null)) + if (propFullCopyIndicesCount.TryReadProperty(ref reader, options, PropFullCopyIndicesCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.SearchableSnapshots Read(ref continue; } - if (propSharedCacheIndicesCount.TryReadProperty(ref reader, options, PropSharedCacheIndicesCount, null)) + if (propSharedCacheIndicesCount.TryReadProperty(ref reader, options, PropSharedCacheIndicesCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropFullCopyIndicesCount, value.FullCopyIndicesCount, null, null); + writer.WriteProperty(options, PropFullCopyIndicesCount, value.FullCopyIndicesCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndicesCount, value.IndicesCount, null, null); - writer.WriteProperty(options, PropSharedCacheIndicesCount, value.SharedCacheIndicesCount, null, null); + writer.WriteProperty(options, PropSharedCacheIndicesCount, value.SharedCacheIndicesCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs index 8347f67e75e..3ba22abb89e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.Slm Read(ref System.Text.Jso continue; } - if (propPolicyCount.TryReadProperty(ref reader, options, PropPolicyCount, null)) + if (propPolicyCount.TryReadProperty(ref reader, options, PropPolicyCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropPolicyCount, value.PolicyCount, null, null); + writer.WriteProperty(options, PropPolicyCount, value.PolicyCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPolicyStats, value.PolicyStats, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs index e67fd9d6660..035cc0095eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.Vector Read(ref System.Text. continue; } - if (propSparseVectorFieldsCount.TryReadProperty(ref reader, options, PropSparseVectorFieldsCount, null)) + if (propSparseVectorFieldsCount.TryReadProperty(ref reader, options, PropSparseVectorFieldsCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDenseVectorDimsAvgCount, value.DenseVectorDimsAvgCount, null, null); writer.WriteProperty(options, PropDenseVectorFieldsCount, value.DenseVectorFieldsCount, null, null); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropSparseVectorFieldsCount, value.SparseVectorFieldsCount, null, null); + writer.WriteProperty(options, PropSparseVectorFieldsCount, value.SparseVectorFieldsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs index 06af498146f..4440acd34a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageQuery Read(ref Sys LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFailed.TryReadProperty(ref reader, options, PropFailed, null)) + if (propFailed.TryReadProperty(ref reader, options, PropFailed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPaging.TryReadProperty(ref reader, options, PropPaging, null)) + if (propPaging.TryReadProperty(ref reader, options, PropPaging, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.XpackUsageQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropFailed, value.Failed, null, null); - writer.WriteProperty(options, PropPaging, value.Paging, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFailed, value.Failed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPaging, value.Paging, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs index dabde32cdf4..4dfffcc7df4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs @@ -157,6 +157,56 @@ static bool CompareToSequence(ref Utf8JsonReader reader, ReadOnlySpan othe return converter.Read(ref reader, typeof(T), options); } + /// + /// Reads a nullable value-type value from a given instance using the default + /// for the type . + /// + /// The type of the value to read. + /// A reference to the instance. + /// The to use. + /// The value read from the instance. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T? ReadNullableValue(this ref Utf8JsonReader reader, JsonSerializerOptions options) + where T : struct + { + // TODO: Support custom `T?` converters with `HandleNull`. + var converter = options.GetConverter(null); + + if (reader.TokenType is JsonTokenType.Null) + { + return null; + } + + return converter.Read(ref reader, typeof(T), options); + } + + /// + /// Reads a nullable value-type value from a given instance using a specific + /// that is retrieved from the based on . + /// + /// The type of the value to read. + /// A reference to the instance. + /// The to use. + /// + /// The marker type that is used to retrieve a specific from the given . + /// + /// The value read from the instance. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T? ReadNullableValueEx(this ref Utf8JsonReader reader, JsonSerializerOptions options, + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) + where T : struct + { + // TODO: Support custom `T?` converters with `HandleNull`. + var converter = options.GetConverter(markerType); + + if (reader.TokenType is JsonTokenType.Null) + { + return null; + } + + return converter.Read(ref reader, typeof(T), options); + } + /// /// Reads a property name value from a given instance using the default /// for the type . diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs index 2e2f7ced77d..30eb808398d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -52,40 +51,42 @@ public static void WriteValue(this Utf8JsonWriter writer, JsonSerializerOptio } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteValue(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value) - where T : struct + public static void WriteValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) { - var converter = options.GetConverter(null); + var converter = options.GetConverter(markerType); - if (value is null) + if ((value is null) && !converter.HandleNull) { writer.WriteNullValue(); return; } - converter.Write(writer, value!.Value, options); + converter.Write(writer, value, options); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, - [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) + public static void WriteNullableValue(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value) + where T : struct { - var converter = options.GetConverter(markerType); + // TODO: Support custom `T?` converters with `HandleNull`. + var converter = options.GetConverter(null); - if ((value is null) && !converter.HandleNull) + if (value is null) { writer.WriteNullValue(); return; } - converter.Write(writer, value, options); + converter.Write(writer, value!.Value, options); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, + public static void WriteNullableValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) where T : struct { + // TODO: Support custom `T?` converters with `HandleNull`. var converter = options.GetConverter(markerType); if (value is null)