diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs index 6c7ce0cc3d7..f4ce50aa4ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDataRetention = default; - LocalJsonValue propDownsampling = default; + LocalJsonValue?> propDownsampling = default; LocalJsonValue propEnabled = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe continue; } - if (propDownsampling.TryReadProperty(ref reader, options, PropDownsampling, null)) + if (propDownsampling.TryReadProperty(ref reader, options, PropDownsampling, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -74,7 +74,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, PropDownsampling, value.Downsampling, 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, 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/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs index 4f5e0da14ec..ded1340e63a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs @@ -135,7 +135,7 @@ internal PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// The downsampling configuration to execute for the managed backing index after rollover. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } + public System.Collections.Generic.ICollection? Downsampling { get; set; } /// /// @@ -256,7 +256,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDesc /// The downsampling configuration to execute for the managed backing index after rollover. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? value) + public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(System.Collections.Generic.ICollection? value) { Instance.Downsampling = value; return this; @@ -267,9 +267,26 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDesc /// The downsampling configuration to execute for the managed backing index after rollover. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(System.Action action) + public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(params Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound[] values) { - Instance.Downsampling = Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor.Build(action); + Instance.Downsampling = [.. values]; + return this; + } + + /// + /// + /// The downsampling configuration to execute for the managed backing index after rollover. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRoundDescriptor.Build(action)); + } + + Instance.Downsampling = items; return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.Converters.g.cs index fc4c5d5770c..ed9cbccf6b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.Converters.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re LocalJsonValue propIncludeSort = default; LocalJsonValue propPoint = default; LocalJsonValue propSize = default; - LocalJsonValue propSort = default; + LocalJsonValue propSort = default; LocalJsonValue propSortOrder = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { 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 49629d30757..944376f44ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs @@ -27,10 +27,9 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; public sealed partial class GeoLineAggregation { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public GeoLineAggregation(Elastic.Clients.Elasticsearch.Aggregations.GeoLinePoint point, Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort sort) + public GeoLineAggregation(Elastic.Clients.Elasticsearch.Aggregations.GeoLinePoint point) { Point = point; - Sort = sort; } #if NET7_0_OR_GREATER public GeoLineAggregation() @@ -81,11 +80,7 @@ internal GeoLineAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// When the geo_line aggregation is nested inside a time_series aggregation, this field defaults to @timestamp, and any other value will result in error. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort Sort { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort? Sort { get; set; } /// /// @@ -165,7 +160,7 @@ public Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregationDescriptorgeo_line aggregation is nested inside a time_series aggregation, this field defaults to @timestamp, and any other value will result in error. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort value) + public Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort? value) { Instance.Sort = value; return this; @@ -284,7 +279,7 @@ public Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregationDescriptor S /// When the geo_line aggregation is nested inside a time_series aggregation, this field defaults to @timestamp, and any other value will result in error. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort value) + public Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort? value) { Instance.Sort = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs index 27d6eaf17cf..d34856d9be2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.PercentilesAggregatio continue; } - if (propPercents.TryReadProperty(ref reader, options, PropPercents, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + if (propPercents.TryReadProperty(ref reader, options, PropPercents, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) { continue; } @@ -117,7 +117,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropHdr, value.Hdr, 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, PropMissing, value.Missing, null, null); - 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.WriteProperty(options, PropPercents, value.Percents, 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, PropScript, value.Script, null, null); writer.WriteProperty(options, PropTDigest, value.TDigest, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs index c3751b34710..a0c3659a901 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs @@ -38,7 +38,7 @@ public sealed partial class NodeAllocationExplanationConverter : System.Text.Jso public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue> propDeciders = default; + LocalJsonValue?> propDeciders = default; LocalJsonValue> propNodeAttributes = default; LocalJsonValue propNodeDecision = default; LocalJsonValue propNodeId = default; @@ -46,10 +46,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation LocalJsonValue> propRoles = default; LocalJsonValue propStore = default; LocalJsonValue propTransportAddress = default; - LocalJsonValue propWeightRanking = default; + LocalJsonValue propWeightRanking = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeciders.TryReadProperty(ref reader, options, PropDeciders, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propDeciders.TryReadProperty(ref reader, options, PropDeciders, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation continue; } - if (propWeightRanking.TryReadProperty(ref reader, options, PropWeightRanking, null)) + if (propWeightRanking.TryReadProperty(ref reader, options, PropWeightRanking, 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.Cluster.NodeAllocationExplanation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeciders, value.Deciders, 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, PropDeciders, value.Deciders, 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, PropNodeAttributes, value.NodeAttributes, 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, PropNodeDecision, value.NodeDecision, null, null); writer.WriteProperty(options, PropNodeId, value.NodeId, null, null); @@ -129,7 +129,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, PropStore, value.Store, null, null); writer.WriteProperty(options, PropTransportAddress, value.TransportAddress, null, null); - writer.WriteProperty(options, PropWeightRanking, value.WeightRanking, null, null); + writer.WriteProperty(options, PropWeightRanking, value.WeightRanking, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs index 2cf26319516..ebcb8852259 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs @@ -27,16 +27,14 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class NodeAllocationExplanation { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public NodeAllocationExplanation(System.Collections.Generic.IReadOnlyCollection deciders, System.Collections.Generic.IReadOnlyDictionary nodeAttributes, Elastic.Clients.Elasticsearch.Cluster.Decision nodeDecision, string nodeId, string nodeName, System.Collections.Generic.IReadOnlyCollection roles, string transportAddress, int weightRanking) + public NodeAllocationExplanation(System.Collections.Generic.IReadOnlyDictionary nodeAttributes, Elastic.Clients.Elasticsearch.Cluster.Decision nodeDecision, string nodeId, string nodeName, System.Collections.Generic.IReadOnlyCollection roles, string transportAddress) { - Deciders = deciders; NodeAttributes = nodeAttributes; NodeDecision = nodeDecision; NodeId = nodeId; NodeName = nodeName; Roles = roles; TransportAddress = transportAddress; - WeightRanking = weightRanking; } #if NET7_0_OR_GREATER public NodeAllocationExplanation() @@ -55,11 +53,7 @@ internal NodeAllocationExplanation(Elastic.Clients.Elasticsearch.Serialization.J _ = sentinel; } - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.IReadOnlyCollection Deciders { get; set; } + public System.Collections.Generic.IReadOnlyCollection? Deciders { get; set; } public #if NET7_0_OR_GREATER required @@ -91,9 +85,5 @@ internal NodeAllocationExplanation(Elastic.Clients.Elasticsearch.Serialization.J required #endif string TransportAddress { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int WeightRanking { get; set; } + public int? WeightRanking { get; set; } } \ No newline at end of file