diff --git a/src/Elastic.Clients.Elasticsearch/Api/IndexManagement/GetFieldMappingResponse.cs b/src/Elastic.Clients.Elasticsearch/Api/IndexManagement/GetFieldMappingResponse.cs index 35e2c3b3289..06cf61bb266 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/IndexManagement/GetFieldMappingResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/IndexManagement/GetFieldMappingResponse.cs @@ -2,8 +2,11 @@ // 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. +using System; using System.Collections.Generic; +using System.Linq.Expressions; using System.Text.Json.Serialization; +using Elastic.Clients.Elasticsearch.Mapping; namespace Elastic.Clients.Elasticsearch.IndexManagement; @@ -11,4 +14,79 @@ public partial class GetFieldMappingResponse { [JsonIgnore] public IReadOnlyDictionary FieldMappings => BackingDictionary; + + public IProperty? GetProperty(IndexName index, Field field) + { + if (index is null) + throw new ArgumentNullException(nameof(index)); + + if (field is null) + throw new ArgumentNullException(nameof(field)); + + var mappings = MappingsFor(index); + + if (mappings is null) + return null; + + if (!mappings.TryGetValue(field, out var fieldMapping) || fieldMapping.Mapping is null) + return null; + + return fieldMapping.Mapping.TryGetProperty(PropertyName.FromField(field), out var property) ? property : null; + } + + public bool TryGetProperty(IndexName index, Field field, out IProperty property) + { + property = null; + + if (index is null) + throw new ArgumentNullException(nameof(index)); + + if (field is null) + throw new ArgumentNullException(nameof(field)); + + var mappings = MappingsFor(index); + + if (mappings is null) + return false; + + if (!mappings.TryGetValue(field, out var fieldMapping) || fieldMapping.Mapping is null) + return false; + + if (fieldMapping.Mapping.TryGetProperty(PropertyName.FromField(field), out var matched)) + { + property = matched; + return true; + } + + return false; + } + + public IProperty? PropertyFor(Field field) => PropertyFor(field, null); + + public IProperty? PropertyFor(Field field, IndexName index) => + GetProperty(index ?? Infer.Index(), field); + + public IProperty? PropertyFor(Expression> objectPath) + where T : class => + GetProperty(Infer.Index(), Infer.Field(objectPath)); + + public IProperty? PropertyFor(Expression> objectPath, IndexName index) + where T : class => + GetProperty(index, Infer.Field(objectPath)); + + public IProperty? PropertyFor(Expression> objectPath) + where T : class => + GetProperty(Infer.Index(), Infer.Field(objectPath)); + + public IProperty? PropertyFor(Expression> objectPath, IndexName index) + where T : class => + GetProperty(index, Infer.Field(objectPath)); + + private IReadOnlyDictionary MappingsFor(IndexName index) + { + if (!FieldMappings.TryGetValue(index, out var indexMapping) || indexMapping.Mappings == null) + return null; + + return indexMapping.Mappings; + } } diff --git a/src/Elastic.Clients.Elasticsearch/Core/Infer/IndexName/IndexName.cs b/src/Elastic.Clients.Elasticsearch/Core/Infer/IndexName/IndexName.cs index 756aea8fd62..073c2974bd1 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Infer/IndexName/IndexName.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Infer/IndexName/IndexName.cs @@ -45,7 +45,7 @@ private IndexName(string index, Type type, string cluster = null) bool IEquatable.Equals(IndexName other) => EqualsMarker(other); - public string GetString(ITransportConfiguration settings) + string IUrlParameter.GetString(ITransportConfiguration settings) { if (settings is not IElasticsearchClientSettings elasticsearchClientSettings) throw new Exception("Tried to pass index name on querystring but it could not be resolved because no Elastic.Clients.Elasticsearch settings are available."); diff --git a/src/Elastic.Clients.Elasticsearch/Core/Infer/Metric/Metrics.cs b/src/Elastic.Clients.Elasticsearch/Core/Infer/Metric/Metrics.cs index 4c82edb433c..5bfcad4e8d3 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Infer/Metric/Metrics.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Infer/Metric/Metrics.cs @@ -7,7 +7,7 @@ namespace Elastic.Clients.Elasticsearch; -public class Metrics : IEquatable, IUrlParameter +public sealed class Metrics : IEquatable, IUrlParameter { // TODO: Complete this @@ -27,7 +27,7 @@ public class Metrics : IEquatable, IUrlParameter public bool Equals(Metrics other) => Value.Equals(other.Value); - public string GetString(ITransportConfiguration settings) => string.Empty; // TODO Value.GetStringValue(); + string IUrlParameter.GetString(ITransportConfiguration settings) => string.Empty; // TODO Value.GetStringValue(); //public static implicit operator Metrics(IndicesStatsMetric metric) => new Metrics(metric); diff --git a/src/Elastic.Clients.Elasticsearch/Core/Infer/PropertyName/PropertyName.cs b/src/Elastic.Clients.Elasticsearch/Core/Infer/PropertyName/PropertyName.cs index 03db8f0d4d4..8399241d5b4 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Infer/PropertyName/PropertyName.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Infer/PropertyName/PropertyName.cs @@ -39,7 +39,7 @@ public PropertyName(PropertyInfo property) _comparisonValue = property; _type = property.DeclaringType; } - + public bool CacheableExpression { get; } public Expression Expression { get; } @@ -78,6 +78,20 @@ public static implicit operator PropertyName(Expression expression) => public static implicit operator PropertyName(PropertyInfo property) => property == null ? null : new PropertyName(property); + internal static PropertyName FromField(Field field) + { + if (field.Property is not null) + return new PropertyName(field.Property); + + if (field.Expression is not null) + return new PropertyName(field.Expression); + + if (field.Name is not null) + return new PropertyName(field.Name); + + return null; + } + public override int GetHashCode() { unchecked diff --git a/src/Elastic.Clients.Elasticsearch/Core/Infer/Timestamp/Timestamp.cs b/src/Elastic.Clients.Elasticsearch/Core/Infer/Timestamp/Timestamp.cs index a5912010db1..921f39a66d4 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Infer/Timestamp/Timestamp.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Infer/Timestamp/Timestamp.cs @@ -16,8 +16,11 @@ public sealed class Timestamp : IUrlParameter, IEquatable public bool Equals(Timestamp other) => Value == other.Value; - // ReSharper disable once ImpureMethodCallOnReadonlyValueField - public string GetString(ITransportConfiguration settings) => Value.ToString(CultureInfo.InvariantCulture); + string IUrlParameter.GetString(ITransportConfiguration settings) => GetString(); + + public override string ToString() => GetString(); + + private string GetString() => Value.ToString(CultureInfo.InvariantCulture); public static implicit operator Timestamp(DateTimeOffset categoryId) => new(categoryId.ToUnixTimeMilliseconds()); diff --git a/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyFieldDictionary.cs b/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyFieldDictionary.cs new file mode 100644 index 00000000000..018f0e82c46 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyFieldDictionary.cs @@ -0,0 +1,56 @@ +// 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. + +using System.Collections; +using System.Collections.Generic; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch; + +/// +/// A specialised readonly dictionary for data, keyed by . +/// This supports inferrence enabled lookups by ensuring keys are sanitized when storing the values and when performing lookups. +/// +/// +internal readonly struct ReadOnlyFieldDictionary : IReadOnlyDictionary +{ + private readonly Dictionary _backingDictionary; + private readonly IElasticsearchClientSettings? _settings; + + public ReadOnlyFieldDictionary() + { + _backingDictionary = new Dictionary(0); + _settings = null; + } + + internal ReadOnlyFieldDictionary(Dictionary source, IElasticsearchClientSettings settings) + { + _settings = settings; + + // This is an "optimised version" which doesn't cause a second dictionary to be allocated. + // Since we expect this to be used only for deserialisation, the keys received will already have been strings, + // so no further sanitisation is required. + + if (source == null) + { + _backingDictionary = new Dictionary(0); + return; + } + + _backingDictionary = source; + } + + private string Sanitize(Field key) => _settings is not null ? (key as IUrlParameter)?.GetString(_settings) : string.Empty; + + public TValue this[Field key] => _backingDictionary.TryGetValue(Sanitize(key), out var v) ? v : default; + public TValue this[string key] => _backingDictionary.TryGetValue(key, out var v) ? v : default; + + public IEnumerable Keys => _backingDictionary.Keys; + public IEnumerable Values => _backingDictionary.Values; + public int Count => _backingDictionary.Count; + public bool ContainsKey(Field key) => _backingDictionary.ContainsKey(Sanitize(key)); + public IEnumerator> GetEnumerator() => _backingDictionary.GetEnumerator(); + public bool TryGetValue(Field key, out TValue value) => _backingDictionary.TryGetValue(Sanitize(key), out value); + IEnumerator IEnumerable.GetEnumerator() => _backingDictionary.GetEnumerator(); +} diff --git a/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyIndexNameDictionary.cs b/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyIndexNameDictionary.cs index 731afb985d4..e0e254f0906 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyIndexNameDictionary.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/ReadOnlyIndexNameDictionary.cs @@ -4,6 +4,7 @@ using System.Collections; using System.Collections.Generic; +using Elastic.Transport; namespace Elastic.Clients.Elasticsearch; @@ -12,7 +13,7 @@ namespace Elastic.Clients.Elasticsearch; /// This supports inferrence enabled lookups by ensuring keys are sanitized when storing the values and when performing lookups. /// /// -public struct ReadOnlyIndexNameDictionary : IReadOnlyDictionary +internal readonly struct ReadOnlyIndexNameDictionary : IReadOnlyDictionary { private readonly Dictionary _backingDictionary; private readonly IElasticsearchClientSettings? _settings; @@ -31,21 +32,16 @@ internal ReadOnlyIndexNameDictionary(Dictionary source, IElas // Since we expect this to be used only for deserialisation, the keys received will already have been strings, // so no further sanitisation is required. - //var backingDictionary = new Dictionary(source.Count); - if (source == null) { _backingDictionary = new Dictionary(0); return; } - //foreach (var key in source.Keys) - // backingDictionary[Sanitize(key)] = source[key]; - _backingDictionary = source; } - private string Sanitize(IndexName key) => _settings is not null ? key?.GetString(_settings) : string.Empty; + private string Sanitize(IndexName key) => _settings is not null ? (key as IUrlParameter)?.GetString(_settings) : string.Empty; public TValue this[IndexName key] => _backingDictionary.TryGetValue(Sanitize(key), out var v) ? v : default; public TValue this[string key] => _backingDictionary.TryGetValue(key, out var v) ? v : default; diff --git a/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/IndexUuid/IndexUuid.cs b/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/IndexUuid/IndexUuid.cs index d2c47962288..5a29dbec53c 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/IndexUuid/IndexUuid.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/IndexUuid/IndexUuid.cs @@ -26,7 +26,9 @@ public bool Equals(IndexUuid other) return false; } - public string GetString(ITransportConfiguration settings) => Value; + string IUrlParameter.GetString(ITransportConfiguration settings) => Value; + + public override string ToString() => Value; public override bool Equals(object obj) { diff --git a/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/TaskId/TaskId.cs b/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/TaskId/TaskId.cs index 57689f40f8d..107e8da4cdb 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/TaskId/TaskId.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/UrlParameters/TaskId/TaskId.cs @@ -5,7 +5,6 @@ using System; using System.Diagnostics; using System.Globalization; -using System.Runtime; using System.Text.Json; using System.Text.Json.Serialization; using Elastic.Clients.Elasticsearch.Serialization; @@ -47,7 +46,7 @@ public TaskId(string taskId) public bool Equals(TaskId other) => EqualsString(other?.FullyQualifiedId); - public string GetString(ITransportConfiguration settings) => FullyQualifiedId; + string IUrlParameter.GetString(ITransportConfiguration settings) => FullyQualifiedId; public override string ToString() => FullyQualifiedId; @@ -77,7 +76,7 @@ public override void WriteAsPropertyName(Utf8JsonWriter writer, TaskId value, Js { if (options.TryGetClientSettings(out var settings)) { - writer.WritePropertyName(value.GetString(settings)); + writer.WritePropertyName(((IUrlParameter)value).GetString(settings)); return; } diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs b/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs index aafb73fc9b8..30f88799b5d 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs @@ -29,7 +29,6 @@ public DefaultRequestResponseSerializer(IElasticsearchClientSettings settings) { new KeyValuePairConverterFactory(settings), new SourceConverterFactory(settings), - new ReadOnlyIndexNameDictionaryConverterFactory(settings), new CalendarIntervalConverter(), new IndexNameConverter(settings), new ObjectToInferredTypesConverter(), @@ -47,6 +46,7 @@ public DefaultRequestResponseSerializer(IElasticsearchClientSettings settings) new IndicesJsonConverter(settings), new IdsConverter(settings), new IsADictionaryConverterFactory(), + //new ResolvableReadonlyDictionaryConverterFactory(settings), new ResponseItemConverterFactory(), new UnionConverter(), new ExtraSerializationData(settings), diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/InterfaceConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/Serialization/InterfaceConverterFactory.cs deleted file mode 100644 index 8bf38d79d30..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Serialization/InterfaceConverterFactory.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -using System; -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serialization; - -internal sealed class InterfaceConverterFactory : JsonConverterFactory -{ - private readonly IElasticsearchClientSettings _settings; - - public InterfaceConverterFactory(IElasticsearchClientSettings settings) => _settings = settings; - - public override bool CanConvert(Type typeToConvert) - { - var customAttributes = typeToConvert.GetCustomAttributes(); - - var canConvert = false; - - foreach (var item in customAttributes) - { - var type = item.GetType(); - if (type == typeof(InterfaceConverterAttribute)) - canConvert = true; - } - - return canConvert; - } - - public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) - { - var att = typeToConvert.GetCustomAttribute(); - - return (JsonConverter)Activator.CreateInstance(att.ConverterType)!; - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/IntermediateConverter.cs b/src/Elastic.Clients.Elasticsearch/Serialization/IntermediateConverter.cs deleted file mode 100644 index 47431f2aab9..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Serialization/IntermediateConverter.cs +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serialization; - -internal sealed class IntermediateConverter : JsonConverter> -{ - public override IReadOnlyDictionary? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var converter = options.GetConverter(typeof(ReadOnlyIndexNameDictionary<>).MakeGenericType(typeof(TValue))); - - if (converter is ReadOnlyIndexNameDictionaryConverter specialisedConverter) - { - return specialisedConverter.Read(ref reader, typeToConvert, options); - } - - return null; - } - - public override void Write(Utf8JsonWriter writer, IReadOnlyDictionary value, JsonSerializerOptions options) => throw new NotImplementedException(); -} diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyFieldDictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyFieldDictionaryConverter.cs new file mode 100644 index 00000000000..231a7b85c4b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyFieldDictionaryConverter.cs @@ -0,0 +1,38 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serialization; + +internal sealed class ReadOnlyFieldDictionaryConverterAttribute : JsonConverterAttribute +{ + public ReadOnlyFieldDictionaryConverterAttribute(Type valueType) => ValueType = valueType; + + public Type ValueType { get; } + + public override JsonConverter? CreateConverter(Type typeToConvert) => (JsonConverter)Activator.CreateInstance(typeof(ReadOnlyFieldDictionaryConverter<>).MakeGenericType(ValueType)); +} + +internal sealed class ReadOnlyFieldDictionaryConverter : JsonConverter> +{ + public override IReadOnlyDictionary? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (!options.TryGetClientSettings(out var clientSettings)) + { + throw new JsonException("Unable to retrieve client settings required for deserialisation."); + } + + var initialDictionary = JsonSerializer.Deserialize>(ref reader, options); + + var readOnlyDictionary = new ReadOnlyFieldDictionary(initialDictionary, clientSettings); + + return readOnlyDictionary; + } + + public override void Write(Utf8JsonWriter writer, IReadOnlyDictionary value, JsonSerializerOptions options) => throw new NotImplementedException(); +} diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverter.cs index b226e5c8fad..4d585c65680 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverter.cs @@ -15,20 +15,21 @@ internal sealed class ReadOnlyIndexNameDictionaryConverter : JsonConverterAttrib public Type ValueType { get; } - public override JsonConverter? CreateConverter(Type typeToConvert) => (JsonConverter)Activator.CreateInstance(typeof(IntermediateConverter<>).MakeGenericType(ValueType)); + public override JsonConverter? CreateConverter(Type typeToConvert) => (JsonConverter)Activator.CreateInstance(typeof(ReadOnlyIndexNameDictionaryConverter<>).MakeGenericType(ValueType)); } internal sealed class ReadOnlyIndexNameDictionaryConverter : JsonConverter> { - private readonly IElasticsearchClientSettings _settings; - - public ReadOnlyIndexNameDictionaryConverter(IElasticsearchClientSettings settings) => _settings = settings; - public override IReadOnlyDictionary? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (!options.TryGetClientSettings(out var clientSettings)) + { + throw new JsonException("Unable to retrieve client settings required for deserialisation."); + } + var initialDictionary = JsonSerializer.Deserialize>(ref reader, options); - var readOnlyDictionary = new ReadOnlyIndexNameDictionary(initialDictionary, _settings); + var readOnlyDictionary = new ReadOnlyIndexNameDictionary(initialDictionary, clientSettings); return readOnlyDictionary; } diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverterFactory.cs deleted file mode 100644 index f0768962d1e..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Serialization/ReadOnlyIndexNameDictionaryConverterFactory.cs +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serialization; - -internal sealed class ReadOnlyIndexNameDictionaryConverterFactory : JsonConverterFactory -{ - private readonly IElasticsearchClientSettings _settings; - - public ReadOnlyIndexNameDictionaryConverterFactory(IElasticsearchClientSettings settings) => _settings = settings; - - public override bool CanConvert(Type typeToConvert) - { - if (!typeToConvert.IsGenericType) - return false; - - var canConvert = typeof(ReadOnlyIndexNameDictionary<>) == typeToConvert.GetGenericTypeDefinition(); - return canConvert; - } - - public override JsonConverter CreateConverter(Type type, JsonSerializerOptions options) - { - var valueType = type.GetGenericArguments()[0]; - return (JsonConverter)Activator.CreateInstance(typeof(ReadOnlyIndexNameDictionaryConverter<>).MakeGenericType(valueType), _settings); - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs new file mode 100644 index 00000000000..16f0e433e36 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs @@ -0,0 +1,72 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Serialization; + +internal sealed class ResolvableReadonlyDictionaryConverterFactory : JsonConverterFactory +{ + private readonly IElasticsearchClientSettings _settings; + + public ResolvableReadonlyDictionaryConverterFactory(IElasticsearchClientSettings settings) => _settings = settings; + + public override bool CanConvert(Type typeToConvert) + { + if (typeToConvert.BaseType is null || !typeToConvert.BaseType.IsGenericType || typeToConvert.BaseType.GetGenericTypeDefinition() != typeof(IsADictionary<,>)) + { + return false; + } + + var args = typeToConvert.BaseType.GetGenericArguments(); + + var keyType = args[0]; + + return keyType is not null && typeof(IUrlParameter).IsAssignableFrom(keyType); + } + + public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) + { + var args = typeToConvert.BaseType.GetGenericArguments(); + + var keyType = args[0]; + var valueType = args[1]; + + if (keyType.IsClass) + { + return (JsonConverter)Activator.CreateInstance( + typeof(ResolvableReadOnlyDictionaryConverterInner<,,>).MakeGenericType(typeToConvert, keyType, valueType), _settings); + } + + return null; + } + + private class ResolvableReadOnlyDictionaryConverterInner : JsonConverter> + where TKey : class, IUrlParameter + where TType : IReadOnlyDictionary + { + private readonly IElasticsearchClientSettings _settings; + + public ResolvableReadOnlyDictionaryConverterInner(IElasticsearchClientSettings settings) => _settings = settings; + + public override IReadOnlyDictionary? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var dictionary = JsonSerializer.Deserialize>(ref reader, options); + + if (dictionary is null) + return default; + + var dictionaryProxy = new ResolvableDictionaryProxy(_settings, dictionary); + + return dictionaryProxy; + } + + public override void Write(Utf8JsonWriter writer, IReadOnlyDictionary value, JsonSerializerOptions options) => + throw new NotImplementedException($"Serialization is not supported for '{typeof(TType)}'."); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Aggregations/TermsAggregate.cs b/src/Elastic.Clients.Elasticsearch/Types/Aggregations/TermsAggregate.cs index 9af30af4904..349766d8b3e 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Aggregations/TermsAggregate.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Aggregations/TermsAggregate.cs @@ -23,5 +23,5 @@ public sealed class TermsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } 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 def8bb6d26f..709794aaf98 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -158,7 +158,7 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty if (property == "ext") { - variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); + variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -182,7 +182,7 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty if (property == "indices_boost") { - variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); + variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); continue; } @@ -230,7 +230,7 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty if (property == "script_fields") { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); + variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -320,7 +320,7 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty if (property == "runtime_mappings") { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -658,7 +658,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("ext")] - public Dictionary? Ext { get; set; } + public IDictionary? Ext { get; set; } [JsonInclude] [JsonPropertyName("from")] @@ -674,7 +674,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("indices_boost")] - public ICollection>? IndicesBoost { get; set; } + public ICollection>? IndicesBoost { get; set; } [JsonInclude] [JsonPropertyName("docvalue_fields")] @@ -706,7 +706,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("script_fields")] - public Dictionary? ScriptFields { get; set; } + public IDictionary? ScriptFields { get; set; } [JsonInclude] [JsonPropertyName("search_after")] @@ -767,7 +767,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } [JsonInclude] [JsonPropertyName("stats")] @@ -900,11 +900,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private bool? ExplainValue { get; set; } - private Dictionary? ExtValue { get; set; } + private IDictionary? ExtValue { get; set; } private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private double? MinScoreValue { get; set; } @@ -916,9 +916,9 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private bool? ProfileValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } @@ -1282,7 +1282,7 @@ public SubmitAsyncSearchRequestDescriptor From(int? from) return Self; } - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) { IndicesBoostValue = indicesBoost; return Self; @@ -1933,11 +1933,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private bool? ExplainValue { get; set; } - private Dictionary? ExtValue { get; set; } + private IDictionary? ExtValue { get; set; } private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private double? MinScoreValue { get; set; } @@ -1949,9 +1949,9 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private bool? ProfileValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } @@ -2315,7 +2315,7 @@ public SubmitAsyncSearchRequestDescriptor From(int? from) return Self; } - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) { IndicesBoostValue = indicesBoost; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs index e7bd8c54ef7..3c7a7a4167d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs @@ -47,7 +47,8 @@ public sealed partial class HealthResponse : ElasticsearchResponse [JsonInclude] [JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.ReadOnlyIndexNameDictionary? Indices { get; init; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.IndexHealthStats))] + public IReadOnlyDictionary? Indices { get; init; } [JsonInclude] [JsonPropertyName("initializing_shards")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs index ffd75b667d8..5ee98788a3d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs @@ -31,7 +31,7 @@ public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchRespo [JsonInclude] [JsonPropertyName("nodes")] - public Dictionary? Nodes { get; init; } + public IReadOnlyDictionary? Nodes { get; init; } [JsonInclude] [JsonPropertyName("task_failures")] 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 8e27cf76868..e8fed5ab2ee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -111,7 +111,7 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } } public sealed partial class EqlSearchRequestDescriptor : RequestDescriptor, EqlSearchRequestParameters> @@ -167,7 +167,7 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear private Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPositionValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } private int? SizeValue { get; set; } @@ -529,7 +529,7 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices private Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPositionValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } private int? SizeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs index d7943fabcc4..0e54ad3a26b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs @@ -91,7 +91,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } } public sealed partial class FieldCapsRequestDescriptor : RequestDescriptor, FieldCapsRequestParameters> @@ -123,7 +123,7 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsear private Action> IndexFilterDescriptorAction { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) { @@ -213,7 +213,7 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? private Action IndexFilterDescriptorAction { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs index f2b0c1f269f..dccbb29448c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs @@ -27,7 +27,8 @@ public sealed partial class FieldCapsResponse : ElasticsearchResponse { [JsonInclude] [JsonPropertyName("fields")] - public Dictionary> Fields { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(IReadOnlyDictionary))] + public IReadOnlyDictionary> Fields { get; init; } [JsonInclude] [JsonPropertyName("indices")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs index 1d3cb82d978..7379d6d2e9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs @@ -59,11 +59,11 @@ public CloneIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic. [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("settings")] - public Dictionary? Settings { get; set; } + public IDictionary? Settings { get; set; } } public sealed partial class CloneIndexRequestDescriptor : RequestDescriptor, CloneIndexRequestParameters> @@ -95,9 +95,9 @@ public CloneIndexRequestDescriptor Target(Elastic.Clients.Elasticsear return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public CloneIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) { @@ -159,9 +159,9 @@ public CloneIndexRequestDescriptor Target(Elastic.Clients.Elasticsearch.Name tar return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public CloneIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs index 12505daf7f8..45718cff1cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs @@ -31,7 +31,8 @@ public sealed partial class CloseIndexResponse : ElasticsearchResponse [JsonInclude] [JsonPropertyName("indices")] - public Dictionary Indices { get; init; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.CloseIndexResult))] + public IReadOnlyDictionary Indices { get; init; } [JsonInclude] [JsonPropertyName("shards_acknowledged")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs index 6b72de9510b..cdc608ceb32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs @@ -59,7 +59,7 @@ public CreateIndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("mappings")] @@ -109,7 +109,7 @@ public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsear private Action> SettingsDescriptorAction { get; set; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } public CreateIndexRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) { @@ -245,7 +245,7 @@ public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexNam private Action SettingsDescriptorAction { get; set; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } public CreateIndexRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs index 9ff91654760..bdeec786b60 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs @@ -31,7 +31,7 @@ public sealed partial class IndicesStatsResponse : ElasticsearchResponse [JsonInclude] [JsonPropertyName("indices")] - public Dictionary? Indices { get; init; } + public IReadOnlyDictionary? Indices { get; init; } [JsonInclude] [JsonPropertyName("_shards")] 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 78b686217c7..558820c79e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -71,7 +71,7 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r [JsonInclude] [JsonPropertyName("_meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } } public sealed partial class PutIndexTemplateRequestDescriptor : RequestDescriptor, PutIndexTemplateRequestParameters> @@ -101,7 +101,7 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elastic private Action> TemplateDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? ComposedOfValue { get; set; } @@ -291,7 +291,7 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name private Action TemplateDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? ComposedOfValue { get; set; } 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 c1496b376a7..530f2413a96 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -89,7 +89,7 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r [JsonInclude] [JsonPropertyName("dynamic_templates")] - public Union?, ICollection>?>? DynamicTemplates { get; set; } + public Union?, ICollection>?>? DynamicTemplates { get; set; } [JsonInclude] [JsonPropertyName("_field_names")] @@ -97,7 +97,7 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r [JsonInclude] [JsonPropertyName("_meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("numeric_detection")] @@ -117,7 +117,7 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r [JsonInclude] [JsonPropertyName("runtime")] - public Dictionary? Runtime { get; set; } + public IDictionary? Runtime { get; set; } } public sealed partial class PutMappingRequestDescriptor : RequestDescriptor, PutMappingRequestParameters> @@ -152,7 +152,7 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsea private Action FieldNamesDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } @@ -172,13 +172,13 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsea private ICollection? DynamicDateFormatsValue { get; set; } - private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } + private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } private bool? NumericDetectionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Dictionary? RuntimeValue { get; set; } + private IDictionary? RuntimeValue { get; set; } public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) { @@ -276,7 +276,7 @@ public PutMappingRequestDescriptor DynamicDateFormats(ICollection DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) + public PutMappingRequestDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) { DynamicTemplatesValue = dynamicTemplates; return Self; @@ -449,7 +449,7 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices private Action FieldNamesDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } @@ -469,13 +469,13 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices private ICollection? DynamicDateFormatsValue { get; set; } - private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } + private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } private bool? NumericDetectionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Dictionary? RuntimeValue { get; set; } + private IDictionary? RuntimeValue { get; set; } public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) { @@ -573,7 +573,7 @@ public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynam return Self; } - public PutMappingRequestDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) + public PutMappingRequestDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) { DynamicTemplatesValue = dynamicTemplates; return Self; 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 aea579de725..089757ad0e0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -65,7 +65,7 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("index_patterns")] @@ -81,7 +81,7 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r [JsonInclude] [JsonPropertyName("settings")] - public Dictionary? Settings { get; set; } + public IDictionary? Settings { get; set; } [JsonInclude] [JsonPropertyName("version")] @@ -112,7 +112,7 @@ public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } private ICollection? IndexPatternsValue { get; set; } @@ -124,7 +124,7 @@ public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name private int? OrderValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } private long? VersionValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs index 9ee69420a18..312a225e618 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs @@ -69,7 +69,7 @@ public RolloverRequest(Elastic.Clients.Elasticsearch.IndexAlias alias, Elastic.C [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("conditions")] @@ -81,7 +81,7 @@ public RolloverRequest(Elastic.Clients.Elasticsearch.IndexAlias alias, Elastic.C [JsonInclude] [JsonPropertyName("settings")] - public Dictionary? Settings { get; set; } + public IDictionary? Settings { get; set; } } public sealed partial class RolloverRequestDescriptor : RequestDescriptor @@ -118,7 +118,7 @@ public RolloverRequestDescriptor NewIndex(Elastic.Clients.Elasticsearch.IndexNam return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions? ConditionsValue { get; set; } @@ -132,7 +132,7 @@ public RolloverRequestDescriptor NewIndex(Elastic.Clients.Elasticsearch.IndexNam private Action MappingsDescriptorAction { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public RolloverRequestDescriptor Aliases(Func, FluentDictionary> selector) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverResponse.g.cs index fb2fad52eb5..7a9719d910c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverResponse.g.cs @@ -31,7 +31,7 @@ public sealed partial class RolloverResponse : ElasticsearchResponse [JsonInclude] [JsonPropertyName("conditions")] - public Dictionary Conditions { get; init; } + public IReadOnlyDictionary Conditions { get; init; } [JsonInclude] [JsonPropertyName("dry_run")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs index d0e1e1ee274..7f439715e8f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs @@ -59,11 +59,11 @@ public ShrinkIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("settings")] - public Dictionary? Settings { get; set; } + public IDictionary? Settings { get; set; } } public sealed partial class ShrinkIndexRequestDescriptor : RequestDescriptor, ShrinkIndexRequestParameters> @@ -95,9 +95,9 @@ public ShrinkIndexRequestDescriptor Target(Elastic.Clients.Elasticsea return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public ShrinkIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) { @@ -159,9 +159,9 @@ public ShrinkIndexRequestDescriptor Target(Elastic.Clients.Elasticsearch.IndexNa return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public ShrinkIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs index 480c286babf..9c4a62a8347 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -81,7 +81,7 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b [JsonInclude] [JsonPropertyName("_meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } } public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor, SimulateIndexTemplateRequestParameters> @@ -112,7 +112,7 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.El private Action> TemplateDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? AllowAutoCreateValue { get; set; } @@ -317,7 +317,7 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch private Action TemplateDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? AllowAutoCreateValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs index 3f5f419149f..acffd5cf5f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs @@ -59,11 +59,11 @@ public SplitIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic. [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("settings")] - public Dictionary? Settings { get; set; } + public IDictionary? Settings { get; set; } } public sealed partial class SplitIndexRequestDescriptor : RequestDescriptor, SplitIndexRequestParameters> @@ -95,9 +95,9 @@ public SplitIndexRequestDescriptor Target(Elastic.Clients.Elasticsear return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public SplitIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) { @@ -159,9 +159,9 @@ public SplitIndexRequestDescriptor Target(Elastic.Clients.Elasticsearch.IndexNam return Self; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } - private Dictionary? SettingsValue { get; set; } + private IDictionary? SettingsValue { get; set; } public SplitIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs index 5aca62842c7..ad1c721f626 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs @@ -27,11 +27,11 @@ public sealed partial class RankEvalResponse : ElasticsearchResponse { [JsonInclude] [JsonPropertyName("details")] - public Dictionary Details { get; init; } + public IReadOnlyDictionary Details { get; init; } [JsonInclude] [JsonPropertyName("failures")] - public Dictionary Failures { get; init; } + public IReadOnlyDictionary Failures { get; init; } [JsonInclude] [JsonPropertyName("metric_score")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs index a0374c52bd7..edf2079db93 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs @@ -27,5 +27,5 @@ public sealed partial class ReindexRethrottleResponse : ElasticsearchResponse { [JsonInclude] [JsonPropertyName("nodes")] - public Dictionary Nodes { get; init; } + public IReadOnlyDictionary Nodes { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs index ec9939e0b7f..3108071d7c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class ScrollResponse : ElasticsearchResponse [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("hits")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index ea737c62af4..4d1c4802628 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -149,7 +149,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "ext") { - variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); + variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -173,7 +173,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "indices_boost") { - variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); + variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); continue; } @@ -221,7 +221,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "script_fields") { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); + variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -311,7 +311,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "runtime_mappings") { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -640,7 +640,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("ext")] - public Dictionary? Ext { get; set; } + public IDictionary? Ext { get; set; } [JsonInclude] [JsonPropertyName("from")] @@ -656,7 +656,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("indices_boost")] - public ICollection>? IndicesBoost { get; set; } + public ICollection>? IndicesBoost { get; set; } [JsonInclude] [JsonPropertyName("docvalue_fields")] @@ -688,7 +688,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("script_fields")] - public Dictionary? ScriptFields { get; set; } + public IDictionary? ScriptFields { get; set; } [JsonInclude] [JsonPropertyName("search_after")] @@ -749,7 +749,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } [JsonInclude] [JsonPropertyName("stats")] @@ -890,11 +890,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private bool? ExplainValue { get; set; } - private Dictionary? ExtValue { get; set; } + private IDictionary? ExtValue { get; set; } private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private double? MinScoreValue { get; set; } @@ -906,9 +906,9 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private bool? ProfileValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } @@ -1272,7 +1272,7 @@ public SearchRequestDescriptor From(int? from) return Self; } - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) { IndicesBoostValue = indicesBoost; return Self; @@ -1924,11 +1924,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private bool? ExplainValue { get; set; } - private Dictionary? ExtValue { get; set; } + private IDictionary? ExtValue { get; set; } private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private double? MinScoreValue { get; set; } @@ -1940,9 +1940,9 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private bool? ProfileValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } @@ -2306,7 +2306,7 @@ public SearchRequestDescriptor From(int? from) return Self; } - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) { IndicesBoostValue = indicesBoost; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs index 536c8ded04b..967baff9c09 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class SearchResponse : ElasticsearchResponse [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("hits")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs index 3aa550d42c8..a20bcbfae00 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs @@ -27,11 +27,12 @@ public sealed partial class SearchShardsResponse : ElasticsearchResponse { [JsonInclude] [JsonPropertyName("indices")] - public Dictionary Indices { get; init; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Core.SearchShards.ShardStoreIndex))] + public IReadOnlyDictionary Indices { get; init; } [JsonInclude] [JsonPropertyName("nodes")] - public Dictionary Nodes { get; init; } + public IReadOnlyDictionary Nodes { get; init; } [JsonInclude] [JsonPropertyName("shards")] 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 035575cc571..005a02515fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -78,7 +78,7 @@ public sealed partial class QueryRequest : PlainRequest [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } [JsonInclude] [JsonPropertyName("wait_for_completion_timeout")] @@ -86,7 +86,7 @@ public sealed partial class QueryRequest : PlainRequest [JsonInclude] [JsonPropertyName("params")] - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } [JsonInclude] [JsonPropertyName("keep_alive")] @@ -135,13 +135,13 @@ public QueryRequestDescriptor() private Elastic.Clients.Elasticsearch.Duration? PageTimeoutValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private string? QueryValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? RequestTimeoutValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } private string? TimeZoneValue { get; set; } @@ -408,13 +408,13 @@ public QueryRequestDescriptor() private Elastic.Clients.Elasticsearch.Duration? PageTimeoutValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private string? QueryValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? RequestTimeoutValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } private string? TimeZoneValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs index eb08177bf22..f2e5ac8e856 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs @@ -27,5 +27,5 @@ public sealed partial class UpdateByQueryRethrottleResponse : ElasticsearchRespo { [JsonInclude] [JsonPropertyName("nodes")] - public Dictionary Nodes { get; init; } + public IReadOnlyDictionary Nodes { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs index d8bd299a768..74fd64659fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class AdjacencyMatrixAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs index 5895e2339fd..6ceea6b07c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs @@ -43,7 +43,7 @@ public override AdjacencyMatrixAggregation Read(ref Utf8JsonReader reader, Type if (reader.ValueTextEquals("filters")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.Filters = value; @@ -123,9 +123,9 @@ internal AdjacencyMatrixAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Filters { get; set; } + public IDictionary? Filters { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } } @@ -143,9 +143,9 @@ public AdjacencyMatrixAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? FiltersValue { get; set; } + private IDictionary? FiltersValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public AdjacencyMatrixAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { @@ -234,9 +234,9 @@ public AdjacencyMatrixAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? FiltersValue { get; set; } + private IDictionary? FiltersValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public AdjacencyMatrixAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs index 0fecb0639d4..476e047d28b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs @@ -37,5 +37,5 @@ public sealed partial class AutoDateHistogramAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 6392cce89a1..35ef60aee7c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs @@ -115,7 +115,7 @@ public override AutoDateHistogramAggregation Read(ref Utf8JsonReader reader, Typ if (reader.ValueTextEquals("params")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.Params = value; @@ -273,7 +273,7 @@ internal AutoDateHistogramAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? MinimumInterval { get; set; } @@ -283,7 +283,7 @@ internal AutoDateHistogramAggregation() public string? Offset { get; set; } - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } public Elastic.Clients.Elasticsearch.Script? Script { get; set; } @@ -309,7 +309,7 @@ public AutoDateHistogramAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } @@ -317,7 +317,7 @@ public AutoDateHistogramAggregationDescriptor() : base() private string? OffsetValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -518,7 +518,7 @@ public AutoDateHistogramAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } @@ -526,7 +526,7 @@ public AutoDateHistogramAggregationDescriptor() : base() private string? OffsetValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregation.g.cs index c86e24da7b4..389b7122a23 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregation.g.cs @@ -163,7 +163,7 @@ internal AverageAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public AverageAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public AverageAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs index 9d104412cb9..08cf7f2cd3b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class AvgAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs index 3a1fe1befc8..5a71d315ca8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs @@ -45,7 +45,7 @@ public sealed partial class BoxPlotAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("min")] 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 600e10b40bb..a737b81ea68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs @@ -163,7 +163,7 @@ internal BoxplotAggregation() public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public BoxplotAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public BoxplotAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs index c789a98e2b3..23a912db19a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs @@ -26,9 +26,9 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations; -public sealed partial class Buckets : Union, IReadOnlyCollection> +public sealed partial class Buckets : Union, IReadOnlyCollection> { - public Buckets(Dictionary dictionary) : base(dictionary) + public Buckets(IReadOnlyDictionary dictionary) : base(dictionary) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregate.g.cs index fb1ee57e352..34c90cee185 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class CardinalityAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] 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 9ee65f11c7f..4387db624e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs @@ -199,7 +199,7 @@ internal CardinalityAggregation() public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -223,7 +223,7 @@ public CardinalityAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -344,7 +344,7 @@ public CardinalityAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregate.g.cs index a7ac12e24ee..fd4cef9fbc0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregate.g.cs @@ -38,7 +38,7 @@ public ChildrenAggregate(IReadOnlyDictionary backingDictiona [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class ChildrenAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class ChildrenAggregateConverter : JsonConverter(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class ChildrenAggregateConverter : JsonConverter?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs index 3c6ba4ffd12..dcf1991d631 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs @@ -123,7 +123,7 @@ internal ChildrenAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -143,7 +143,7 @@ public ChildrenAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? TypeValue { get; set; } @@ -234,7 +234,7 @@ public ChildrenAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? TypeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregate.g.cs index 0565cf917a8..58c99dec238 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class CompositeAggregate : IAggregate { [JsonInclude] [JsonPropertyName("after_key")] - public Dictionary? AfterKey { get; init; } + public IReadOnlyDictionary? AfterKey { get; init; } [JsonInclude] [JsonPropertyName("buckets")] @@ -37,5 +37,5 @@ public sealed partial class CompositeAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 a412bd9f384..f2f597c143b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -43,7 +43,7 @@ public override CompositeAggregation Read(ref Utf8JsonReader reader, Type typeTo if (reader.ValueTextEquals("after")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.After = value; @@ -67,7 +67,7 @@ public override CompositeAggregation Read(ref Utf8JsonReader reader, Type typeTo if (reader.ValueTextEquals("sources")) { reader.Read(); - var value = JsonSerializer.Deserialize>?>(ref reader, options); + var value = JsonSerializer.Deserialize>?>(ref reader, options); if (value is not null) { agg.Sources = value; @@ -157,17 +157,17 @@ internal CompositeAggregation() { } - public Dictionary? After { get; set; } + public IDictionary? After { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } public int? Size { get; set; } - public ICollection>? Sources { get; set; } + public ICollection>? Sources { get; set; } } public sealed partial class CompositeAggregationDescriptor : SerializableDescriptor> @@ -183,13 +183,13 @@ public CompositeAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? AfterValue { get; set; } + private IDictionary? AfterValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } - private ICollection>? SourcesValue { get; set; } + private ICollection>? SourcesValue { get; set; } public CompositeAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { @@ -233,7 +233,7 @@ public CompositeAggregationDescriptor Size(int? size) return Self; } - public CompositeAggregationDescriptor Sources(ICollection>? sources) + public CompositeAggregationDescriptor Sources(ICollection>? sources) { SourcesValue = sources; return Self; @@ -302,13 +302,13 @@ public CompositeAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? AfterValue { get; set; } + private IDictionary? AfterValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } - private ICollection>? SourcesValue { get; set; } + private ICollection>? SourcesValue { get; set; } public CompositeAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { @@ -352,7 +352,7 @@ public CompositeAggregationDescriptor Size(int? size) return Self; } - public CompositeAggregationDescriptor Sources(ICollection>? sources) + public CompositeAggregationDescriptor Sources(ICollection>? sources) { SourcesValue = sources; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeBucket.g.cs index 3a813ab72d9..4759c7e05ce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeBucket.g.cs @@ -38,7 +38,7 @@ public CompositeBucket(IReadOnlyDictionary backingDictionary [JsonInclude] [JsonPropertyName("key")] - public Dictionary Key { get; init; } + public IReadOnlyDictionary Key { get; init; } } internal sealed class CompositeBucketConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class CompositeBucketConverter : JsonConverter throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); var subAggs = new Dictionary(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary key = default; + IReadOnlyDictionary key = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class CompositeBucketConverter : JsonConverter if (name.Equals("key", StringComparison.Ordinal)) { - key = JsonSerializer.Deserialize>(ref reader, options); + key = JsonSerializer.Deserialize>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs index 63b8407a5ac..1044b9c0243 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class CumulativeCardinalityAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] 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 fe6b736e10f..78ee7449e8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs @@ -126,7 +126,7 @@ internal CumulativeCardinalityAggregation() public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } } @@ -142,7 +142,7 @@ public CumulativeCardinalityAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public CumulativeCardinalityAggregationDescriptor Format(string? format) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs index c190a34450f..741ebb850e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class DateHistogramAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 82c91384e9d..27ba479c5aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs @@ -139,7 +139,7 @@ public override DateHistogramAggregation Read(ref Utf8JsonReader reader, Type ty if (reader.ValueTextEquals("params")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.Params = value; @@ -311,7 +311,7 @@ internal DateHistogramAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public int? MinDocCount { get; set; } @@ -324,7 +324,7 @@ internal DateHistogramAggregation() [JsonConverter(typeof(AggregateOrderConverter))] public ICollection>? Order { get; set; } - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } public Elastic.Clients.Elasticsearch.Script? Script { get; set; } @@ -352,7 +352,7 @@ public DateHistogramAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } @@ -362,7 +362,7 @@ public DateHistogramAggregationDescriptor() : base() private ICollection>? OrderValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -589,7 +589,7 @@ public DateHistogramAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } @@ -599,7 +599,7 @@ public DateHistogramAggregationDescriptor() : base() private ICollection>? OrderValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregate.g.cs index 97f8e8f69dc..c97162d3e3c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class DateRangeAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs index 279ee74d768..5ec1c68b1f0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs @@ -199,7 +199,7 @@ internal DateRangeAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -227,7 +227,7 @@ public DateRangeAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -441,7 +441,7 @@ public DateRangeAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 cf0b44ba0d9..57a2c7be70c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class DerivativeAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("normalized_value")] 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 185be5319cd..3f77d405b3b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs @@ -126,7 +126,7 @@ internal DerivativeAggregation() public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } } @@ -142,7 +142,7 @@ public DerivativeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public DerivativeAggregationDescriptor Format(string? format) { 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 5c8a6b94a18..9f5437f7505 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs @@ -37,7 +37,7 @@ public sealed partial class DoubleTermsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("sum_other_doc_count")] 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 4bd1340fb9b..f8cf038cf02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs @@ -49,7 +49,7 @@ public sealed partial class ExtendedStatsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("min")] 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 d11d0950483..33572198ec6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs @@ -181,7 +181,7 @@ internal ExtendedStatsAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -203,7 +203,7 @@ public ExtendedStatsAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -310,7 +310,7 @@ public ExtendedStatsAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 29d1e8e6c3e..a5496987940 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs @@ -49,7 +49,7 @@ public sealed partial class ExtendedStatsBucketAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("min")] 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 59f1f61aae9..976ad809847 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs @@ -144,7 +144,7 @@ internal ExtendedStatsBucketAggregation() public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -162,7 +162,7 @@ public ExtendedStatsBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? SigmaValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FilterAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FilterAggregate.g.cs index 29a5225f587..534815dfdef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FilterAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FilterAggregate.g.cs @@ -38,7 +38,7 @@ public FilterAggregate(IReadOnlyDictionary backingDictionary [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class FilterAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class FilterAggregateConverter : JsonConverter throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); var subAggs = new Dictionary(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class FilterAggregateConverter : JsonConverter if (name.Equals("meta", StringComparison.Ordinal)) { - meta = JsonSerializer.Deserialize?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregate.g.cs index 755af8ee426..889546be401 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class FiltersAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 9727295e2eb..81ab0327d5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs @@ -161,7 +161,7 @@ internal FiltersAggregation() public Elastic.Clients.Elasticsearch.Aggregations.Buckets? Filters { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -185,7 +185,7 @@ public FiltersAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.Buckets? FiltersValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? OtherBucketValue { get; set; } @@ -304,7 +304,7 @@ public FiltersAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.Buckets? FiltersValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? OtherBucketValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregate.g.cs index 7ef84eb1d94..f1f90835c49 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregate.g.cs @@ -38,7 +38,7 @@ public GlobalAggregate(IReadOnlyDictionary backingDictionary [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class GlobalAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class GlobalAggregateConverter : JsonConverter throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); var subAggs = new Dictionary(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class GlobalAggregateConverter : JsonConverter if (name.Equals("meta", StringComparison.Ordinal)) { - meta = JsonSerializer.Deserialize?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs index bc19b47b518..eeff09f62e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs @@ -106,7 +106,7 @@ internal GlobalAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } } @@ -124,7 +124,7 @@ public GlobalAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public GlobalAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { @@ -201,7 +201,7 @@ public GlobalAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public GlobalAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregate.g.cs index f7be2c4bf3c..73a8f119375 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class HistogramAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 8f0612e30b5..9197f77936e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs @@ -255,7 +255,7 @@ internal HistogramAggregation() public double? Interval { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public int? MinDocCount { get; set; } @@ -290,7 +290,7 @@ public HistogramAggregationDescriptor() : base() private double? IntervalValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } @@ -485,7 +485,7 @@ public HistogramAggregationDescriptor() : base() private double? IntervalValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } 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 a77a5fe0748..9c6ecd594ed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class InferenceAggregate : IAggregate { [JsonInclude] [JsonPropertyName("data")] - public Dictionary Data { get; init; } + public IReadOnlyDictionary Data { get; init; } [JsonInclude] [JsonPropertyName("feature_importance")] @@ -37,7 +37,7 @@ public sealed partial class InferenceAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("top_classes")] 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 beb5815e672..2c590b9ac3b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -160,7 +160,7 @@ internal InferenceAggregation() public Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfig { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public Elastic.Clients.Elasticsearch.Name ModelId { get; set; } @@ -184,7 +184,7 @@ public InferenceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Name ModelIdValue { get; set; } @@ -299,7 +299,7 @@ public InferenceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Name ModelIdValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregate.g.cs index 6520013bdbf..ba44330c681 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class IpRangeAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs index 6756c950ee9..07e6ebb7f01 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs @@ -143,7 +143,7 @@ internal IpRangeAggregation() public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -165,7 +165,7 @@ public IpRangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? RangesValue { get; set; } @@ -337,7 +337,7 @@ public IpRangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? RangesValue { get; set; } 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 d5faac6fdc9..03c015d4ee9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs @@ -37,7 +37,7 @@ public sealed partial class LongTermsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("sum_other_doc_count")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs index ba7628fe110..098f04c6402 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs @@ -37,5 +37,5 @@ public sealed partial class MatrixStatsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 d96d0a9d3ab..dabf70a8f5f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs @@ -55,7 +55,7 @@ public override MatrixStatsAggregation Read(ref Utf8JsonReader reader, Type type if (reader.ValueTextEquals("missing")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.Missing = value; @@ -142,9 +142,9 @@ internal MatrixStatsAggregation() public Elastic.Clients.Elasticsearch.Fields? Fields { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } - public Dictionary? Missing { get; set; } + public IDictionary? Missing { get; set; } public Elastic.Clients.Elasticsearch.SortMode? Mode { get; set; } @@ -160,9 +160,9 @@ public MatrixStatsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } - private Dictionary? MissingValue { get; set; } + private IDictionary? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } @@ -233,9 +233,9 @@ public MatrixStatsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } - private Dictionary? MissingValue { get; set; } + private IDictionary? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsFields.g.cs index 2347b1d055b..18cfa8691f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsFields.g.cs @@ -29,7 +29,8 @@ public sealed partial class MatrixStatsFields { [JsonInclude] [JsonPropertyName("correlation")] - public Dictionary Correlation { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(double))] + public IReadOnlyDictionary Correlation { get; init; } [JsonInclude] [JsonPropertyName("count")] @@ -37,7 +38,8 @@ public sealed partial class MatrixStatsFields [JsonInclude] [JsonPropertyName("covariance")] - public Dictionary Covariance { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(double))] + public IReadOnlyDictionary Covariance { get; init; } [JsonInclude] [JsonPropertyName("kurtosis")] 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 dbee2cafc28..06a26424b70 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class MaxAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregation.g.cs index 9c1d54b74cf..64336a01514 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregation.g.cs @@ -163,7 +163,7 @@ internal MaxAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public MaxAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public MaxAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 543537b6ce9..6ecc42de619 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class MedianAbsoluteDeviationAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] 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 4559e4c014a..29488ba1eec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs @@ -183,7 +183,7 @@ internal MedianAbsoluteDeviationAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -205,7 +205,7 @@ public MedianAbsoluteDeviationAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -312,7 +312,7 @@ public MedianAbsoluteDeviationAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 d04566f23a8..3d270313a33 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class MinAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregation.g.cs index 6e0175ac6c8..e118da2fb36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregation.g.cs @@ -163,7 +163,7 @@ internal MinAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public MinAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public MinAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregate.g.cs index 61c383c83dd..0aa1b8342f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregate.g.cs @@ -38,7 +38,7 @@ public MissingAggregate(IReadOnlyDictionary backingDictionar [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class MissingAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class MissingAggregateConverter : JsonConverter(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class MissingAggregateConverter : JsonConverter?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs index c60afda251b..d9b9d961394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs @@ -143,7 +143,7 @@ internal MissingAggregation() public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -165,7 +165,7 @@ public MissingAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public MissingAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 453814bc6e2..74e84ef108b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs @@ -37,7 +37,7 @@ public sealed partial class MultiTermsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("sum_other_doc_count")] 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 20189303c81..bedea79b370 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -247,7 +247,7 @@ internal MultiTermsAggregation() public Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectMode { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public long? MinDocCount { get; set; } @@ -290,7 +290,7 @@ public MultiTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } @@ -540,7 +540,7 @@ public MultiTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregate.g.cs index 68c63f74d54..3aec7e8e7ba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregate.g.cs @@ -38,7 +38,7 @@ public NestedAggregate(IReadOnlyDictionary backingDictionary [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class NestedAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class NestedAggregateConverter : JsonConverter throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); var subAggs = new Dictionary(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class NestedAggregateConverter : JsonConverter if (name.Equals("meta", StringComparison.Ordinal)) { - meta = JsonSerializer.Deserialize?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs index 52881a0717d..fb087a582e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs @@ -123,7 +123,7 @@ internal NestedAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -143,7 +143,7 @@ public NestedAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } @@ -240,7 +240,7 @@ public NestedAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregate.g.cs index 0be38af3f18..f18d6039ced 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregate.g.cs @@ -38,7 +38,7 @@ public ParentAggregate(IReadOnlyDictionary backingDictionary [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class ParentAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class ParentAggregateConverter : JsonConverter throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); var subAggs = new Dictionary(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class ParentAggregateConverter : JsonConverter if (name.Equals("meta", StringComparison.Ordinal)) { - meta = JsonSerializer.Deserialize?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs index 43ea82952e2..3f6ab86c7af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs @@ -123,7 +123,7 @@ internal ParentAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -143,7 +143,7 @@ public ParentAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? TypeValue { get; set; } @@ -234,7 +234,7 @@ public ParentAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? TypeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs index 5983530a114..4ad9a704d3c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs @@ -26,9 +26,9 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations; -public sealed partial class Percentiles : Union, IReadOnlyCollection> +public sealed partial class Percentiles : Union, IReadOnlyCollection> { - public Percentiles(Dictionary dictionary) : base(dictionary) + public Percentiles(IReadOnlyDictionary dictionary) : base(dictionary) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs index fcfe9092999..2cbf0adbfae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class PercentilesBucketAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("values")] 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 084d516bbd5..fb615ac4255 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs @@ -144,7 +144,7 @@ internal PercentilesBucketAggregation() public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -162,7 +162,7 @@ public PercentilesBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? PercentsValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregate.g.cs index a7c4cf6f8a7..df78a633e1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class RangeAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 9903e820092..3b88b970067 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs @@ -199,7 +199,7 @@ internal RangeAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public int? Missing { get; set; } @@ -227,7 +227,7 @@ public RangeAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MissingValue { get; set; } @@ -441,7 +441,7 @@ public RangeAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregate.g.cs index ccd5254b977..ace853328e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class RateAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] 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 0cbf47cb3b5..1a338bc2e07 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs @@ -199,7 +199,7 @@ internal RateAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -223,7 +223,7 @@ public RateAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -344,7 +344,7 @@ public RateAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs index cc7ff0bd841..9591431c07b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs @@ -38,7 +38,7 @@ public ReverseNestedAggregate(IReadOnlyDictionary backingDic [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class ReverseNestedAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class ReverseNestedAggregateConverter : JsonConverter(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class ReverseNestedAggregateConverter : JsonConverter?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs index 6f007e68958..5223a7df5f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs @@ -123,7 +123,7 @@ internal ReverseNestedAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -143,7 +143,7 @@ public ReverseNestedAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } @@ -240,7 +240,7 @@ public ReverseNestedAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregate.g.cs index 2bf60d077f7..819a35304fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregate.g.cs @@ -38,7 +38,7 @@ public SamplerAggregate(IReadOnlyDictionary backingDictionar [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } internal sealed class SamplerAggregateConverter : JsonConverter @@ -49,7 +49,7 @@ internal sealed class SamplerAggregateConverter : JsonConverter(); // TODO - Optimise this and only create if we need it. long docCount = default; - Dictionary? meta = default; + IReadOnlyDictionary? meta = default; while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndObject) @@ -66,7 +66,7 @@ internal sealed class SamplerAggregateConverter : JsonConverter?>(ref reader, options); + meta = JsonSerializer.Deserialize?>(ref reader, options); continue; } 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 51133c366ae..7551b19c2cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs @@ -123,7 +123,7 @@ internal SamplerAggregation() public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -143,7 +143,7 @@ public SamplerAggregationDescriptor() : base() private Action> AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? ShardSizeValue { get; set; } @@ -234,7 +234,7 @@ public SamplerAggregationDescriptor() : base() private Action AggregationsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? ShardSizeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs index d0ba63bb3e4..f151bf27572 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class ScriptedMetricAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs index 947babcad63..25f1613667a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs @@ -103,7 +103,7 @@ public override ScriptedMetricAggregation Read(ref Utf8JsonReader reader, Type t if (reader.ValueTextEquals("params")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.Params = value; @@ -239,13 +239,13 @@ internal ScriptedMetricAggregation() public Elastic.Clients.Elasticsearch.Script? MapScript { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } public override string? Name { get; internal set; } - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } public Elastic.Clients.Elasticsearch.Script? ReduceScript { get; set; } @@ -267,11 +267,11 @@ public ScriptedMetricAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? MapScriptValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ReduceScriptValue { get; set; } @@ -416,11 +416,11 @@ public ScriptedMetricAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? MapScriptValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ReduceScriptValue { get; set; } 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 1e3a11712c7..e1165fab28c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs @@ -49,7 +49,7 @@ public sealed partial class StatsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("min")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregation.g.cs index 7453c55a57c..1f1bf376494 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregation.g.cs @@ -163,7 +163,7 @@ internal StatsAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public StatsAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public StatsAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 af92c1f8cb5..45837ad6594 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs @@ -49,7 +49,7 @@ public sealed partial class StatsBucketAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("min")] 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 c83666edc0b..963f20cd951 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs @@ -126,7 +126,7 @@ internal StatsBucketAggregation() public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } } @@ -142,7 +142,7 @@ public StatsBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public StatsBucketAggregationDescriptor Format(string? format) { 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 3bce4901fa8..315e3b8089d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs @@ -41,7 +41,7 @@ public sealed partial class StringStatsAggregate : IAggregate [JsonInclude] [JsonPropertyName("distribution")] - public Dictionary? Distribution { get; init; } + public IReadOnlyDictionary? Distribution { get; init; } [JsonInclude] [JsonPropertyName("entropy")] @@ -57,7 +57,7 @@ public sealed partial class StringStatsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("min_length")] 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 3d9e041dd9e..5de64f4435d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs @@ -161,7 +161,7 @@ internal StringStatsAggregation() public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -181,7 +181,7 @@ public StringStatsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -274,7 +274,7 @@ public StringStatsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 20ef7a5ebc7..202ff8466e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs @@ -37,7 +37,7 @@ public sealed partial class StringTermsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("sum_other_doc_count")] 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 aca972e3b19..6877c8feb2e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class SumAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregation.g.cs index 5da8915c468..55a5bfe1987 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregation.g.cs @@ -163,7 +163,7 @@ internal SumAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public SumAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public SumAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs index 373e1176334..91bce5db1e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class TDigestPercentileRanksAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("values")] 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 3b3d6157173..caf7eadebc8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class TTestAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] 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 10c80a73fa1..7b2aa240248 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs @@ -144,7 +144,7 @@ internal TTestAggregation() public Elastic.Clients.Elasticsearch.Aggregations.TestPopulation? b { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -170,7 +170,7 @@ public TTestAggregationDescriptor() : base() private Action> bDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TTestType? TypeValue { get; set; } @@ -307,7 +307,7 @@ public TTestAggregationDescriptor() : base() private Action bDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TTestType? TypeValue { get; set; } 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 e4a99eadb2d..f3f747620d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs @@ -405,7 +405,7 @@ internal TermsAggregation() public Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? Include { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public int? MinDocCount { get; set; } @@ -456,7 +456,7 @@ public TermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } @@ -763,7 +763,7 @@ public TermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs index f994bbcc542..fb0cd55ba15 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class TopHitsAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 462c25a77bf..11fad952411 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs @@ -139,7 +139,7 @@ public override TopHitsAggregation Read(ref Utf8JsonReader reader, Type typeToCo if (reader.ValueTextEquals("script_fields")) { reader.Read(); - var value = JsonSerializer.Deserialize?>(ref reader, options); + var value = JsonSerializer.Deserialize?>(ref reader, options); if (value is not null) { agg.ScriptFields = value; @@ -369,7 +369,7 @@ internal TopHitsAggregation() public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -377,7 +377,7 @@ internal TopHitsAggregation() public Elastic.Clients.Elasticsearch.Script? Script { get; set; } - public Dictionary? ScriptFields { get; set; } + public IDictionary? ScriptFields { get; set; } public bool? SeqNoPrimaryTerm { get; set; } @@ -424,13 +424,13 @@ public TopHitsAggregationDescriptor() : base() private int? FromValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } @@ -762,13 +762,13 @@ public TopHitsAggregationDescriptor() : base() private int? FromValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetrics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetrics.g.cs index e204328f596..3816130952c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetrics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetrics.g.cs @@ -29,7 +29,7 @@ public sealed partial class TopMetrics { [JsonInclude] [JsonPropertyName("metrics")] - public Dictionary? Metrics { get; init; } + public IReadOnlyDictionary? Metrics { get; init; } [JsonInclude] [JsonPropertyName("sort")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs index b88f7d59cbe..e3e01ebc1a4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class TopMetricsAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("top")] 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 6ce5244c9ad..41981af7e3b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs @@ -197,7 +197,7 @@ internal TopMetricsAggregation() public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public ICollection? Metrics { get; set; } @@ -238,7 +238,7 @@ public TopMetricsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -479,7 +479,7 @@ public TopMetricsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } 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 8c6e8414db2..a755e83ed99 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class ValueCountAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregation.g.cs index f7c6e61ecd3..3eeef7e024e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregation.g.cs @@ -163,7 +163,7 @@ internal ValueCountAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public FieldValue? Missing { get; set; } @@ -183,7 +183,7 @@ public ValueCountAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } @@ -276,7 +276,7 @@ public ValueCountAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs index 3b8c9062039..907a3f3be63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs @@ -33,5 +33,5 @@ public sealed partial class VariableWidthHistogramAggregate : IAggregate [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } } \ No newline at end of file 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 039411565cb..93224c4e6d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs @@ -164,7 +164,7 @@ internal VariableWidthHistogramAggregation() public int? InitialBuffer { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -184,7 +184,7 @@ public VariableWidthHistogramAggregationDescriptor() : base() private int? InitialBufferValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? ShardSizeValue { get; set; } @@ -277,7 +277,7 @@ public VariableWidthHistogramAggregationDescriptor() : base() private int? InitialBufferValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? ShardSizeValue { get; set; } 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 2eae14833fe..721ef286c46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -160,7 +160,7 @@ internal WeightedAverageAggregation() public string? Format { get; set; } - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } public override string? Name { get; internal set; } @@ -192,7 +192,7 @@ public WeightedAverageAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.ValueType? ValueTypeValue { get; set; } @@ -343,7 +343,7 @@ public WeightedAverageAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.ValueType? ValueTypeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAvgAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAvgAggregate.g.cs index ae3eff2a1b3..345fde5fdbc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAvgAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAvgAggregate.g.cs @@ -29,7 +29,7 @@ public sealed partial class WeightedAvgAggregate : IAggregate { [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs index cdca9e70c71..706960a05db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs @@ -38,11 +38,11 @@ public Analyzers(IDictionary container) : base(container) } public void Add(string name, IAnalyzer analyzer) => BackingDictionary.Add(Sanitize(name), analyzer); - public bool TryGetAnalyzer(string name, [NotNullWhen(returnValue: true)] out IAnalyzer analyzer) => BackingDictionary.TryGetValue(name, out analyzer); + public bool TryGetAnalyzer(string name, [NotNullWhen(returnValue: true)] out IAnalyzer analyzer) => BackingDictionary.TryGetValue(Sanitize(name), out analyzer); public bool TryGetAnalyzer(string name, [NotNullWhen(returnValue: true)] out T? analyzer) where T : class, IAnalyzer { - if (BackingDictionary.TryGetValue(name, out var matchedValue) && matchedValue is T finalValue) + if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) { analyzer = finalValue; return true; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs index 08164fbb0b3..1872d287c1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs @@ -38,11 +38,11 @@ public CharFilterDefinitions(IDictionary containe } public void Add(string name, ICharFilterDefinition charFilterDefinition) => BackingDictionary.Add(Sanitize(name), charFilterDefinition); - public bool TryGetCharFilterDefinition(string name, [NotNullWhen(returnValue: true)] out ICharFilterDefinition charFilterDefinition) => BackingDictionary.TryGetValue(name, out charFilterDefinition); + public bool TryGetCharFilterDefinition(string name, [NotNullWhen(returnValue: true)] out ICharFilterDefinition charFilterDefinition) => BackingDictionary.TryGetValue(Sanitize(name), out charFilterDefinition); public bool TryGetCharFilterDefinition(string name, [NotNullWhen(returnValue: true)] out T? charFilterDefinition) where T : class, ICharFilterDefinition { - if (BackingDictionary.TryGetValue(name, out var matchedValue) && matchedValue is T finalValue) + if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) { charFilterDefinition = finalValue; return true; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs index 3fdae6339b8..1cdbcc359fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs @@ -38,11 +38,11 @@ public Normalizers(IDictionary container) : base(container) } public void Add(string name, INormalizer normalizer) => BackingDictionary.Add(Sanitize(name), normalizer); - public bool TryGetNormalizer(string name, [NotNullWhen(returnValue: true)] out INormalizer normalizer) => BackingDictionary.TryGetValue(name, out normalizer); + public bool TryGetNormalizer(string name, [NotNullWhen(returnValue: true)] out INormalizer normalizer) => BackingDictionary.TryGetValue(Sanitize(name), out normalizer); public bool TryGetNormalizer(string name, [NotNullWhen(returnValue: true)] out T? normalizer) where T : class, INormalizer { - if (BackingDictionary.TryGetValue(name, out var matchedValue) && matchedValue is T finalValue) + if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) { normalizer = finalValue; return true; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs index b8c89cce422..35612d740c4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs @@ -38,11 +38,11 @@ public TokenFilterDefinitions(IDictionary contai } public void Add(string name, ITokenFilterDefinition tokenFilterDefinition) => BackingDictionary.Add(Sanitize(name), tokenFilterDefinition); - public bool TryGetTokenFilterDefinition(string name, [NotNullWhen(returnValue: true)] out ITokenFilterDefinition tokenFilterDefinition) => BackingDictionary.TryGetValue(name, out tokenFilterDefinition); + public bool TryGetTokenFilterDefinition(string name, [NotNullWhen(returnValue: true)] out ITokenFilterDefinition tokenFilterDefinition) => BackingDictionary.TryGetValue(Sanitize(name), out tokenFilterDefinition); public bool TryGetTokenFilterDefinition(string name, [NotNullWhen(returnValue: true)] out T? tokenFilterDefinition) where T : class, ITokenFilterDefinition { - if (BackingDictionary.TryGetValue(name, out var matchedValue) && matchedValue is T finalValue) + if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) { tokenFilterDefinition = finalValue; return true; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs index 02680ce6c7e..e43c980054b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs @@ -38,11 +38,11 @@ public TokenizerDefinitions(IDictionary container) } public void Add(string name, ITokenizerDefinition tokenizerDefinition) => BackingDictionary.Add(Sanitize(name), tokenizerDefinition); - public bool TryGetTokenizerDefinition(string name, [NotNullWhen(returnValue: true)] out ITokenizerDefinition tokenizerDefinition) => BackingDictionary.TryGetValue(name, out tokenizerDefinition); + public bool TryGetTokenizerDefinition(string name, [NotNullWhen(returnValue: true)] out ITokenizerDefinition tokenizerDefinition) => BackingDictionary.TryGetValue(Sanitize(name), out tokenizerDefinition); public bool TryGetTokenizerDefinition(string name, [NotNullWhen(returnValue: true)] out T? tokenizerDefinition) where T : class, ITokenizerDefinition { - if (BackingDictionary.TryGetValue(name, out var matchedValue) && matchedValue is T finalValue) + if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) { tokenizerDefinition = finalValue; return true; 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 273b8eb96ef..c10df13caf9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs @@ -45,7 +45,7 @@ public sealed partial class AsyncSearch [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("hits")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs index a5824abe32c..28445442e35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs @@ -53,7 +53,7 @@ public sealed partial class IndexHealthStats [JsonInclude] [JsonPropertyName("shards")] - public Dictionary? Shards { get; init; } + public IReadOnlyDictionary? Shards { get; init; } [JsonInclude] [JsonPropertyName("status")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionStats.g.cs index 77ff1e73126..f04bb02f2d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionStats.g.cs @@ -29,7 +29,8 @@ public sealed partial class CompletionStats { [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.FieldSizeUsage))] + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("size")] 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 7b7aa5b0855..8cd248a2a49 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 @@ -37,7 +37,7 @@ public sealed partial class FieldCapability [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("metadata_field")] 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 970d670c695..a875275788e 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 @@ -45,7 +45,7 @@ public sealed partial class MultiSearchItem [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("hits")] 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 fb56fbdd2ff..2a1e2567f4e 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 @@ -45,7 +45,7 @@ public sealed partial class MultisearchBody [JsonInclude] [JsonPropertyName("ext")] - public Dictionary? Ext { get; set; } + public IDictionary? Ext { get; set; } [JsonInclude] [JsonPropertyName("fields")] @@ -61,7 +61,7 @@ public sealed partial class MultisearchBody [JsonInclude] [JsonPropertyName("indices_boost")] - public ICollection>? IndicesBoost { get; set; } + public ICollection>? IndicesBoost { get; set; } [JsonInclude] [JsonPropertyName("knn")] @@ -93,11 +93,11 @@ public sealed partial class MultisearchBody [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } [JsonInclude] [JsonPropertyName("script_fields")] - public Dictionary? ScriptFields { get; set; } + public IDictionary? ScriptFields { get; set; } [JsonInclude] [JsonPropertyName("search_after")] @@ -222,11 +222,11 @@ public MultisearchBodyDescriptor() : base() private bool? ExplainValue { get; set; } - private Dictionary? ExtValue { get; set; } + private IDictionary? ExtValue { get; set; } private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private double? MinScoreValue { get; set; } @@ -238,9 +238,9 @@ public MultisearchBodyDescriptor() : base() private bool? ProfileValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } @@ -556,7 +556,7 @@ public MultisearchBodyDescriptor From(int? from) return Self; } - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) { IndicesBoostValue = indicesBoost; return Self; @@ -1122,11 +1122,11 @@ public MultisearchBodyDescriptor() : base() private bool? ExplainValue { get; set; } - private Dictionary? ExtValue { get; set; } + private IDictionary? ExtValue { get; set; } private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private double? MinScoreValue { get; set; } @@ -1138,9 +1138,9 @@ public MultisearchBodyDescriptor() : base() private bool? ProfileValue { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } @@ -1456,7 +1456,7 @@ public MultisearchBodyDescriptor From(int? from) return Self; } - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) { IndicesBoostValue = indicesBoost; return Self; 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 bec571d0a62..b2a28fd951f 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 @@ -37,7 +37,7 @@ public sealed partial class TemplateConfig [JsonInclude] [JsonPropertyName("params")] - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } [JsonInclude] [JsonPropertyName("profile")] @@ -59,7 +59,7 @@ public TemplateConfigDescriptor() : base() private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private bool? ProfileValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs index 9ebd14bc1a0..83bb678b2d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs @@ -33,7 +33,7 @@ public sealed partial class RankEvalMetricDetail [JsonInclude] [JsonPropertyName("metric_details")] - public Dictionary> MetricDetails { get; init; } + public IReadOnlyDictionary> MetricDetails { get; init; } [JsonInclude] [JsonPropertyName("metric_score")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs index c25bd64e2ec..83e842c148a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs @@ -33,7 +33,7 @@ public sealed partial class RankEvalRequestItem [JsonInclude] [JsonPropertyName("params")] - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } [JsonInclude] [JsonPropertyName("ratings")] @@ -63,7 +63,7 @@ public RankEvalRequestItemDescriptor() : base() private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private ICollection RatingsValue { get; set; } @@ -236,7 +236,7 @@ public RankEvalRequestItemDescriptor() : base() private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private ICollection RatingsValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs index f9d9aa2c060..4738b058484 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs @@ -33,7 +33,7 @@ public sealed partial class RemoteSource [JsonInclude] [JsonPropertyName("headers")] - public Dictionary? Headers { get; set; } + public IDictionary? Headers { get; set; } [JsonInclude] [JsonPropertyName("host")] @@ -61,7 +61,7 @@ public RemoteSourceDescriptor() : base() private Elastic.Clients.Elasticsearch.Duration? ConnectTimeoutValue { get; set; } - private Dictionary? HeadersValue { get; set; } + private IDictionary? HeadersValue { get; set; } private string HostValue { get; set; } 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 bacb194de9a..140a51a279d 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 @@ -45,7 +45,7 @@ public sealed partial class Source [JsonInclude] [JsonPropertyName("runtime_mappings")] - public Dictionary? RuntimeMappings { get; set; } + public IDictionary? RuntimeMappings { get; set; } [JsonInclude] [JsonPropertyName("size")] @@ -98,7 +98,7 @@ public SourceDescriptor() : base() private Action RemoteDescriptorAction { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } private int? SizeValue { get; set; } @@ -375,7 +375,7 @@ public SourceDescriptor() : base() private Action RemoteDescriptorAction { get; set; } - private Dictionary? RuntimeMappingsValue { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } private int? SizeValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs index 3fa102632cb..4c457d8a78a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs @@ -29,7 +29,7 @@ public sealed partial class ReindexNode { [JsonInclude] [JsonPropertyName("attributes")] - public Dictionary Attributes { get; init; } + public IReadOnlyDictionary Attributes { get; init; } [JsonInclude] [JsonPropertyName("host")] @@ -49,7 +49,7 @@ public sealed partial class ReindexNode [JsonInclude] [JsonPropertyName("tasks")] - public Dictionary Tasks { get; init; } + public IReadOnlyDictionary Tasks { get; init; } [JsonInclude] [JsonPropertyName("transport_address")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs index b9e0afd08cf..de6f00a27fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs @@ -41,7 +41,7 @@ public sealed partial class ReindexTask [JsonInclude] [JsonPropertyName("headers")] - public Dictionary> Headers { get; init; } + public IReadOnlyDictionary> Headers { get; init; } [JsonInclude] [JsonPropertyName("id")] 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 401b835dd3c..7591748a39e 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 @@ -33,7 +33,7 @@ public sealed partial class CompletionSuggester [JsonInclude] [JsonPropertyName("contexts")] - public Dictionary>? Contexts { get; set; } + public IDictionary>? Contexts { get; set; } [JsonInclude] [JsonPropertyName("field")] @@ -71,7 +71,7 @@ public CompletionSuggesterDescriptor() : base() private string? AnalyzerValue { get; set; } - private Dictionary>? ContextsValue { get; set; } + private IDictionary>? ContextsValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -231,7 +231,7 @@ public CompletionSuggesterDescriptor() : base() private string? AnalyzerValue { get; set; } - private Dictionary>? ContextsValue { get; set; } + private IDictionary>? ContextsValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } 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 61af6c2a9cb..b7f65fcd055 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 @@ -49,7 +49,7 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("fields")] - public Dictionary Fields { get; set; } + public IDictionary Fields { get; set; } [JsonInclude] [JsonPropertyName("force_source")] @@ -89,7 +89,7 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("options")] - public Dictionary? Options { get; set; } + public IDictionary? Options { get; set; } [JsonInclude] [JsonPropertyName("order")] @@ -143,7 +143,7 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? EncoderValue { get; set; } - private Dictionary FieldsValue { get; set; } + private IDictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } @@ -161,7 +161,7 @@ public HighlightDescriptor() : base() private int? NumberOfFragmentsValue { get; set; } - private Dictionary? OptionsValue { get; set; } + private IDictionary? OptionsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } @@ -507,7 +507,7 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? EncoderValue { get; set; } - private Dictionary FieldsValue { get; set; } + private IDictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } @@ -525,7 +525,7 @@ public HighlightDescriptor() : base() private int? NumberOfFragmentsValue { get; set; } - private Dictionary? OptionsValue { get; set; } + private IDictionary? OptionsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } 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 cac2e7fecaa..13c81b9659a 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 @@ -93,7 +93,7 @@ public sealed partial class HighlightField [JsonInclude] [JsonPropertyName("options")] - public Dictionary? Options { get; set; } + public IDictionary? Options { get; set; } [JsonInclude] [JsonPropertyName("order")] @@ -167,7 +167,7 @@ public HighlightFieldDescriptor() : base() private int? NumberOfFragmentsValue { get; set; } - private Dictionary? OptionsValue { get; set; } + private IDictionary? OptionsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } @@ -549,7 +549,7 @@ public HighlightFieldDescriptor() : base() private int? NumberOfFragmentsValue { get; set; } - private Dictionary? OptionsValue { get; set; } + private IDictionary? OptionsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } 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 f65ef746e71..5d79eae3144 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 @@ -82,19 +82,19 @@ public sealed partial class Hit [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("highlight")] - public Dictionary>? Highlight { get; init; } + public IReadOnlyDictionary>? Highlight { get; init; } [JsonInclude] [JsonPropertyName("ignored_field_values")] - public Dictionary>? IgnoredFieldValues { get; init; } + public IReadOnlyDictionary>? IgnoredFieldValues { get; init; } [JsonInclude] [JsonPropertyName("inner_hits")] - public Dictionary? InnerHits { get; init; } + public IReadOnlyDictionary? InnerHits { get; init; } [JsonInclude] [JsonPropertyName("matched_queries")] 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 0ee668575a7..3be86c031e6 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 @@ -65,7 +65,7 @@ public sealed partial class InnerHits [JsonInclude] [JsonPropertyName("script_fields")] - public Dictionary? ScriptFields { get; set; } + public IDictionary? ScriptFields { get; set; } [JsonInclude] [JsonPropertyName("seq_no_primary_term")] @@ -140,7 +140,7 @@ public InnerHitsDescriptor() : base() private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } @@ -562,7 +562,7 @@ public InnerHitsDescriptor() : base() private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } - private Dictionary? ScriptFieldsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } 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 5776c440f72..f9f9e2bf5cc 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 @@ -29,7 +29,7 @@ public sealed partial class PhraseSuggestCollate { [JsonInclude] [JsonPropertyName("params")] - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } [JsonInclude] [JsonPropertyName("prune")] @@ -47,7 +47,7 @@ public PhraseSuggestCollateDescriptor() : base() { } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private bool? PruneValue { get; set; } 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 98d3f518bdc..6e11ab57373 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 @@ -79,7 +79,7 @@ public override void Write(Utf8JsonWriter writer, Suggester value, JsonSerialize [JsonConverter(typeof(SuggesterConverter))] public sealed partial class Suggester { - public Dictionary Suggesters { get; set; } + public IDictionary Suggesters { get; set; } public string? Text { get; set; } } @@ -91,7 +91,7 @@ public SuggesterDescriptor() : base() { } - private Dictionary SuggestersValue { get; set; } + private IDictionary SuggestersValue { get; set; } private string? TextValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs index 5dd86fc4c4d..6057f35cdb0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs @@ -29,7 +29,7 @@ public sealed partial class UpdateByQueryRethrottleNode { [JsonInclude] [JsonPropertyName("attributes")] - public Dictionary Attributes { get; init; } + public IReadOnlyDictionary Attributes { get; init; } [JsonInclude] [JsonPropertyName("host")] @@ -49,7 +49,7 @@ public sealed partial class UpdateByQueryRethrottleNode [JsonInclude] [JsonPropertyName("tasks")] - public Dictionary Tasks { get; init; } + public IReadOnlyDictionary Tasks { get; init; } [JsonInclude] [JsonPropertyName("transport_address")] 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 504119398f1..609962c5150 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs @@ -41,5 +41,6 @@ public sealed partial class HitsEvent [JsonInclude] [JsonPropertyName("fields")] - public Dictionary>? Fields { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(IReadOnlyCollection))] + public IReadOnlyDictionary>? Fields { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs index 7b968e510d3..f245e0099cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs @@ -99,7 +99,7 @@ public sealed partial class ErrorCause { public Elastic.Clients.Elasticsearch.ErrorCause? CausedBy { get; init; } - public Dictionary Metadata { get; init; } + public IReadOnlyDictionary Metadata { get; init; } public string? Reason { get; init; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs index aeb4e58ff4f..b3414310cd3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs @@ -33,7 +33,8 @@ public sealed partial class FielddataStats [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.FieldMemoryUsage))] + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("memory_size")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs index e833de15ea6..9e553c52202 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs @@ -33,5 +33,5 @@ public sealed partial class CloseIndexResult [JsonInclude] [JsonPropertyName("shards")] - public Dictionary? Shards { get; init; } + public IReadOnlyDictionary? Shards { get; init; } } \ No newline at end of file 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 b7968dfdb82..d416241eba2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs @@ -29,7 +29,7 @@ public sealed partial class DataStream { [JsonInclude] [JsonPropertyName("_meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("allow_custom_routing")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexAliases.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexAliases.g.cs index a6f7790f7c8..c70b910db1c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexAliases.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexAliases.g.cs @@ -29,5 +29,5 @@ public sealed partial class IndexAliases { [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary Aliases { get; init; } + public IReadOnlyDictionary Aliases { get; init; } } \ No newline at end of file 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 99e6227abe0..e8ebb986167 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -824,7 +824,7 @@ public sealed partial class IndexSettings public Union? NumberOfShards { get; set; } - public Dictionary OtherSettings { get; set; } + public IDictionary OtherSettings { get; set; } public Union? Priority { get; set; } @@ -1000,7 +1000,7 @@ public IndexSettingsDescriptor() : base() private Union? NumberOfShardsValue { get; set; } - private Dictionary OtherSettingsValue { get; set; } + private IDictionary OtherSettingsValue { get; set; } private Union? PriorityValue { get; set; } @@ -2533,7 +2533,7 @@ public IndexSettingsDescriptor() : base() private Union? NumberOfShardsValue { get; set; } - private Dictionary OtherSettingsValue { get; set; } + private IDictionary OtherSettingsValue { get; set; } private Union? PriorityValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs index adbcb9e48f9..e82528ae65e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs @@ -33,11 +33,11 @@ public sealed partial class IndexSettingsAnalysis [JsonInclude] [JsonPropertyName("char_filter")] - public Dictionary? CharFilter { get; set; } + public IDictionary? CharFilter { get; set; } [JsonInclude] [JsonPropertyName("filter")] - public Dictionary? Filter { get; set; } + public IDictionary? Filter { get; set; } [JsonInclude] [JsonPropertyName("normalizer")] @@ -45,7 +45,7 @@ public sealed partial class IndexSettingsAnalysis [JsonInclude] [JsonPropertyName("tokenizer")] - public Dictionary? Tokenizer { get; set; } + public IDictionary? Tokenizer { get; set; } } public sealed partial class IndexSettingsAnalysisDescriptor : SerializableDescriptor @@ -57,13 +57,13 @@ public IndexSettingsAnalysisDescriptor() : base() private Elastic.Clients.Elasticsearch.Analysis.Analyzers? AnalyzerValue { get; set; } - private Dictionary? CharFilterValue { get; set; } + private IDictionary? CharFilterValue { get; set; } - private Dictionary? FilterValue { get; set; } + private IDictionary? FilterValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.Normalizers? NormalizerValue { get; set; } - private Dictionary? TokenizerValue { get; set; } + private IDictionary? TokenizerValue { get; set; } public IndexSettingsAnalysisDescriptor Analyzer(Elastic.Clients.Elasticsearch.Analysis.Analyzers? analyzer) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs index 57b59a3b066..bfd4ae8e9cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs @@ -29,7 +29,7 @@ public sealed partial class IndexState { [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("data_stream")] @@ -73,7 +73,7 @@ public IndexStateDescriptor() : base() private Action> SettingsDescriptorAction { get; set; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.DataStreamName? DataStreamValue { get; set; } @@ -253,7 +253,7 @@ public IndexStateDescriptor() : base() private Action SettingsDescriptorAction { get; set; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.DataStreamName? DataStreamValue { get; set; } 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 9844ca6148f..e046b8476be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs @@ -29,7 +29,7 @@ public sealed partial class IndexTemplate { [JsonInclude] [JsonPropertyName("_meta")] - public Dictionary? Meta { get; init; } + public IReadOnlyDictionary? Meta { get; init; } [JsonInclude] [JsonPropertyName("allow_auto_create")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs index eb2d31671e3..b2cd5b92c84 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs @@ -29,7 +29,7 @@ public sealed partial class IndexTemplateMapping { [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; set; } + public IDictionary? Aliases { get; set; } [JsonInclude] [JsonPropertyName("mappings")] @@ -59,7 +59,7 @@ public IndexTemplateMappingDescriptor() : base() private Action> SettingsDescriptorAction { get; set; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } public IndexTemplateMappingDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) { @@ -179,7 +179,7 @@ public IndexTemplateMappingDescriptor() : base() private Action SettingsDescriptorAction { get; set; } - private Dictionary? AliasesValue { get; set; } + private IDictionary? AliasesValue { get; set; } public IndexTemplateMappingDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs index 0953ea1788d..4d8259638c1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs @@ -29,7 +29,8 @@ public sealed partial class IndexTemplateSummary { [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary? Aliases { get; init; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Alias))] + public IReadOnlyDictionary? Aliases { get; init; } [JsonInclude] [JsonPropertyName("mappings")] 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 87b57bede36..16659b1cf7c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs @@ -37,7 +37,7 @@ public sealed partial class IndicesStats [JsonInclude] [JsonPropertyName("shards")] - public Dictionary>? Shards { get; init; } + public IReadOnlyDictionary>? Shards { get; init; } [JsonInclude] [JsonPropertyName("status")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardCommit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardCommit.g.cs index 4f25b934aaa..84866faf006 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardCommit.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardCommit.g.cs @@ -41,5 +41,5 @@ public sealed partial class ShardCommit [JsonInclude] [JsonPropertyName("user_data")] - public Dictionary UserData { get; init; } + public IReadOnlyDictionary UserData { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Template.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Template.g.cs index 85ea1015048..9a18a955f2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Template.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Template.g.cs @@ -29,7 +29,8 @@ public sealed partial class Template { [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary Aliases { get; init; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Alias))] + public IReadOnlyDictionary Aliases { get; init; } [JsonInclude] [JsonPropertyName("mappings")] 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 be9dd2418df..c54d2ca000c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs @@ -29,7 +29,8 @@ public sealed partial class TemplateMapping { [JsonInclude] [JsonPropertyName("aliases")] - public Dictionary Aliases { get; init; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Alias))] + public IReadOnlyDictionary Aliases { get; init; } [JsonInclude] [JsonPropertyName("index_patterns")] @@ -45,7 +46,7 @@ public sealed partial class TemplateMapping [JsonInclude] [JsonPropertyName("settings")] - public Dictionary Settings { get; init; } + public IReadOnlyDictionary Settings { get; init; } [JsonInclude] [JsonPropertyName("version")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TypeFieldMappings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TypeFieldMappings.g.cs index 08d509d9060..116ad780851 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TypeFieldMappings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TypeFieldMappings.g.cs @@ -29,5 +29,6 @@ public sealed partial class TypeFieldMappings { [JsonInclude] [JsonPropertyName("mappings")] - public Dictionary Mappings { get; init; } + [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.FieldMapping))] + public IReadOnlyDictionary Mappings { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs index 722669ac412..165103709de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs @@ -81,5 +81,5 @@ public sealed partial class IndexingStats [JsonInclude] [JsonPropertyName("types")] - public Dictionary? Types { get; init; } + public IReadOnlyDictionary? Types { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs index 7487b19083a..9105e562f05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs @@ -46,7 +46,7 @@ public sealed partial class InlineGet [JsonInclude] [JsonPropertyName("fields")] - public Dictionary? Fields { get; init; } + public IReadOnlyDictionary? Fields { get; init; } [JsonInclude] [JsonPropertyName("found")] @@ -54,5 +54,5 @@ public sealed partial class InlineGet [JsonInclude] [JsonPropertyName("metadata")] - public Dictionary Metadata { get; init; } + public IReadOnlyDictionary Metadata { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineScript.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineScript.g.cs index ef9ff1d582b..3ecb3198f16 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineScript.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineScript.g.cs @@ -33,11 +33,11 @@ public sealed partial class InlineScript [JsonInclude] [JsonPropertyName("options")] - public Dictionary? Options { get; set; } + public IDictionary? Options { get; set; } [JsonInclude] [JsonPropertyName("params")] - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } [JsonInclude] [JsonPropertyName("source")] @@ -53,9 +53,9 @@ public InlineScriptDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptLanguage? LanguageValue { get; set; } - private Dictionary? OptionsValue { get; set; } + private IDictionary? OptionsValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } private string SourceValue { get; set; } 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 b29b76bf116..00040c2849d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs @@ -45,7 +45,7 @@ public sealed partial class AggregateMetricDoubleProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("metrics")] @@ -79,7 +79,7 @@ public AggregateMetricDoublePropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection MetricsValue { get; set; } @@ -230,7 +230,7 @@ public AggregateMetricDoublePropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection MetricsValue { get; set; } 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 99bcaaa10c8..6cb4828ddb6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs @@ -49,7 +49,7 @@ public sealed partial class BinaryProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -85,7 +85,7 @@ public BinaryPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -258,7 +258,7 @@ public BinaryPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 23e2f28b185..4652426487b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class BooleanProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -111,7 +111,7 @@ public BooleanPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NullValueValue { get; set; } @@ -396,7 +396,7 @@ public BooleanPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NullValueValue { get; set; } 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 fb3dee183dc..f6a3582ae2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class ByteNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public ByteNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public ByteNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } 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 70b56868890..b5902d42f6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class CompletionProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("preserve_position_increments")] @@ -121,7 +121,7 @@ public CompletionPropertyDescriptor() : base() private int? MaxInputLengthValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? PreservePositionIncrementsValue { get; set; } @@ -439,7 +439,7 @@ public CompletionPropertyDescriptor() : base() private int? MaxInputLengthValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? PreservePositionIncrementsValue { get; set; } 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 abb2f14ab6c..9c3052633a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs @@ -41,7 +41,7 @@ public sealed partial class ConstantKeywordProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -68,7 +68,7 @@ public ConstantKeywordPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -193,7 +193,7 @@ public ConstantKeywordPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 fb9a53af5e1..9ca4eaec6c1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class DateNanosProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -117,7 +117,7 @@ public DateNanosPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private DateTimeOffset? NullValueValue { get; set; } @@ -374,7 +374,7 @@ public DateNanosPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private DateTimeOffset? NullValueValue { get; set; } 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 59c55766966..88fee4ba630 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs @@ -73,7 +73,7 @@ public sealed partial class DateProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -133,7 +133,7 @@ public DatePropertyDescriptor() : base() private string? LocaleValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private DateTimeOffset? NullValueValue { get; set; } @@ -474,7 +474,7 @@ public DatePropertyDescriptor() : base() private string? LocaleValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private DateTimeOffset? NullValueValue { get; set; } 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 6944b73b7e8..676713e4003 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class DateRangeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -109,7 +109,7 @@ public DateRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -338,7 +338,7 @@ public DateRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 ae8f06a38ce..32ca060e8cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs @@ -53,7 +53,7 @@ public sealed partial class DenseVectorProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -91,7 +91,7 @@ public DenseVectorPropertyDescriptor() : base() private Action IndexOptionsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -316,7 +316,7 @@ public DenseVectorPropertyDescriptor() : base() private Action IndexOptionsDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 17568a190ed..e9bb45c2132 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class DoubleNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public DoubleNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public DoubleNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } 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 feb403eab72..0236fc5d9b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class DoubleRangeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -103,7 +103,7 @@ public DoubleRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -318,7 +318,7 @@ public DoubleRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 1718c4e4e68..d2f0408c29a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs @@ -97,7 +97,7 @@ public sealed partial class DynamicProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("norms")] @@ -201,7 +201,7 @@ public DynamicPropertyDescriptor() : base() private string? LocaleValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NormsValue { get; set; } @@ -738,7 +738,7 @@ public DynamicPropertyDescriptor() : base() private string? LocaleValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NormsValue { get; set; } 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 aa4084448f9..ab2a3e95538 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs @@ -41,7 +41,7 @@ public sealed partial class FieldAliasProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("path")] @@ -69,7 +69,7 @@ public FieldAliasPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } @@ -206,7 +206,7 @@ public FieldAliasPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } 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 ee9f30bd406..4e26830bd9f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class FlattenedProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -113,7 +113,7 @@ public FlattenedPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } @@ -356,7 +356,7 @@ public FlattenedPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } 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 4075109c7b0..00ffa7a653c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class FloatNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public FloatNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private float? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public FloatNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private float? NullValueValue { get; set; } 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 928bc7e1d00..914e7af57f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class FloatRangeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -103,7 +103,7 @@ public FloatRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -318,7 +318,7 @@ public FloatRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 2896b2c30a8..2100f882609 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs @@ -57,7 +57,7 @@ public sealed partial class GeoPointProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -97,7 +97,7 @@ public GeoPointPropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -298,7 +298,7 @@ public GeoPointPropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 6686fa6d230..42a16004321 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class GeoShapeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("orientation")] @@ -111,7 +111,7 @@ public GeoShapePropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } @@ -354,7 +354,7 @@ public GeoShapePropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } 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 322ee76ba1d..a14b42c62e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class HalfFloatNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public HalfFloatNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private float? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public HalfFloatNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private float? NullValueValue { get; set; } 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 7d2cc26d9c1..4752363e949 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs @@ -45,7 +45,7 @@ public sealed partial class HistogramProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -71,7 +71,7 @@ public HistogramPropertyDescriptor() : base() private bool? IgnoreMalformedValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -202,7 +202,7 @@ public HistogramPropertyDescriptor() : base() private bool? IgnoreMalformedValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 ca3d0a7acaf..e6e400d49fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class IntegerNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public IntegerNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public IntegerNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? NullValueValue { get; set; } 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 38528df7360..a041fcd6bfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class IntegerRangeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -103,7 +103,7 @@ public IntegerRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -318,7 +318,7 @@ public IntegerRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 5f6e0252340..b7f533ced2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class IpProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -119,7 +119,7 @@ public IpPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } @@ -390,7 +390,7 @@ public IpPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } 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 4dc8a02dc10..903142fa155 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class IpRangeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -103,7 +103,7 @@ public IpRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -318,7 +318,7 @@ public IpRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 2c8b9c80691..60cc253a6dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs @@ -45,7 +45,7 @@ public sealed partial class JoinProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -53,7 +53,7 @@ public sealed partial class JoinProperty : IProperty [JsonInclude] [JsonPropertyName("relations")] - public Dictionary>? Relations { get; set; } + public IDictionary>? Relations { get; set; } [JsonInclude] [JsonPropertyName("type")] @@ -75,11 +75,11 @@ public JoinPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Dictionary>? RelationsValue { get; set; } + private IDictionary>? RelationsValue { get; set; } public JoinPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -220,11 +220,11 @@ public JoinPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Dictionary>? RelationsValue { get; set; } + private IDictionary>? RelationsValue { get; set; } public JoinPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { 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 440a2f7724e..57ec7f2a624 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class KeywordProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("normalizer")] @@ -129,7 +129,7 @@ public KeywordPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NormalizerValue { get; set; } @@ -428,7 +428,7 @@ public KeywordPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NormalizerValue { get; set; } 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 6326662ae6f..4edd1ca31f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class LongNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public LongNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private long? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public LongNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private long? NullValueValue { get; set; } 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 1c74ef16b93..8bd3bc31de0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class LongRangeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -103,7 +103,7 @@ public LongRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -318,7 +318,7 @@ public LongRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs index 6164be59000..2264da7c3cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs @@ -37,7 +37,7 @@ public sealed partial class MatchOnlyTextProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("type")] @@ -55,7 +55,7 @@ public MatchOnlyTextPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public MatchOnlyTextPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -130,7 +130,7 @@ public MatchOnlyTextPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } public MatchOnlyTextPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { 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 4cc4965e476..74ebeead5ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs @@ -49,7 +49,7 @@ public sealed partial class Murmur3HashProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -85,7 +85,7 @@ public Murmur3HashPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -258,7 +258,7 @@ public Murmur3HashPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 797bc57908b..d3c7608762b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs @@ -57,7 +57,7 @@ public sealed partial class NestedProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -97,7 +97,7 @@ public NestedPropertyDescriptor() : base() private bool? IncludeInRootValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -298,7 +298,7 @@ public NestedPropertyDescriptor() : base() private bool? IncludeInRootValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 d46b0ff2fc6..fb55cf3e4fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs @@ -49,7 +49,7 @@ public sealed partial class ObjectProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -85,7 +85,7 @@ public ObjectPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -258,7 +258,7 @@ public ObjectPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 1784bda9c73..9a59b6a7727 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs @@ -41,7 +41,7 @@ public sealed partial class PercolatorProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -65,7 +65,7 @@ public PercolatorPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -182,7 +182,7 @@ public PercolatorPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 f49913e0c01..d1642975b05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs @@ -57,7 +57,7 @@ public sealed partial class PointProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -101,7 +101,7 @@ public PointPropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } @@ -316,7 +316,7 @@ public PointPropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs index f65dfb8a279..4c8eda81caf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs @@ -38,11 +38,11 @@ public Properties(IDictionary container) : base(contain } public void Add(PropertyName propertyName, IProperty property) => BackingDictionary.Add(Sanitize(propertyName), property); - public bool TryGetProperty(PropertyName propertyName, [NotNullWhen(returnValue: true)] out IProperty property) => BackingDictionary.TryGetValue(propertyName, out property); + public bool TryGetProperty(PropertyName propertyName, [NotNullWhen(returnValue: true)] out IProperty property) => BackingDictionary.TryGetValue(Sanitize(propertyName), out property); public bool TryGetProperty(PropertyName propertyName, [NotNullWhen(returnValue: true)] out T? property) where T : class, IProperty { - if (BackingDictionary.TryGetValue(propertyName, out var matchedValue) && matchedValue is T finalValue) + if (BackingDictionary.TryGetValue(Sanitize(propertyName), out var matchedValue) && matchedValue is T finalValue) { property = finalValue; return true; 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 f4e1a3988d1..e4e85c33671 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs @@ -41,7 +41,7 @@ public sealed partial class RankFeatureProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("positive_score_impact")] @@ -69,7 +69,7 @@ public RankFeaturePropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? PositiveScoreImpactValue { get; set; } @@ -200,7 +200,7 @@ public RankFeaturePropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? PositiveScoreImpactValue { get; set; } 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 9b6f03b178d..0442fa5beca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs @@ -41,7 +41,7 @@ public sealed partial class RankFeaturesProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -65,7 +65,7 @@ public RankFeaturesPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -182,7 +182,7 @@ public RankFeaturesPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 d5287d3e253..a7587a36002 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class ScaledFloatNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -133,7 +133,7 @@ public ScaledFloatNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } @@ -446,7 +446,7 @@ public ScaledFloatNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } 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 669e703b7fc..5fcb68a72a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class SearchAsYouTypeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("norms")] @@ -119,7 +119,7 @@ public SearchAsYouTypePropertyDescriptor() : base() private int? MaxShingleSizeValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NormsValue { get; set; } @@ -390,7 +390,7 @@ public SearchAsYouTypePropertyDescriptor() : base() private int? MaxShingleSizeValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NormsValue { get; set; } 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 fea8d24ec3e..41a0c4c1c40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -61,7 +61,7 @@ public sealed partial class ShapeProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("orientation")] @@ -107,7 +107,7 @@ public ShapePropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } @@ -336,7 +336,7 @@ public ShapePropertyDescriptor() : base() private bool? IgnoreZValueValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } 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 282629a72ca..e755b3bf506 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class ShortNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public ShortNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public ShortNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } 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 28b61f73597..21b367e677e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs @@ -81,7 +81,7 @@ public sealed partial class TextProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("norms")] @@ -161,7 +161,7 @@ public TextPropertyDescriptor() : base() private Action IndexPrefixesDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NormsValue { get; set; } @@ -628,7 +628,7 @@ public TextPropertyDescriptor() : base() private Action IndexPrefixesDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private bool? NormsValue { get; set; } 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 09fc1b3c844..e19595b5eb0 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 sealed partial class TokenCountProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -113,7 +113,7 @@ public TokenCountPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } @@ -356,7 +356,7 @@ public TokenCountPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } 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 b25f04b857f..e8ce497ca72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs @@ -37,7 +37,7 @@ public sealed partial class TypeMapping [JsonInclude] [JsonPropertyName("_meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("_routing")] @@ -69,7 +69,7 @@ public sealed partial class TypeMapping [JsonInclude] [JsonPropertyName("dynamic_templates")] - public Union?, ICollection>?>? DynamicTemplates { get; set; } + public Union?, ICollection>?>? DynamicTemplates { get; set; } [JsonInclude] [JsonPropertyName("enabled")] @@ -89,7 +89,7 @@ public sealed partial class TypeMapping [JsonInclude] [JsonPropertyName("runtime")] - public Dictionary? Runtime { get; set; } + public IDictionary? Runtime { get; set; } } public sealed partial class TypeMappingDescriptor : SerializableDescriptor> @@ -111,7 +111,7 @@ public TypeMappingDescriptor() : base() private Action FieldNamesDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } @@ -143,7 +143,7 @@ public TypeMappingDescriptor() : base() private ICollection? DynamicDateFormatsValue { get; set; } - private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } + private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } private bool? EnabledValue { get; set; } @@ -157,7 +157,7 @@ public TypeMappingDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Dictionary? RuntimeValue { get; set; } + private IDictionary? RuntimeValue { get; set; } public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? dataStreamTimestamp) { @@ -327,7 +327,7 @@ public TypeMappingDescriptor DynamicDateFormats(ICollection? return Self; } - public TypeMappingDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) + public TypeMappingDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) { DynamicTemplatesValue = dynamicTemplates; return Self; @@ -587,7 +587,7 @@ public TypeMappingDescriptor() : base() private Action FieldNamesDescriptorAction { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } @@ -619,7 +619,7 @@ public TypeMappingDescriptor() : base() private ICollection? DynamicDateFormatsValue { get; set; } - private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } + private Union?, ICollection>?>? DynamicTemplatesValue { get; set; } private bool? EnabledValue { get; set; } @@ -633,7 +633,7 @@ public TypeMappingDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Dictionary? RuntimeValue { get; set; } + private IDictionary? RuntimeValue { get; set; } public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? dataStreamTimestamp) { @@ -803,7 +803,7 @@ public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDate return Self; } - public TypeMappingDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) + public TypeMappingDescriptor DynamicTemplates(Union?, ICollection>?>? dynamicTemplates) { DynamicTemplatesValue = dynamicTemplates; return Self; 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 66fa179c0c1..24960ba9e7d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs @@ -65,7 +65,7 @@ public sealed partial class UnsignedLongNumberProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -129,7 +129,7 @@ public UnsignedLongNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private long? NullValueValue { get; set; } @@ -428,7 +428,7 @@ public UnsignedLongNumberPropertyDescriptor() : base() private bool? IndexValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private long? NullValueValue { get; set; } 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 10d9ed74a44..ac2bb21fd49 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs @@ -49,7 +49,7 @@ public sealed partial class VersionProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("properties")] @@ -85,7 +85,7 @@ public VersionPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } @@ -258,7 +258,7 @@ public VersionPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } 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 2124c9f449b..6e84feb9f5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs @@ -49,7 +49,7 @@ public sealed partial class WildcardProperty : IProperty [JsonInclude] [JsonPropertyName("meta")] - public Dictionary? Meta { get; set; } + public IDictionary? Meta { get; set; } [JsonInclude] [JsonPropertyName("null_value")] @@ -89,7 +89,7 @@ public WildcardPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } @@ -276,7 +276,7 @@ public WildcardPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } - private Dictionary? MetaValue { get; set; } + private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs index a7d6c83d445..95adeeca18c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs @@ -29,7 +29,7 @@ public sealed partial class NodeAttributes { [JsonInclude] [JsonPropertyName("attributes")] - public Dictionary Attributes { get; init; } + public IReadOnlyDictionary Attributes { get; init; } [JsonInclude] [JsonPropertyName("ephemeral_id")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs index 87123bc1558..c5185d956a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs @@ -29,7 +29,7 @@ public sealed partial class NodeShard { [JsonInclude] [JsonPropertyName("allocation_id")] - public Dictionary? AllocationId { get; init; } + public IReadOnlyDictionary? AllocationId { get; init; } [JsonInclude] [JsonPropertyName("index")] @@ -45,7 +45,7 @@ public sealed partial class NodeShard [JsonInclude] [JsonPropertyName("recovery_source")] - public Dictionary? RecoverySource { get; init; } + public IReadOnlyDictionary? RecoverySource { get; init; } [JsonInclude] [JsonPropertyName("relocating_node")] 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 3c41b57c6e8..a968bbcb0e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -45,7 +45,7 @@ public sealed partial class LikeDocument [JsonInclude] [JsonPropertyName("per_field_analyzer")] - public Dictionary? PerFieldAnalyzer { get; set; } + public IDictionary? PerFieldAnalyzer { get; set; } [JsonInclude] [JsonPropertyName("routing")] @@ -75,7 +75,7 @@ public LikeDocumentDescriptor() : base() private Fields? FieldsValue { get; set; } - private Dictionary? PerFieldAnalyzerValue { get; set; } + private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } @@ -195,7 +195,7 @@ public LikeDocumentDescriptor() : base() private Fields? FieldsValue { get; set; } - private Dictionary? PerFieldAnalyzerValue { get; set; } + private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } 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 6803fa30ba9..b76c63c03ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -89,7 +89,7 @@ public sealed partial class MoreLikeThisQuery : SearchQuery [JsonInclude] [JsonPropertyName("per_field_analyzer")] - public Dictionary? PerFieldAnalyzer { get; set; } + public IDictionary? PerFieldAnalyzer { get; set; } [JsonInclude] [JsonPropertyName("routing")] @@ -152,7 +152,7 @@ public MoreLikeThisQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Dictionary? PerFieldAnalyzerValue { get; set; } + private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } @@ -456,7 +456,7 @@ public MoreLikeThisQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Dictionary? PerFieldAnalyzerValue { get; set; } + private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs index df6740c00f6..8a4e32b8b7d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs @@ -45,7 +45,7 @@ public sealed partial class SearchStats [JsonInclude] [JsonPropertyName("groups")] - public Dictionary? Groups { get; init; } + public IReadOnlyDictionary? Groups { get; init; } [JsonInclude] [JsonPropertyName("open_contexts")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs index 59c7ff7ce64..10daadde802 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs @@ -41,7 +41,7 @@ public sealed partial class SegmentsStats [JsonInclude] [JsonPropertyName("file_sizes")] - public Dictionary FileSizes { get; init; } + public IReadOnlyDictionary FileSizes { get; init; } [JsonInclude] [JsonPropertyName("fixed_bit_set")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs index 53330c33c63..e2087a0e6cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs @@ -33,7 +33,7 @@ public sealed partial class StoredScript [JsonInclude] [JsonPropertyName("options")] - public Dictionary? Options { get; set; } + public IDictionary? Options { get; set; } [JsonInclude] [JsonPropertyName("source")] @@ -49,7 +49,7 @@ public StoredScriptDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptLanguage LanguageValue { get; set; } - private Dictionary? OptionsValue { get; set; } + private IDictionary? OptionsValue { get; set; } private string SourceValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScriptId.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScriptId.g.cs index 7a80d5d1605..bb75291d2f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScriptId.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScriptId.g.cs @@ -33,7 +33,7 @@ public sealed partial class StoredScriptId [JsonInclude] [JsonPropertyName("params")] - public Dictionary? Params { get; set; } + public IDictionary? Params { get; set; } } public sealed partial class StoredScriptIdDescriptor : SerializableDescriptor @@ -45,7 +45,7 @@ public StoredScriptIdDescriptor() : base() private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } - private Dictionary? ParamsValue { get; set; } + private IDictionary? ParamsValue { get; set; } public StoredScriptIdDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/NodeTasks.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/NodeTasks.g.cs index 2881ce02eaf..e962db55a7f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/NodeTasks.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/NodeTasks.g.cs @@ -29,7 +29,7 @@ public sealed partial class NodeTasks { [JsonInclude] [JsonPropertyName("attributes")] - public Dictionary? Attributes { get; init; } + public IReadOnlyDictionary? Attributes { get; init; } [JsonInclude] [JsonPropertyName("host")] @@ -49,7 +49,7 @@ public sealed partial class NodeTasks [JsonInclude] [JsonPropertyName("tasks")] - public Dictionary Tasks { get; init; } + public IReadOnlyDictionary Tasks { get; init; } [JsonInclude] [JsonPropertyName("transport_address")] 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 a7139c70599..72f26715cd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs @@ -49,7 +49,7 @@ public sealed partial class ParentTaskInfo [JsonInclude] [JsonPropertyName("headers")] - public Dictionary Headers { get; init; } + public IReadOnlyDictionary Headers { get; init; } [JsonInclude] [JsonPropertyName("id")] 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 2c1601cf3f8..847ba8907ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs @@ -45,7 +45,7 @@ public sealed partial class TaskInfo [JsonInclude] [JsonPropertyName("headers")] - public Dictionary Headers { get; init; } + public IReadOnlyDictionary Headers { get; init; } [JsonInclude] [JsonPropertyName("id")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs index 87ea88204f2..1d417ebd423 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs @@ -26,13 +26,13 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Tasks; -public sealed partial class TaskInfos : Union, Dictionary> +public sealed partial class TaskInfos : Union, IReadOnlyDictionary> { public TaskInfos(IReadOnlyCollection flat) : base(flat) { } - public TaskInfos(Dictionary grouped) : base(grouped) + public TaskInfos(IReadOnlyDictionary grouped) : base(grouped) { } } \ No newline at end of file diff --git a/tests/Tests/Cluster/ClusterHealth/ClusterHealthResponseDeserialisationTests.cs b/tests/Tests/Cluster/ClusterHealth/ClusterHealthResponseDeserialisationTests.cs index eee4d701187..63dfde777a3 100644 --- a/tests/Tests/Cluster/ClusterHealth/ClusterHealthResponseDeserialisationTests.cs +++ b/tests/Tests/Cluster/ClusterHealth/ClusterHealthResponseDeserialisationTests.cs @@ -83,9 +83,9 @@ protected override void Validate(HealthResponse response) response.NumberOfPendingTasks.Should().Be(6); response.NumberOfInFlightFetch.Should().Be(7); - response.Indices.HasValue.Should().BeTrue(); + response.Indices.Should().NotBeNull(); - var indices = response.Indices.Value; + var indices = response.Indices; indices.Should().HaveCount(2); var issueIndex = indices["issue-test"]; issueIndex.Status.Should().Be(HealthStatus.Green); diff --git a/tests/Tests/Cluster/ClusterHealth/ClusterHealthShardsApiTests.cs b/tests/Tests/Cluster/ClusterHealth/ClusterHealthShardsApiTests.cs index 35388a0d364..e7904478f59 100644 --- a/tests/Tests/Cluster/ClusterHealth/ClusterHealthShardsApiTests.cs +++ b/tests/Tests/Cluster/ClusterHealth/ClusterHealthShardsApiTests.cs @@ -47,9 +47,9 @@ protected override void ExpectResponse(HealthResponse response) response.NumberOfInFlightFetch.Should().BeGreaterOrEqualTo(0); response.TaskMaxWaitingInQueueMillis.Should().BeGreaterOrEqualTo(0); - response.Indices.HasValue.Should().BeTrue(); + response.Indices.Should().NotBeNull(); - var indices = response.Indices.Value; + var indices = response.Indices; indices.Should() .NotBeEmpty() diff --git a/tests/Tests/Document/Single/Update/UpdateDocumentsCoordinatedTests.cs b/tests/Tests/Document/Single/Update/UpdateDocumentsCoordinatedTests.cs index 3d7356452d2..1a0b2075404 100644 --- a/tests/Tests/Document/Single/Update/UpdateDocumentsCoordinatedTests.cs +++ b/tests/Tests/Document/Single/Update/UpdateDocumentsCoordinatedTests.cs @@ -7,6 +7,7 @@ using Tests.Framework.EndpointTests; using Tests.Framework.EndpointTests.TestState; using System.Text.Json.Serialization; +using System.Collections.Generic; namespace Tests.Document.Single.Update; @@ -27,7 +28,7 @@ public class UpdateDocumentsCoordinatedTests : CoordinatedIntegrationTestBase() { { "count", 4 } } }); public UpdateDocumentsCoordinatedTests(WritableCluster cluster, EndpointUsage usage) : base( diff --git a/tests/Tests/IndexManagement/CreateIndexSerializationTests.cs b/tests/Tests/IndexManagement/CreateIndexSerializationTests.cs index f4f33a30c81..407165f017a 100644 --- a/tests/Tests/IndexManagement/CreateIndexSerializationTests.cs +++ b/tests/Tests/IndexManagement/CreateIndexSerializationTests.cs @@ -4,6 +4,7 @@ using Elastic.Clients.Elasticsearch.IndexManagement; using Elastic.Clients.Elasticsearch.QueryDsl; +using System.Collections.Generic; using System.Threading.Tasks; using Tests.Serialization; using VerifyXunit; @@ -30,7 +31,7 @@ public async Task CreateIndexWithAliases_SerializesCorrectly() var createRequest = new CreateIndexRequest("test") { - Aliases = new() + Aliases = new Dictionary() { { "alias_1", alias1 }, { "alias_2", alias2 } diff --git a/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingApiTests.cs b/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingApiTests.cs index dd76afc86b1..d35ac6c0a4e 100644 --- a/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingApiTests.cs +++ b/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingApiTests.cs @@ -19,6 +19,7 @@ public class GetFieldMappingApiTests : ApiIntegrationTestBase(p => p.Name, p => p.LeadDeveloper.IpAddress); private static readonly Field NameField = Infer.Field(p => p.Name); + private static readonly PropertyName NameProperty = Infer.Property(p => p.Name); private static readonly Indices OnIndices = Infer.Index()/*.And()*/; public GetFieldMappingApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : base(cluster, usage) { } @@ -50,37 +51,36 @@ protected override void ExpectResponse(GetFieldMappingResponse response) var projectMappings = response.FieldMappings[Infer.Index()]; projectMappings.Should().NotBeNull("project mapping value in the dictionary should not point to a null value"); - // TODO - Reintroduce this once GetFieldMappingResponse.FieldMappings uses ResolvableReadOnlyDictionaryConverter - //projectMappings.Mappings.Should() - // .NotBeEmpty("project has fields so should contain a type mapping") - // .And.ContainKey(NameField, "project mappings should have 'name'"); + projectMappings.Mappings.Should() + .NotBeEmpty("project has fields so should contain a type mapping") + .And.ContainKey(NameField, "project mappings should have 'name'"); - //var fieldTypeMapping = projectMappings.Mappings[NameField]; - //fieldTypeMapping.Should().NotBeNull("name field mapping should exist"); - //fieldTypeMapping.FullName.Should().NotBeNullOrEmpty(); - //fieldTypeMapping.Mapping.Should() - // .NotBeEmpty("field type mapping should return a `mapping` with the field information") - // .And.HaveCount(1, "field type mappings only return information from a single field") - // .And.ContainKey(NameField); + var fieldTypeMapping = projectMappings.Mappings[NameField]; + fieldTypeMapping.Should().NotBeNull("name field mapping should exist"); + fieldTypeMapping.FullName.Should().NotBeNullOrEmpty(); + fieldTypeMapping.Mapping.Should() + .NotBeEmpty("field type mapping should return a `mapping` with the field information") + .And.HaveCount(1, "field type mappings only return information from a single field") + .And.ContainKey(NameProperty); - //var fieldMapping = fieldTypeMapping.Mapping[NameField]; - //AssertNameFieldMapping(fieldMapping); + var fieldMapping = fieldTypeMapping.Mapping[NameProperty]; + AssertNameFieldMapping(fieldMapping); - //fieldMapping = response.MappingFor(NameField); - //AssertNameFieldMapping(fieldMapping); + fieldMapping = response.PropertyFor(NameField); + AssertNameFieldMapping(fieldMapping); - //fieldMapping = response.MappingFor(p => p.Name); - //AssertNameFieldMapping(fieldMapping); + fieldMapping = response.PropertyFor(p => p.Name); + AssertNameFieldMapping(fieldMapping); } - private static void AssertNameFieldMapping(FieldMapping fieldMapping) + private static void AssertNameFieldMapping(IProperty property) { - fieldMapping.Should().NotBeNull("expected to find name on field type mapping for project"); + property.Should().NotBeNull("expected to find name on field type mapping for project"); - //var nameKeyword = fieldMapping as KeywordProperty; - //nameKeyword.Should().NotBeNull("the field type is a keyword mapping"); - //nameKeyword.Store.Should().BeTrue("name is keyword field that has store enabled"); - //nameKeyword.Fields.Should().NotBeEmpty().And.HaveCount(2); - //nameKeyword.Fields["standard"].Should().NotBeNull(); + var nameKeyword = property as KeywordProperty; + nameKeyword.Should().NotBeNull("the field type is a keyword mapping"); + nameKeyword.Store.Should().BeTrue("name is keyword field that has store enabled"); + nameKeyword.Fields.Should().NotBeEmpty().And.HaveCount(2); + nameKeyword.Fields["standard"].Should().NotBeNull(); } } diff --git a/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingResponseTests.cs b/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingResponseTests.cs new file mode 100644 index 00000000000..524dd8d508f --- /dev/null +++ b/tests/Tests/IndexManagement/MappingManagement/GetFieldMappingResponseTests.cs @@ -0,0 +1,30 @@ +// 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. + +using Elastic.Clients.Elasticsearch.IndexManagement; +using Elastic.Clients.Elasticsearch.Mapping; +using Tests.Serialization; + +namespace Tests.IndexManagement.MappingManagement; + +public class GetFieldMappingResponseTests : SerializerTestBase +{ + private const string JsonResponse = @"{""test1"":{""mappings"":{""id"":{""full_name"":""id"",""mapping"":{""id"":{""type"":""text"",""fields"":{""keyword"":{""type"":""keyword"",""ignore_above"":256}}}}}}}}"; + + [U] + public void DeserializesResponse() + { + var response = DeserializeJsonString(JsonResponse); + + var property = response.GetProperty("test1", Infer.Field(f => f.Id)); + + property.Should().NotBeNull(); + property.Should().BeOfType(); + } + + private class Thing + { + public string Id { get; set; } + } +} diff --git a/tests/Tests/Serialization/ReadOnlyIndexNameDictionaryTests.cs b/tests/Tests/Serialization/ReadOnlyIndexNameDictionaryTests.cs index 126a5a727cc..3a970929a87 100644 --- a/tests/Tests/Serialization/ReadOnlyIndexNameDictionaryTests.cs +++ b/tests/Tests/Serialization/ReadOnlyIndexNameDictionaryTests.cs @@ -8,7 +8,6 @@ using System.Collections.Generic; using Elastic.Clients.Elasticsearch.Cluster; using Elastic.Clients.Elasticsearch.Serialization; -//using Elastic.Clients.Elasticsearch.Cluster.Health; namespace Tests.Serialization; @@ -18,7 +17,7 @@ public class ReadOnlyIndexNameDictionaryTests : SerializerTestBase [U] public void DeserializesCorrectly_AndCanLookupByInferredName() { - var json = @"{""indices"":{""devs"":{""status"":""yellow""},""project"":{""status"":""green""}},""indicesTwo"":{""devs"":{""status"":""yellow""},""project"":{""status"":""green""}}}"; + var json = @"{""indices"":{""devs"":{""status"":""yellow""},""project"":{""status"":""green""}}}"; var stream = WrapInStream(json); @@ -28,41 +27,30 @@ public void DeserializesCorrectly_AndCanLookupByInferredName() .NotBeEmpty() .And.ContainKey(Inferrer.IndexName()); - response.IndicesTwo.HasValue.Should().BeTrue(); -#pragma warning disable CS8629 // Nullable value type may be null. - response.IndicesTwo.Value.Should() -#pragma warning restore CS8629 // Nullable value type may be null. - .NotBeEmpty() + response.Indices.Should().NotBeNull(); + response.Indices.Should().NotBeEmpty() .And.ContainKey(Inferrer.IndexName()); } - private class SimplifiedHealthResponse - { - [JsonInclude] - [JsonPropertyName("indices")] - [ReadOnlyIndexNameDictionaryConverter(typeof(IndexHealthStats))] - public IReadOnlyDictionary? Indices { get; init; } - - [JsonInclude] - [JsonPropertyName("indicesTwo")] - public ReadOnlyIndexNameDictionary? IndicesTwo { get; init; } - } - [U] public void DeserializesCorrectly_AndHandleEmptyDictionaries() { - var json = @"{""indices"":{""devs"":{""status"":""yellow""},""project"":{""status"":""green""}}, ""indicesTwo"":{}}"; + var json = @"{""indices"":{}}"; var stream = WrapInStream(json); var response = _requestResponseSerializer.Deserialize(stream); - response.IndicesTwo.HasValue.Should().BeTrue(); -#pragma warning disable CS8629 // Nullable value type may be null. - response.IndicesTwo.Value.Should() -#pragma warning restore CS8629 // Nullable value type may be null. - .BeEmpty() - .And.NotContainKey(Inferrer.IndexName()); + response.Indices.Should().NotBeNull(); + response.Indices.Should().BeEmpty(); + } + + private class SimplifiedHealthResponse + { + [JsonInclude] + [JsonPropertyName("indices")] + [ReadOnlyIndexNameDictionaryConverter(typeof(IndexHealthStats))] + public IReadOnlyDictionary? Indices { get; init; } } } #nullable disable