diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs index dcfeab4c6eb..2201077a4d4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -167,7 +167,7 @@ public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions opt break; } - case "box_plot": + case "boxplot": { var item = JsonSerializer.Deserialize(ref reader, options); dictionary.Add(nameParts[1], item); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs index 7f295b21c7d..0115b393c6e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs @@ -34,7 +34,7 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); long docCount = default; - long? docCountError = default; + long? docCountErrorUpperBound = default; double key = default; string? keyAsString = default; Dictionary additionalProperties = null; @@ -49,9 +49,9 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon continue; } - if (property == "doc_count_error") + if (property == "doc_count_error_upper_bound") { - docCountError = JsonSerializer.Deserialize(ref reader, options); + docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -78,7 +78,7 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon } } - return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key, KeyAsString = keyAsString }; + return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; } public override void Write(Utf8JsonWriter writer, DoubleTermsBucket value, JsonSerializerOptions options) @@ -95,7 +95,7 @@ public sealed partial class DoubleTermsBucket /// public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } public long DocCount { get; init; } - public long? DocCountError { get; init; } + public long? DocCountErrorUpperBound { get; init; } public double Key { get; init; } public string? KeyAsString { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs index 550820efffb..c6dc09a9a7f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs @@ -34,7 +34,7 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); long docCount = default; - long? docCountError = default; + long? docCountErrorUpperBound = default; long key = default; string? keyAsString = default; Dictionary additionalProperties = null; @@ -49,9 +49,9 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve continue; } - if (property == "doc_count_error") + if (property == "doc_count_error_upper_bound") { - docCountError = JsonSerializer.Deserialize(ref reader, options); + docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -78,7 +78,7 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve } } - return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key, KeyAsString = keyAsString }; + return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; } public override void Write(Utf8JsonWriter writer, LongTermsBucket value, JsonSerializerOptions options) @@ -95,7 +95,7 @@ public sealed partial class LongTermsBucket /// public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } public long DocCount { get; init; } - public long? DocCountError { get; init; } + public long? DocCountErrorUpperBound { get; init; } public long Key { get; init; } public string? KeyAsString { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs index bd400cd56d3..d368fb1bbfd 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs @@ -34,7 +34,7 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); long docCount = default; - long? docCountError = default; + long? docCountErrorUpperBound = default; Elastic.Clients.Elasticsearch.Serverless.FieldValue key = default; Dictionary additionalProperties = null; while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) @@ -48,9 +48,9 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon continue; } - if (property == "doc_count_error") + if (property == "doc_count_error_upper_bound") { - docCountError = JsonSerializer.Deserialize(ref reader, options); + docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -71,7 +71,7 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon } } - return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key }; + return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key }; } public override void Write(Utf8JsonWriter writer, StringTermsBucket value, JsonSerializerOptions options) @@ -88,6 +88,6 @@ public sealed partial class StringTermsBucket /// public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } public long DocCount { get; init; } - public long? DocCountError { get; init; } + public long? DocCountErrorUpperBound { get; init; } public Elastic.Clients.Elasticsearch.Serverless.FieldValue Key { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs index 332e718992e..2848f5d0609 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs @@ -31,16 +31,16 @@ public sealed partial class IcuCollationTokenFilter : ITokenFilter { [JsonInclude, JsonPropertyName("alternate")] public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? Alternate { get; set; } - [JsonInclude, JsonPropertyName("caseFirst")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? Casefirst { get; set; } - [JsonInclude, JsonPropertyName("caseLevel")] - public bool? Caselevel { get; set; } + [JsonInclude, JsonPropertyName("case_first")] + public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; } + [JsonInclude, JsonPropertyName("case_level")] + public bool? CaseLevel { get; set; } [JsonInclude, JsonPropertyName("country")] public string? Country { get; set; } [JsonInclude, JsonPropertyName("decomposition")] public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? Decomposition { get; set; } - [JsonInclude, JsonPropertyName("hiraganaQuaternaryMode")] - public bool? Hiraganaquaternarymode { get; set; } + [JsonInclude, JsonPropertyName("hiragana_quaternary_mode")] + public bool? HiraganaQuaternaryMode { get; set; } [JsonInclude, JsonPropertyName("language")] public string? Language { get; set; } [JsonInclude, JsonPropertyName("numeric")] @@ -53,8 +53,8 @@ public sealed partial class IcuCollationTokenFilter : ITokenFilter [JsonInclude, JsonPropertyName("type")] public string Type => "icu_collation"; - [JsonInclude, JsonPropertyName("variableTop")] - public string? Variabletop { get; set; } + [JsonInclude, JsonPropertyName("variable_top")] + public string? VariableTop { get; set; } [JsonInclude, JsonPropertyName("variant")] public string? Variant { get; set; } [JsonInclude, JsonPropertyName("version")] @@ -70,16 +70,16 @@ public IcuCollationTokenFilterDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CasefirstValue { get; set; } - private bool? CaselevelValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } + private bool? CaseLevelValue { get; set; } private string? CountryValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } - private bool? HiraganaquaternarymodeValue { get; set; } + private bool? HiraganaQuaternaryModeValue { get; set; } private string? LanguageValue { get; set; } private bool? NumericValue { get; set; } private string? RulesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } - private string? VariabletopValue { get; set; } + private string? VariableTopValue { get; set; } private string? VariantValue { get; set; } private string? VersionValue { get; set; } @@ -89,15 +89,15 @@ public IcuCollationTokenFilterDescriptor Alternate(Elastic.Clients.Elasticsearch return Self; } - public IcuCollationTokenFilterDescriptor Casefirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? casefirst) + public IcuCollationTokenFilterDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst) { - CasefirstValue = casefirst; + CaseFirstValue = caseFirst; return Self; } - public IcuCollationTokenFilterDescriptor Caselevel(bool? caselevel = true) + public IcuCollationTokenFilterDescriptor CaseLevel(bool? caseLevel = true) { - CaselevelValue = caselevel; + CaseLevelValue = caseLevel; return Self; } @@ -113,9 +113,9 @@ public IcuCollationTokenFilterDescriptor Decomposition(Elastic.Clients.Elasticse return Self; } - public IcuCollationTokenFilterDescriptor Hiraganaquaternarymode(bool? hiraganaquaternarymode = true) + public IcuCollationTokenFilterDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) { - HiraganaquaternarymodeValue = hiraganaquaternarymode; + HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; return Self; } @@ -143,9 +143,9 @@ public IcuCollationTokenFilterDescriptor Strength(Elastic.Clients.Elasticsearch. return Self; } - public IcuCollationTokenFilterDescriptor Variabletop(string? variabletop) + public IcuCollationTokenFilterDescriptor VariableTop(string? variableTop) { - VariabletopValue = variabletop; + VariableTopValue = variableTop; return Self; } @@ -170,16 +170,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, AlternateValue, options); } - if (CasefirstValue is not null) + if (CaseFirstValue is not null) { - writer.WritePropertyName("caseFirst"); - JsonSerializer.Serialize(writer, CasefirstValue, options); + writer.WritePropertyName("case_first"); + JsonSerializer.Serialize(writer, CaseFirstValue, options); } - if (CaselevelValue.HasValue) + if (CaseLevelValue.HasValue) { - writer.WritePropertyName("caseLevel"); - writer.WriteBooleanValue(CaselevelValue.Value); + writer.WritePropertyName("case_level"); + writer.WriteBooleanValue(CaseLevelValue.Value); } if (!string.IsNullOrEmpty(CountryValue)) @@ -194,10 +194,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DecompositionValue, options); } - if (HiraganaquaternarymodeValue.HasValue) + if (HiraganaQuaternaryModeValue.HasValue) { - writer.WritePropertyName("hiraganaQuaternaryMode"); - writer.WriteBooleanValue(HiraganaquaternarymodeValue.Value); + writer.WritePropertyName("hiragana_quaternary_mode"); + writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); } if (!string.IsNullOrEmpty(LanguageValue)) @@ -226,10 +226,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("type"); writer.WriteStringValue("icu_collation"); - if (!string.IsNullOrEmpty(VariabletopValue)) + if (!string.IsNullOrEmpty(VariableTopValue)) { - writer.WritePropertyName("variableTop"); - writer.WriteStringValue(VariabletopValue); + writer.WritePropertyName("variable_top"); + writer.WriteStringValue(VariableTopValue); } if (!string.IsNullOrEmpty(VariantValue)) @@ -250,16 +250,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IcuCollationTokenFilter IBuildableDescriptor.Build() => new() { Alternate = AlternateValue, - Casefirst = CasefirstValue, - Caselevel = CaselevelValue, + CaseFirst = CaseFirstValue, + CaseLevel = CaseLevelValue, Country = CountryValue, Decomposition = DecompositionValue, - Hiraganaquaternarymode = HiraganaquaternarymodeValue, + HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, Language = LanguageValue, Numeric = NumericValue, Rules = RulesValue, Strength = StrengthValue, - Variabletop = VariabletopValue, + VariableTop = VariableTopValue, Variant = VariantValue, Version = VersionValue }; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs index d59f293fd89..88256e2b8c0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs @@ -58,7 +58,7 @@ public sealed partial class MultiTermVectorsOperation /// The ID of the document. /// [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } /// /// The index of the document. @@ -123,7 +123,7 @@ public MultiTermVectorsOperationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } @@ -190,7 +190,7 @@ public MultiTermVectorsOperationDescriptor Filter(Action /// The ID of the document. /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) { IdValue = id; return Self; @@ -305,8 +305,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + if (IndexValue is not null) { writer.WritePropertyName("_index"); @@ -373,7 +377,7 @@ public MultiTermVectorsOperationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } @@ -440,7 +444,7 @@ public MultiTermVectorsOperationDescriptor Filter(Action /// The ID of the document. /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) { IdValue = id; return Self; @@ -555,8 +559,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + if (IndexValue is not null) { writer.WritePropertyName("_index"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs index 6692c62bc58..c9d3b3ce541 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs @@ -36,7 +36,7 @@ public sealed partial class Hit [JsonInclude, JsonPropertyName("highlight")] public IReadOnlyDictionary>? Highlight { get; init; } [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } + public string? Id { get; init; } [JsonInclude, JsonPropertyName("_ignored")] public IReadOnlyCollection? Ignored { get; init; } [JsonInclude, JsonPropertyName("ignored_field_values")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs index c4a563fdde8..8bea568c6ad 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs @@ -135,6 +135,8 @@ public enum FieldType IntegerRange, [EnumMember(Value = "integer")] Integer, + [EnumMember(Value = "icu_collation_keyword")] + IcuCollationKeyword, [EnumMember(Value = "histogram")] Histogram, [EnumMember(Value = "half_float")] @@ -232,6 +234,8 @@ public override FieldType Read(ref Utf8JsonReader reader, Type typeToConvert, Js return FieldType.IntegerRange; case "integer": return FieldType.Integer; + case "icu_collation_keyword": + return FieldType.IcuCollationKeyword; case "histogram": return FieldType.Histogram; case "half_float": @@ -354,6 +358,9 @@ public override void Write(Utf8JsonWriter writer, FieldType value, JsonSerialize case FieldType.Integer: writer.WriteStringValue("integer"); return; + case FieldType.IcuCollationKeyword: + writer.WriteStringValue("icu_collation_keyword"); + return; case FieldType.Histogram: writer.WriteStringValue("histogram"); return; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs new file mode 100644 index 00000000000..0daa9737013 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs @@ -0,0 +1,917 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; + +public sealed partial class IcuCollationProperty : IProperty +{ + [JsonInclude, JsonPropertyName("alternate")] + public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? Alternate { get; set; } + [JsonInclude, JsonPropertyName("case_first")] + public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; } + [JsonInclude, JsonPropertyName("case_level")] + public bool? CaseLevel { get; set; } + [JsonInclude, JsonPropertyName("copy_to")] + [JsonConverter(typeof(SingleOrManyFieldsConverter))] + public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } + [JsonInclude, JsonPropertyName("country")] + public string? Country { get; set; } + [JsonInclude, JsonPropertyName("decomposition")] + public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? Decomposition { get; set; } + [JsonInclude, JsonPropertyName("doc_values")] + public bool? DocValues { get; set; } + [JsonInclude, JsonPropertyName("dynamic")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } + [JsonInclude, JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } + [JsonInclude, JsonPropertyName("hiragana_quaternary_mode")] + public bool? HiraganaQuaternaryMode { get; set; } + [JsonInclude, JsonPropertyName("ignore_above")] + public int? IgnoreAbove { get; set; } + + /// + /// Should the field be searchable? + /// + [JsonInclude, JsonPropertyName("index")] + public bool? Index { get; set; } + [JsonInclude, JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } + [JsonInclude, JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// Metadata about the field. + /// + [JsonInclude, JsonPropertyName("meta")] + public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("norms")] + public bool? Norms { get; set; } + + /// + /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. + /// + [JsonInclude, JsonPropertyName("null_value")] + public string? NullValue { get; set; } + [JsonInclude, JsonPropertyName("numeric")] + public bool? Numeric { get; set; } + [JsonInclude, JsonPropertyName("properties")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("rules")] + public string? Rules { get; set; } + [JsonInclude, JsonPropertyName("similarity")] + public string? Similarity { get; set; } + [JsonInclude, JsonPropertyName("store")] + public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("strength")] + public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? Strength { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "icu_collation_keyword"; + + [JsonInclude, JsonPropertyName("variable_top")] + public string? VariableTop { get; set; } + [JsonInclude, JsonPropertyName("variant")] + public string? Variant { get; set; } +} + +public sealed partial class IcuCollationPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor +{ + internal IcuCollationPropertyDescriptor(Action> configure) => configure.Invoke(this); + + public IcuCollationPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } + private bool? CaseLevelValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } + private string? CountryValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } + private bool? DocValuesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } + private bool? HiraganaQuaternaryModeValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private bool? IndexValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } + private string? LanguageValue { get; set; } + private IDictionary? MetaValue { get; set; } + private bool? NormsValue { get; set; } + private string? NullValueValue { get; set; } + private bool? NumericValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } + private string? RulesValue { get; set; } + private string? SimilarityValue { get; set; } + private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } + private string? VariableTopValue { get; set; } + private string? VariantValue { get; set; } + + public IcuCollationPropertyDescriptor Alternate(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? alternate) + { + AlternateValue = alternate; + return Self; + } + + public IcuCollationPropertyDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst) + { + CaseFirstValue = caseFirst; + return Self; + } + + public IcuCollationPropertyDescriptor CaseLevel(bool? caseLevel = true) + { + CaseLevelValue = caseLevel; + return Self; + } + + public IcuCollationPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) + { + CopyToValue = copyTo; + return Self; + } + + public IcuCollationPropertyDescriptor Country(string? country) + { + CountryValue = country; + return Self; + } + + public IcuCollationPropertyDescriptor Decomposition(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? decomposition) + { + DecompositionValue = decomposition; + return Self; + } + + public IcuCollationPropertyDescriptor DocValues(bool? docValues = true) + { + DocValuesValue = docValues; + return Self; + } + + public IcuCollationPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) + { + HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; + return Self; + } + + public IcuCollationPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + /// + /// Should the field be searchable? + /// + public IcuCollationPropertyDescriptor Index(bool? index = true) + { + IndexValue = index; + return Self; + } + + public IcuCollationPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) + { + IndexOptionsValue = indexOptions; + return Self; + } + + public IcuCollationPropertyDescriptor Language(string? language) + { + LanguageValue = language; + return Self; + } + + /// + /// Metadata about the field. + /// + public IcuCollationPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IcuCollationPropertyDescriptor Norms(bool? norms = true) + { + NormsValue = norms; + return Self; + } + + /// + /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. + /// + public IcuCollationPropertyDescriptor NullValue(string? nullValue) + { + NullValueValue = nullValue; + return Self; + } + + public IcuCollationPropertyDescriptor Numeric(bool? numeric = true) + { + NumericValue = numeric; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Rules(string? rules) + { + RulesValue = rules; + return Self; + } + + public IcuCollationPropertyDescriptor Similarity(string? similarity) + { + SimilarityValue = similarity; + return Self; + } + + public IcuCollationPropertyDescriptor Store(bool? store = true) + { + StoreValue = store; + return Self; + } + + public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? strength) + { + StrengthValue = strength; + return Self; + } + + public IcuCollationPropertyDescriptor VariableTop(string? variableTop) + { + VariableTopValue = variableTop; + return Self; + } + + public IcuCollationPropertyDescriptor Variant(string? variant) + { + VariantValue = variant; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AlternateValue is not null) + { + writer.WritePropertyName("alternate"); + JsonSerializer.Serialize(writer, AlternateValue, options); + } + + if (CaseFirstValue is not null) + { + writer.WritePropertyName("case_first"); + JsonSerializer.Serialize(writer, CaseFirstValue, options); + } + + if (CaseLevelValue.HasValue) + { + writer.WritePropertyName("case_level"); + writer.WriteBooleanValue(CaseLevelValue.Value); + } + + if (CopyToValue is not null) + { + writer.WritePropertyName("copy_to"); + JsonSerializer.Serialize(writer, CopyToValue, options); + } + + if (!string.IsNullOrEmpty(CountryValue)) + { + writer.WritePropertyName("country"); + writer.WriteStringValue(CountryValue); + } + + if (DecompositionValue is not null) + { + writer.WritePropertyName("decomposition"); + JsonSerializer.Serialize(writer, DecompositionValue, options); + } + + if (DocValuesValue.HasValue) + { + writer.WritePropertyName("doc_values"); + writer.WriteBooleanValue(DocValuesValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (HiraganaQuaternaryModeValue.HasValue) + { + writer.WritePropertyName("hiragana_quaternary_mode"); + writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (IndexValue.HasValue) + { + writer.WritePropertyName("index"); + writer.WriteBooleanValue(IndexValue.Value); + } + + if (IndexOptionsValue is not null) + { + writer.WritePropertyName("index_options"); + JsonSerializer.Serialize(writer, IndexOptionsValue, options); + } + + if (!string.IsNullOrEmpty(LanguageValue)) + { + writer.WritePropertyName("language"); + writer.WriteStringValue(LanguageValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (NormsValue.HasValue) + { + writer.WritePropertyName("norms"); + writer.WriteBooleanValue(NormsValue.Value); + } + + if (!string.IsNullOrEmpty(NullValueValue)) + { + writer.WritePropertyName("null_value"); + writer.WriteStringValue(NullValueValue); + } + + if (NumericValue.HasValue) + { + writer.WritePropertyName("numeric"); + writer.WriteBooleanValue(NumericValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + if (!string.IsNullOrEmpty(RulesValue)) + { + writer.WritePropertyName("rules"); + writer.WriteStringValue(RulesValue); + } + + if (!string.IsNullOrEmpty(SimilarityValue)) + { + writer.WritePropertyName("similarity"); + writer.WriteStringValue(SimilarityValue); + } + + if (StoreValue.HasValue) + { + writer.WritePropertyName("store"); + writer.WriteBooleanValue(StoreValue.Value); + } + + if (StrengthValue is not null) + { + writer.WritePropertyName("strength"); + JsonSerializer.Serialize(writer, StrengthValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("icu_collation_keyword"); + if (!string.IsNullOrEmpty(VariableTopValue)) + { + writer.WritePropertyName("variable_top"); + writer.WriteStringValue(VariableTopValue); + } + + if (!string.IsNullOrEmpty(VariantValue)) + { + writer.WritePropertyName("variant"); + writer.WriteStringValue(VariantValue); + } + + writer.WriteEndObject(); + } + + IcuCollationProperty IBuildableDescriptor.Build() => new() + { + Alternate = AlternateValue, + CaseFirst = CaseFirstValue, + CaseLevel = CaseLevelValue, + CopyTo = CopyToValue, + Country = CountryValue, + Decomposition = DecompositionValue, + DocValues = DocValuesValue, + Dynamic = DynamicValue, + Fields = FieldsValue, + HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, + IgnoreAbove = IgnoreAboveValue, + Index = IndexValue, + IndexOptions = IndexOptionsValue, + Language = LanguageValue, + Meta = MetaValue, + Norms = NormsValue, + NullValue = NullValueValue, + Numeric = NumericValue, + Properties = PropertiesValue, + Rules = RulesValue, + Similarity = SimilarityValue, + Store = StoreValue, + Strength = StrengthValue, + VariableTop = VariableTopValue, + Variant = VariantValue + }; +} + +public sealed partial class IcuCollationPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal IcuCollationPropertyDescriptor(Action configure) => configure.Invoke(this); + + public IcuCollationPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } + private bool? CaseLevelValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } + private string? CountryValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } + private bool? DocValuesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } + private bool? HiraganaQuaternaryModeValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private bool? IndexValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } + private string? LanguageValue { get; set; } + private IDictionary? MetaValue { get; set; } + private bool? NormsValue { get; set; } + private string? NullValueValue { get; set; } + private bool? NumericValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } + private string? RulesValue { get; set; } + private string? SimilarityValue { get; set; } + private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } + private string? VariableTopValue { get; set; } + private string? VariantValue { get; set; } + + public IcuCollationPropertyDescriptor Alternate(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? alternate) + { + AlternateValue = alternate; + return Self; + } + + public IcuCollationPropertyDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst) + { + CaseFirstValue = caseFirst; + return Self; + } + + public IcuCollationPropertyDescriptor CaseLevel(bool? caseLevel = true) + { + CaseLevelValue = caseLevel; + return Self; + } + + public IcuCollationPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) + { + CopyToValue = copyTo; + return Self; + } + + public IcuCollationPropertyDescriptor Country(string? country) + { + CountryValue = country; + return Self; + } + + public IcuCollationPropertyDescriptor Decomposition(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? decomposition) + { + DecompositionValue = decomposition; + return Self; + } + + public IcuCollationPropertyDescriptor DocValues(bool? docValues = true) + { + DocValuesValue = docValues; + return Self; + } + + public IcuCollationPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) + { + HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; + return Self; + } + + public IcuCollationPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + /// + /// Should the field be searchable? + /// + public IcuCollationPropertyDescriptor Index(bool? index = true) + { + IndexValue = index; + return Self; + } + + public IcuCollationPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) + { + IndexOptionsValue = indexOptions; + return Self; + } + + public IcuCollationPropertyDescriptor Language(string? language) + { + LanguageValue = language; + return Self; + } + + /// + /// Metadata about the field. + /// + public IcuCollationPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IcuCollationPropertyDescriptor Norms(bool? norms = true) + { + NormsValue = norms; + return Self; + } + + /// + /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. + /// + public IcuCollationPropertyDescriptor NullValue(string? nullValue) + { + NullValueValue = nullValue; + return Self; + } + + public IcuCollationPropertyDescriptor Numeric(bool? numeric = true) + { + NumericValue = numeric; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Rules(string? rules) + { + RulesValue = rules; + return Self; + } + + public IcuCollationPropertyDescriptor Similarity(string? similarity) + { + SimilarityValue = similarity; + return Self; + } + + public IcuCollationPropertyDescriptor Store(bool? store = true) + { + StoreValue = store; + return Self; + } + + public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? strength) + { + StrengthValue = strength; + return Self; + } + + public IcuCollationPropertyDescriptor VariableTop(string? variableTop) + { + VariableTopValue = variableTop; + return Self; + } + + public IcuCollationPropertyDescriptor Variant(string? variant) + { + VariantValue = variant; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AlternateValue is not null) + { + writer.WritePropertyName("alternate"); + JsonSerializer.Serialize(writer, AlternateValue, options); + } + + if (CaseFirstValue is not null) + { + writer.WritePropertyName("case_first"); + JsonSerializer.Serialize(writer, CaseFirstValue, options); + } + + if (CaseLevelValue.HasValue) + { + writer.WritePropertyName("case_level"); + writer.WriteBooleanValue(CaseLevelValue.Value); + } + + if (CopyToValue is not null) + { + writer.WritePropertyName("copy_to"); + JsonSerializer.Serialize(writer, CopyToValue, options); + } + + if (!string.IsNullOrEmpty(CountryValue)) + { + writer.WritePropertyName("country"); + writer.WriteStringValue(CountryValue); + } + + if (DecompositionValue is not null) + { + writer.WritePropertyName("decomposition"); + JsonSerializer.Serialize(writer, DecompositionValue, options); + } + + if (DocValuesValue.HasValue) + { + writer.WritePropertyName("doc_values"); + writer.WriteBooleanValue(DocValuesValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (HiraganaQuaternaryModeValue.HasValue) + { + writer.WritePropertyName("hiragana_quaternary_mode"); + writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (IndexValue.HasValue) + { + writer.WritePropertyName("index"); + writer.WriteBooleanValue(IndexValue.Value); + } + + if (IndexOptionsValue is not null) + { + writer.WritePropertyName("index_options"); + JsonSerializer.Serialize(writer, IndexOptionsValue, options); + } + + if (!string.IsNullOrEmpty(LanguageValue)) + { + writer.WritePropertyName("language"); + writer.WriteStringValue(LanguageValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (NormsValue.HasValue) + { + writer.WritePropertyName("norms"); + writer.WriteBooleanValue(NormsValue.Value); + } + + if (!string.IsNullOrEmpty(NullValueValue)) + { + writer.WritePropertyName("null_value"); + writer.WriteStringValue(NullValueValue); + } + + if (NumericValue.HasValue) + { + writer.WritePropertyName("numeric"); + writer.WriteBooleanValue(NumericValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + if (!string.IsNullOrEmpty(RulesValue)) + { + writer.WritePropertyName("rules"); + writer.WriteStringValue(RulesValue); + } + + if (!string.IsNullOrEmpty(SimilarityValue)) + { + writer.WritePropertyName("similarity"); + writer.WriteStringValue(SimilarityValue); + } + + if (StoreValue.HasValue) + { + writer.WritePropertyName("store"); + writer.WriteBooleanValue(StoreValue.Value); + } + + if (StrengthValue is not null) + { + writer.WritePropertyName("strength"); + JsonSerializer.Serialize(writer, StrengthValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("icu_collation_keyword"); + if (!string.IsNullOrEmpty(VariableTopValue)) + { + writer.WritePropertyName("variable_top"); + writer.WriteStringValue(VariableTopValue); + } + + if (!string.IsNullOrEmpty(VariantValue)) + { + writer.WritePropertyName("variant"); + writer.WriteStringValue(VariantValue); + } + + writer.WriteEndObject(); + } + + IcuCollationProperty IBuildableDescriptor.Build() => new() + { + Alternate = AlternateValue, + CaseFirst = CaseFirstValue, + CaseLevel = CaseLevelValue, + CopyTo = CopyToValue, + Country = CountryValue, + Decomposition = DecompositionValue, + DocValues = DocValuesValue, + Dynamic = DynamicValue, + Fields = FieldsValue, + HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, + IgnoreAbove = IgnoreAboveValue, + Index = IndexValue, + IndexOptions = IndexOptionsValue, + Language = LanguageValue, + Meta = MetaValue, + Norms = NormsValue, + NullValue = NullValueValue, + Numeric = NumericValue, + Properties = PropertiesValue, + Rules = RulesValue, + Similarity = SimilarityValue, + Store = StoreValue, + Strength = StrengthValue, + VariableTop = VariableTopValue, + Variant = VariantValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs index 6f2b9a7831a..5583a5efd49 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs @@ -171,6 +171,11 @@ public PropertiesDescriptor() : base(new Properties()) public PropertiesDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, HistogramProperty histogramProperty) => AssignVariant(propertyName, histogramProperty); public PropertiesDescriptor Histogram(Expression> propertyName) => AssignVariant, HistogramProperty>(propertyName, null); public PropertiesDescriptor Histogram(Expression> propertyName, Action> configure) => AssignVariant, HistogramProperty>(propertyName, configure); + public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IcuCollationProperty>(propertyName, null); + public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IcuCollationProperty>(propertyName, configure); + public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IcuCollationProperty icuCollationProperty) => AssignVariant(propertyName, icuCollationProperty); + public PropertiesDescriptor IcuCollation(Expression> propertyName) => AssignVariant, IcuCollationProperty>(propertyName, null); + public PropertiesDescriptor IcuCollation(Expression> propertyName, Action> configure) => AssignVariant, IcuCollationProperty>(propertyName, configure); public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IntegerNumberProperty>(propertyName, null); public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IntegerNumberProperty>(propertyName, configure); public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IntegerNumberProperty integerNumberProperty) => AssignVariant(propertyName, integerNumberProperty); @@ -359,6 +364,8 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "histogram": return JsonSerializer.Deserialize(ref reader, options); + case "icu_collation_keyword": + return JsonSerializer.Deserialize(ref reader, options); case "integer": return JsonSerializer.Deserialize(ref reader, options); case "integer_range": @@ -489,6 +496,9 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "histogram": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.HistogramProperty), options); return; + case "icu_collation_keyword": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IcuCollationProperty), options); + return; case "integer": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IntegerNumberProperty), options); return; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs index 390077062f2..8ab615c1633 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs @@ -32,5 +32,5 @@ public sealed partial class NodeInfoScript [JsonInclude, JsonPropertyName("allowed_types")] public string AllowedTypes { get; init; } [JsonInclude, JsonPropertyName("disable_max_compilations_rate")] - public string DisableMaxCompilationsRate { get; init; } + public string? DisableMaxCompilationsRate { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs index 467b8e324d4..2fb036e3376 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs @@ -34,7 +34,7 @@ public sealed partial class NodeInfoSettings [JsonInclude, JsonPropertyName("bootstrap")] public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoBootstrap? Bootstrap { get; init; } [JsonInclude, JsonPropertyName("client")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoClient Client { get; init; } + public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoClient? Client { get; init; } [JsonInclude, JsonPropertyName("cluster")] public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsCluster Cluster { get; init; } [JsonInclude, JsonPropertyName("discovery")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs index 1d4f20e67be..842fbf686d3 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs @@ -30,5 +30,5 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; public sealed partial class NodeInfoSettingsNetwork { [JsonInclude, JsonPropertyName("host")] - public string Host { get; init; } + public string? Host { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs index 9995d8c3f7a..890af04b65c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -167,7 +167,7 @@ public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions opt break; } - case "box_plot": + case "boxplot": { var item = JsonSerializer.Deserialize(ref reader, options); dictionary.Add(nameParts[1], item); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs index c749cbcd2ee..4f0693806b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs @@ -34,7 +34,7 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); long docCount = default; - long? docCountError = default; + long? docCountErrorUpperBound = default; double key = default; string? keyAsString = default; Dictionary additionalProperties = null; @@ -49,9 +49,9 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon continue; } - if (property == "doc_count_error") + if (property == "doc_count_error_upper_bound") { - docCountError = JsonSerializer.Deserialize(ref reader, options); + docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -78,7 +78,7 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon } } - return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key, KeyAsString = keyAsString }; + return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; } public override void Write(Utf8JsonWriter writer, DoubleTermsBucket value, JsonSerializerOptions options) @@ -95,7 +95,7 @@ public sealed partial class DoubleTermsBucket /// public Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary Aggregations { get; init; } public long DocCount { get; init; } - public long? DocCountError { get; init; } + public long? DocCountErrorUpperBound { get; init; } public double Key { get; init; } public string? KeyAsString { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs index 824f5220a85..67a084ff82f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs @@ -34,7 +34,7 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); long docCount = default; - long? docCountError = default; + long? docCountErrorUpperBound = default; long key = default; string? keyAsString = default; Dictionary additionalProperties = null; @@ -49,9 +49,9 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve continue; } - if (property == "doc_count_error") + if (property == "doc_count_error_upper_bound") { - docCountError = JsonSerializer.Deserialize(ref reader, options); + docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -78,7 +78,7 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve } } - return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key, KeyAsString = keyAsString }; + return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; } public override void Write(Utf8JsonWriter writer, LongTermsBucket value, JsonSerializerOptions options) @@ -95,7 +95,7 @@ public sealed partial class LongTermsBucket /// public Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary Aggregations { get; init; } public long DocCount { get; init; } - public long? DocCountError { get; init; } + public long? DocCountErrorUpperBound { get; init; } public long Key { get; init; } public string? KeyAsString { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs index fe533f4e2d6..662c555cbb5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs @@ -34,7 +34,7 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); long docCount = default; - long? docCountError = default; + long? docCountErrorUpperBound = default; Elastic.Clients.Elasticsearch.FieldValue key = default; Dictionary additionalProperties = null; while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) @@ -48,9 +48,9 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon continue; } - if (property == "doc_count_error") + if (property == "doc_count_error_upper_bound") { - docCountError = JsonSerializer.Deserialize(ref reader, options); + docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -71,7 +71,7 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon } } - return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key }; + return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key }; } public override void Write(Utf8JsonWriter writer, StringTermsBucket value, JsonSerializerOptions options) @@ -88,6 +88,6 @@ public sealed partial class StringTermsBucket /// public Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary Aggregations { get; init; } public long DocCount { get; init; } - public long? DocCountError { get; init; } + public long? DocCountErrorUpperBound { get; init; } public Elastic.Clients.Elasticsearch.FieldValue Key { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs index e3ba9bc172b..c6e23129368 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs @@ -31,16 +31,16 @@ public sealed partial class IcuCollationTokenFilter : ITokenFilter { [JsonInclude, JsonPropertyName("alternate")] public Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? Alternate { get; set; } - [JsonInclude, JsonPropertyName("caseFirst")] - public Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? Casefirst { get; set; } - [JsonInclude, JsonPropertyName("caseLevel")] - public bool? Caselevel { get; set; } + [JsonInclude, JsonPropertyName("case_first")] + public Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; } + [JsonInclude, JsonPropertyName("case_level")] + public bool? CaseLevel { get; set; } [JsonInclude, JsonPropertyName("country")] public string? Country { get; set; } [JsonInclude, JsonPropertyName("decomposition")] public Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? Decomposition { get; set; } - [JsonInclude, JsonPropertyName("hiraganaQuaternaryMode")] - public bool? Hiraganaquaternarymode { get; set; } + [JsonInclude, JsonPropertyName("hiragana_quaternary_mode")] + public bool? HiraganaQuaternaryMode { get; set; } [JsonInclude, JsonPropertyName("language")] public string? Language { get; set; } [JsonInclude, JsonPropertyName("numeric")] @@ -53,8 +53,8 @@ public sealed partial class IcuCollationTokenFilter : ITokenFilter [JsonInclude, JsonPropertyName("type")] public string Type => "icu_collation"; - [JsonInclude, JsonPropertyName("variableTop")] - public string? Variabletop { get; set; } + [JsonInclude, JsonPropertyName("variable_top")] + public string? VariableTop { get; set; } [JsonInclude, JsonPropertyName("variant")] public string? Variant { get; set; } [JsonInclude, JsonPropertyName("version")] @@ -70,16 +70,16 @@ public IcuCollationTokenFilterDescriptor() : base() } private Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? AlternateValue { get; set; } - private Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? CasefirstValue { get; set; } - private bool? CaselevelValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } + private bool? CaseLevelValue { get; set; } private string? CountryValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } - private bool? HiraganaquaternarymodeValue { get; set; } + private bool? HiraganaQuaternaryModeValue { get; set; } private string? LanguageValue { get; set; } private bool? NumericValue { get; set; } private string? RulesValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? StrengthValue { get; set; } - private string? VariabletopValue { get; set; } + private string? VariableTopValue { get; set; } private string? VariantValue { get; set; } private string? VersionValue { get; set; } @@ -89,15 +89,15 @@ public IcuCollationTokenFilterDescriptor Alternate(Elastic.Clients.Elasticsearch return Self; } - public IcuCollationTokenFilterDescriptor Casefirst(Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? casefirst) + public IcuCollationTokenFilterDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? caseFirst) { - CasefirstValue = casefirst; + CaseFirstValue = caseFirst; return Self; } - public IcuCollationTokenFilterDescriptor Caselevel(bool? caselevel = true) + public IcuCollationTokenFilterDescriptor CaseLevel(bool? caseLevel = true) { - CaselevelValue = caselevel; + CaseLevelValue = caseLevel; return Self; } @@ -113,9 +113,9 @@ public IcuCollationTokenFilterDescriptor Decomposition(Elastic.Clients.Elasticse return Self; } - public IcuCollationTokenFilterDescriptor Hiraganaquaternarymode(bool? hiraganaquaternarymode = true) + public IcuCollationTokenFilterDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) { - HiraganaquaternarymodeValue = hiraganaquaternarymode; + HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; return Self; } @@ -143,9 +143,9 @@ public IcuCollationTokenFilterDescriptor Strength(Elastic.Clients.Elasticsearch. return Self; } - public IcuCollationTokenFilterDescriptor Variabletop(string? variabletop) + public IcuCollationTokenFilterDescriptor VariableTop(string? variableTop) { - VariabletopValue = variabletop; + VariableTopValue = variableTop; return Self; } @@ -170,16 +170,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, AlternateValue, options); } - if (CasefirstValue is not null) + if (CaseFirstValue is not null) { - writer.WritePropertyName("caseFirst"); - JsonSerializer.Serialize(writer, CasefirstValue, options); + writer.WritePropertyName("case_first"); + JsonSerializer.Serialize(writer, CaseFirstValue, options); } - if (CaselevelValue.HasValue) + if (CaseLevelValue.HasValue) { - writer.WritePropertyName("caseLevel"); - writer.WriteBooleanValue(CaselevelValue.Value); + writer.WritePropertyName("case_level"); + writer.WriteBooleanValue(CaseLevelValue.Value); } if (!string.IsNullOrEmpty(CountryValue)) @@ -194,10 +194,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DecompositionValue, options); } - if (HiraganaquaternarymodeValue.HasValue) + if (HiraganaQuaternaryModeValue.HasValue) { - writer.WritePropertyName("hiraganaQuaternaryMode"); - writer.WriteBooleanValue(HiraganaquaternarymodeValue.Value); + writer.WritePropertyName("hiragana_quaternary_mode"); + writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); } if (!string.IsNullOrEmpty(LanguageValue)) @@ -226,10 +226,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("type"); writer.WriteStringValue("icu_collation"); - if (!string.IsNullOrEmpty(VariabletopValue)) + if (!string.IsNullOrEmpty(VariableTopValue)) { - writer.WritePropertyName("variableTop"); - writer.WriteStringValue(VariabletopValue); + writer.WritePropertyName("variable_top"); + writer.WriteStringValue(VariableTopValue); } if (!string.IsNullOrEmpty(VariantValue)) @@ -250,16 +250,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IcuCollationTokenFilter IBuildableDescriptor.Build() => new() { Alternate = AlternateValue, - Casefirst = CasefirstValue, - Caselevel = CaselevelValue, + CaseFirst = CaseFirstValue, + CaseLevel = CaseLevelValue, Country = CountryValue, Decomposition = DecompositionValue, - Hiraganaquaternarymode = HiraganaquaternarymodeValue, + HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, Language = LanguageValue, Numeric = NumericValue, Rules = RulesValue, Strength = StrengthValue, - Variabletop = VariabletopValue, + VariableTop = VariableTopValue, Variant = VariantValue, Version = VersionValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs index 36f796444d8..c6032c1bf9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs @@ -58,7 +58,7 @@ public sealed partial class MultiTermVectorsOperation /// The ID of the document. /// [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Id Id { get; set; } + public Elastic.Clients.Elasticsearch.Id? Id { get; set; } /// /// The index of the document. @@ -123,7 +123,7 @@ public MultiTermVectorsOperationDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.TermVectors.Filter? FilterValue { get; set; } private Elastic.Clients.Elasticsearch.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } @@ -190,7 +190,7 @@ public MultiTermVectorsOperationDescriptor Filter(Action /// The ID of the document. /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) { IdValue = id; return Self; @@ -305,8 +305,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + if (IndexValue is not null) { writer.WritePropertyName("_index"); @@ -373,7 +377,7 @@ public MultiTermVectorsOperationDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.TermVectors.Filter? FilterValue { get; set; } private Elastic.Clients.Elasticsearch.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } @@ -440,7 +444,7 @@ public MultiTermVectorsOperationDescriptor Filter(Action /// The ID of the document. /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) { IdValue = id; return Self; @@ -555,8 +559,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + if (IndexValue is not null) { writer.WritePropertyName("_index"); 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 c31f0c89c0b..9cfba626770 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 @@ -36,7 +36,7 @@ public sealed partial class Hit [JsonInclude, JsonPropertyName("highlight")] public IReadOnlyDictionary>? Highlight { get; init; } [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } + public string? Id { get; init; } [JsonInclude, JsonPropertyName("_ignored")] public IReadOnlyCollection? Ignored { get; init; } [JsonInclude, JsonPropertyName("ignored_field_values")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs index 324ab6438a7..d30a9ca8c9c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs @@ -135,6 +135,8 @@ public enum FieldType IntegerRange, [EnumMember(Value = "integer")] Integer, + [EnumMember(Value = "icu_collation_keyword")] + IcuCollationKeyword, [EnumMember(Value = "histogram")] Histogram, [EnumMember(Value = "half_float")] @@ -232,6 +234,8 @@ public override FieldType Read(ref Utf8JsonReader reader, Type typeToConvert, Js return FieldType.IntegerRange; case "integer": return FieldType.Integer; + case "icu_collation_keyword": + return FieldType.IcuCollationKeyword; case "histogram": return FieldType.Histogram; case "half_float": @@ -354,6 +358,9 @@ public override void Write(Utf8JsonWriter writer, FieldType value, JsonSerialize case FieldType.Integer: writer.WriteStringValue("integer"); return; + case FieldType.IcuCollationKeyword: + writer.WriteStringValue("icu_collation_keyword"); + return; case FieldType.Histogram: writer.WriteStringValue("histogram"); return; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs new file mode 100644 index 00000000000..60d03fa1abd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs @@ -0,0 +1,917 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Mapping; + +public sealed partial class IcuCollationProperty : IProperty +{ + [JsonInclude, JsonPropertyName("alternate")] + public Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? Alternate { get; set; } + [JsonInclude, JsonPropertyName("case_first")] + public Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; } + [JsonInclude, JsonPropertyName("case_level")] + public bool? CaseLevel { get; set; } + [JsonInclude, JsonPropertyName("copy_to")] + [JsonConverter(typeof(SingleOrManyFieldsConverter))] + public Elastic.Clients.Elasticsearch.Fields? CopyTo { get; set; } + [JsonInclude, JsonPropertyName("country")] + public string? Country { get; set; } + [JsonInclude, JsonPropertyName("decomposition")] + public Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? Decomposition { get; set; } + [JsonInclude, JsonPropertyName("doc_values")] + public bool? DocValues { get; set; } + [JsonInclude, JsonPropertyName("dynamic")] + public Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? Dynamic { get; set; } + [JsonInclude, JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Fields { get; set; } + [JsonInclude, JsonPropertyName("hiragana_quaternary_mode")] + public bool? HiraganaQuaternaryMode { get; set; } + [JsonInclude, JsonPropertyName("ignore_above")] + public int? IgnoreAbove { get; set; } + + /// + /// Should the field be searchable? + /// + [JsonInclude, JsonPropertyName("index")] + public bool? Index { get; set; } + [JsonInclude, JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptions { get; set; } + [JsonInclude, JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// Metadata about the field. + /// + [JsonInclude, JsonPropertyName("meta")] + public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("norms")] + public bool? Norms { get; set; } + + /// + /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. + /// + [JsonInclude, JsonPropertyName("null_value")] + public string? NullValue { get; set; } + [JsonInclude, JsonPropertyName("numeric")] + public bool? Numeric { get; set; } + [JsonInclude, JsonPropertyName("properties")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("rules")] + public string? Rules { get; set; } + [JsonInclude, JsonPropertyName("similarity")] + public string? Similarity { get; set; } + [JsonInclude, JsonPropertyName("store")] + public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("strength")] + public Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? Strength { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "icu_collation_keyword"; + + [JsonInclude, JsonPropertyName("variable_top")] + public string? VariableTop { get; set; } + [JsonInclude, JsonPropertyName("variant")] + public string? Variant { get; set; } +} + +public sealed partial class IcuCollationPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor +{ + internal IcuCollationPropertyDescriptor(Action> configure) => configure.Invoke(this); + + public IcuCollationPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? AlternateValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } + private bool? CaseLevelValue { get; set; } + private Elastic.Clients.Elasticsearch.Fields? CopyToValue { get; set; } + private string? CountryValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } + private bool? DocValuesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } + private bool? HiraganaQuaternaryModeValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private bool? IndexValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptionsValue { get; set; } + private string? LanguageValue { get; set; } + private IDictionary? MetaValue { get; set; } + private bool? NormsValue { get; set; } + private string? NullValueValue { get; set; } + private bool? NumericValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private string? RulesValue { get; set; } + private string? SimilarityValue { get; set; } + private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? StrengthValue { get; set; } + private string? VariableTopValue { get; set; } + private string? VariantValue { get; set; } + + public IcuCollationPropertyDescriptor Alternate(Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? alternate) + { + AlternateValue = alternate; + return Self; + } + + public IcuCollationPropertyDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? caseFirst) + { + CaseFirstValue = caseFirst; + return Self; + } + + public IcuCollationPropertyDescriptor CaseLevel(bool? caseLevel = true) + { + CaseLevelValue = caseLevel; + return Self; + } + + public IcuCollationPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) + { + CopyToValue = copyTo; + return Self; + } + + public IcuCollationPropertyDescriptor Country(string? country) + { + CountryValue = country; + return Self; + } + + public IcuCollationPropertyDescriptor Decomposition(Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? decomposition) + { + DecompositionValue = decomposition; + return Self; + } + + public IcuCollationPropertyDescriptor DocValues(bool? docValues = true) + { + DocValuesValue = docValues; + return Self; + } + + public IcuCollationPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) + { + HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; + return Self; + } + + public IcuCollationPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + /// + /// Should the field be searchable? + /// + public IcuCollationPropertyDescriptor Index(bool? index = true) + { + IndexValue = index; + return Self; + } + + public IcuCollationPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Mapping.IndexOptions? indexOptions) + { + IndexOptionsValue = indexOptions; + return Self; + } + + public IcuCollationPropertyDescriptor Language(string? language) + { + LanguageValue = language; + return Self; + } + + /// + /// Metadata about the field. + /// + public IcuCollationPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IcuCollationPropertyDescriptor Norms(bool? norms = true) + { + NormsValue = norms; + return Self; + } + + /// + /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. + /// + public IcuCollationPropertyDescriptor NullValue(string? nullValue) + { + NullValueValue = nullValue; + return Self; + } + + public IcuCollationPropertyDescriptor Numeric(bool? numeric = true) + { + NumericValue = numeric; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Rules(string? rules) + { + RulesValue = rules; + return Self; + } + + public IcuCollationPropertyDescriptor Similarity(string? similarity) + { + SimilarityValue = similarity; + return Self; + } + + public IcuCollationPropertyDescriptor Store(bool? store = true) + { + StoreValue = store; + return Self; + } + + public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? strength) + { + StrengthValue = strength; + return Self; + } + + public IcuCollationPropertyDescriptor VariableTop(string? variableTop) + { + VariableTopValue = variableTop; + return Self; + } + + public IcuCollationPropertyDescriptor Variant(string? variant) + { + VariantValue = variant; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AlternateValue is not null) + { + writer.WritePropertyName("alternate"); + JsonSerializer.Serialize(writer, AlternateValue, options); + } + + if (CaseFirstValue is not null) + { + writer.WritePropertyName("case_first"); + JsonSerializer.Serialize(writer, CaseFirstValue, options); + } + + if (CaseLevelValue.HasValue) + { + writer.WritePropertyName("case_level"); + writer.WriteBooleanValue(CaseLevelValue.Value); + } + + if (CopyToValue is not null) + { + writer.WritePropertyName("copy_to"); + JsonSerializer.Serialize(writer, CopyToValue, options); + } + + if (!string.IsNullOrEmpty(CountryValue)) + { + writer.WritePropertyName("country"); + writer.WriteStringValue(CountryValue); + } + + if (DecompositionValue is not null) + { + writer.WritePropertyName("decomposition"); + JsonSerializer.Serialize(writer, DecompositionValue, options); + } + + if (DocValuesValue.HasValue) + { + writer.WritePropertyName("doc_values"); + writer.WriteBooleanValue(DocValuesValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (HiraganaQuaternaryModeValue.HasValue) + { + writer.WritePropertyName("hiragana_quaternary_mode"); + writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (IndexValue.HasValue) + { + writer.WritePropertyName("index"); + writer.WriteBooleanValue(IndexValue.Value); + } + + if (IndexOptionsValue is not null) + { + writer.WritePropertyName("index_options"); + JsonSerializer.Serialize(writer, IndexOptionsValue, options); + } + + if (!string.IsNullOrEmpty(LanguageValue)) + { + writer.WritePropertyName("language"); + writer.WriteStringValue(LanguageValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (NormsValue.HasValue) + { + writer.WritePropertyName("norms"); + writer.WriteBooleanValue(NormsValue.Value); + } + + if (!string.IsNullOrEmpty(NullValueValue)) + { + writer.WritePropertyName("null_value"); + writer.WriteStringValue(NullValueValue); + } + + if (NumericValue.HasValue) + { + writer.WritePropertyName("numeric"); + writer.WriteBooleanValue(NumericValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + if (!string.IsNullOrEmpty(RulesValue)) + { + writer.WritePropertyName("rules"); + writer.WriteStringValue(RulesValue); + } + + if (!string.IsNullOrEmpty(SimilarityValue)) + { + writer.WritePropertyName("similarity"); + writer.WriteStringValue(SimilarityValue); + } + + if (StoreValue.HasValue) + { + writer.WritePropertyName("store"); + writer.WriteBooleanValue(StoreValue.Value); + } + + if (StrengthValue is not null) + { + writer.WritePropertyName("strength"); + JsonSerializer.Serialize(writer, StrengthValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("icu_collation_keyword"); + if (!string.IsNullOrEmpty(VariableTopValue)) + { + writer.WritePropertyName("variable_top"); + writer.WriteStringValue(VariableTopValue); + } + + if (!string.IsNullOrEmpty(VariantValue)) + { + writer.WritePropertyName("variant"); + writer.WriteStringValue(VariantValue); + } + + writer.WriteEndObject(); + } + + IcuCollationProperty IBuildableDescriptor.Build() => new() + { + Alternate = AlternateValue, + CaseFirst = CaseFirstValue, + CaseLevel = CaseLevelValue, + CopyTo = CopyToValue, + Country = CountryValue, + Decomposition = DecompositionValue, + DocValues = DocValuesValue, + Dynamic = DynamicValue, + Fields = FieldsValue, + HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, + IgnoreAbove = IgnoreAboveValue, + Index = IndexValue, + IndexOptions = IndexOptionsValue, + Language = LanguageValue, + Meta = MetaValue, + Norms = NormsValue, + NullValue = NullValueValue, + Numeric = NumericValue, + Properties = PropertiesValue, + Rules = RulesValue, + Similarity = SimilarityValue, + Store = StoreValue, + Strength = StrengthValue, + VariableTop = VariableTopValue, + Variant = VariantValue + }; +} + +public sealed partial class IcuCollationPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal IcuCollationPropertyDescriptor(Action configure) => configure.Invoke(this); + + public IcuCollationPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? AlternateValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } + private bool? CaseLevelValue { get; set; } + private Elastic.Clients.Elasticsearch.Fields? CopyToValue { get; set; } + private string? CountryValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } + private bool? DocValuesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } + private bool? HiraganaQuaternaryModeValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private bool? IndexValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptionsValue { get; set; } + private string? LanguageValue { get; set; } + private IDictionary? MetaValue { get; set; } + private bool? NormsValue { get; set; } + private string? NullValueValue { get; set; } + private bool? NumericValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private string? RulesValue { get; set; } + private string? SimilarityValue { get; set; } + private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? StrengthValue { get; set; } + private string? VariableTopValue { get; set; } + private string? VariantValue { get; set; } + + public IcuCollationPropertyDescriptor Alternate(Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? alternate) + { + AlternateValue = alternate; + return Self; + } + + public IcuCollationPropertyDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? caseFirst) + { + CaseFirstValue = caseFirst; + return Self; + } + + public IcuCollationPropertyDescriptor CaseLevel(bool? caseLevel = true) + { + CaseLevelValue = caseLevel; + return Self; + } + + public IcuCollationPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) + { + CopyToValue = copyTo; + return Self; + } + + public IcuCollationPropertyDescriptor Country(string? country) + { + CountryValue = country; + return Self; + } + + public IcuCollationPropertyDescriptor Decomposition(Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? decomposition) + { + DecompositionValue = decomposition; + return Self; + } + + public IcuCollationPropertyDescriptor DocValues(bool? docValues = true) + { + DocValuesValue = docValues; + return Self; + } + + public IcuCollationPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Fields(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) + { + HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; + return Self; + } + + public IcuCollationPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + /// + /// Should the field be searchable? + /// + public IcuCollationPropertyDescriptor Index(bool? index = true) + { + IndexValue = index; + return Self; + } + + public IcuCollationPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Mapping.IndexOptions? indexOptions) + { + IndexOptionsValue = indexOptions; + return Self; + } + + public IcuCollationPropertyDescriptor Language(string? language) + { + LanguageValue = language; + return Self; + } + + /// + /// Metadata about the field. + /// + public IcuCollationPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IcuCollationPropertyDescriptor Norms(bool? norms = true) + { + NormsValue = norms; + return Self; + } + + /// + /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. + /// + public IcuCollationPropertyDescriptor NullValue(string? nullValue) + { + NullValueValue = nullValue; + return Self; + } + + public IcuCollationPropertyDescriptor Numeric(bool? numeric = true) + { + NumericValue = numeric; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Properties(Action> configure) + { + var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public IcuCollationPropertyDescriptor Rules(string? rules) + { + RulesValue = rules; + return Self; + } + + public IcuCollationPropertyDescriptor Similarity(string? similarity) + { + SimilarityValue = similarity; + return Self; + } + + public IcuCollationPropertyDescriptor Store(bool? store = true) + { + StoreValue = store; + return Self; + } + + public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? strength) + { + StrengthValue = strength; + return Self; + } + + public IcuCollationPropertyDescriptor VariableTop(string? variableTop) + { + VariableTopValue = variableTop; + return Self; + } + + public IcuCollationPropertyDescriptor Variant(string? variant) + { + VariantValue = variant; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AlternateValue is not null) + { + writer.WritePropertyName("alternate"); + JsonSerializer.Serialize(writer, AlternateValue, options); + } + + if (CaseFirstValue is not null) + { + writer.WritePropertyName("case_first"); + JsonSerializer.Serialize(writer, CaseFirstValue, options); + } + + if (CaseLevelValue.HasValue) + { + writer.WritePropertyName("case_level"); + writer.WriteBooleanValue(CaseLevelValue.Value); + } + + if (CopyToValue is not null) + { + writer.WritePropertyName("copy_to"); + JsonSerializer.Serialize(writer, CopyToValue, options); + } + + if (!string.IsNullOrEmpty(CountryValue)) + { + writer.WritePropertyName("country"); + writer.WriteStringValue(CountryValue); + } + + if (DecompositionValue is not null) + { + writer.WritePropertyName("decomposition"); + JsonSerializer.Serialize(writer, DecompositionValue, options); + } + + if (DocValuesValue.HasValue) + { + writer.WritePropertyName("doc_values"); + writer.WriteBooleanValue(DocValuesValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (HiraganaQuaternaryModeValue.HasValue) + { + writer.WritePropertyName("hiragana_quaternary_mode"); + writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (IndexValue.HasValue) + { + writer.WritePropertyName("index"); + writer.WriteBooleanValue(IndexValue.Value); + } + + if (IndexOptionsValue is not null) + { + writer.WritePropertyName("index_options"); + JsonSerializer.Serialize(writer, IndexOptionsValue, options); + } + + if (!string.IsNullOrEmpty(LanguageValue)) + { + writer.WritePropertyName("language"); + writer.WriteStringValue(LanguageValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (NormsValue.HasValue) + { + writer.WritePropertyName("norms"); + writer.WriteBooleanValue(NormsValue.Value); + } + + if (!string.IsNullOrEmpty(NullValueValue)) + { + writer.WritePropertyName("null_value"); + writer.WriteStringValue(NullValueValue); + } + + if (NumericValue.HasValue) + { + writer.WritePropertyName("numeric"); + writer.WriteBooleanValue(NumericValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + if (!string.IsNullOrEmpty(RulesValue)) + { + writer.WritePropertyName("rules"); + writer.WriteStringValue(RulesValue); + } + + if (!string.IsNullOrEmpty(SimilarityValue)) + { + writer.WritePropertyName("similarity"); + writer.WriteStringValue(SimilarityValue); + } + + if (StoreValue.HasValue) + { + writer.WritePropertyName("store"); + writer.WriteBooleanValue(StoreValue.Value); + } + + if (StrengthValue is not null) + { + writer.WritePropertyName("strength"); + JsonSerializer.Serialize(writer, StrengthValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("icu_collation_keyword"); + if (!string.IsNullOrEmpty(VariableTopValue)) + { + writer.WritePropertyName("variable_top"); + writer.WriteStringValue(VariableTopValue); + } + + if (!string.IsNullOrEmpty(VariantValue)) + { + writer.WritePropertyName("variant"); + writer.WriteStringValue(VariantValue); + } + + writer.WriteEndObject(); + } + + IcuCollationProperty IBuildableDescriptor.Build() => new() + { + Alternate = AlternateValue, + CaseFirst = CaseFirstValue, + CaseLevel = CaseLevelValue, + CopyTo = CopyToValue, + Country = CountryValue, + Decomposition = DecompositionValue, + DocValues = DocValuesValue, + Dynamic = DynamicValue, + Fields = FieldsValue, + HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, + IgnoreAbove = IgnoreAboveValue, + Index = IndexValue, + IndexOptions = IndexOptionsValue, + Language = LanguageValue, + Meta = MetaValue, + Norms = NormsValue, + NullValue = NullValueValue, + Numeric = NumericValue, + Properties = PropertiesValue, + Rules = RulesValue, + Similarity = SimilarityValue, + Store = StoreValue, + Strength = StrengthValue, + VariableTop = VariableTopValue, + Variant = VariantValue + }; +} \ No newline at end of file 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 9f5a2f45035..0a53766132c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs @@ -171,6 +171,11 @@ public PropertiesDescriptor() : base(new Properties()) public PropertiesDescriptor Histogram(Elastic.Clients.Elasticsearch.PropertyName propertyName, HistogramProperty histogramProperty) => AssignVariant(propertyName, histogramProperty); public PropertiesDescriptor Histogram(Expression> propertyName) => AssignVariant, HistogramProperty>(propertyName, null); public PropertiesDescriptor Histogram(Expression> propertyName, Action> configure) => AssignVariant, HistogramProperty>(propertyName, configure); + public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.PropertyName propertyName) => AssignVariant, IcuCollationProperty>(propertyName, null); + public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.PropertyName propertyName, Action> configure) => AssignVariant, IcuCollationProperty>(propertyName, configure); + public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.PropertyName propertyName, IcuCollationProperty icuCollationProperty) => AssignVariant(propertyName, icuCollationProperty); + public PropertiesDescriptor IcuCollation(Expression> propertyName) => AssignVariant, IcuCollationProperty>(propertyName, null); + public PropertiesDescriptor IcuCollation(Expression> propertyName, Action> configure) => AssignVariant, IcuCollationProperty>(propertyName, configure); public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.PropertyName propertyName) => AssignVariant, IntegerNumberProperty>(propertyName, null); public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.PropertyName propertyName, Action> configure) => AssignVariant, IntegerNumberProperty>(propertyName, configure); public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.PropertyName propertyName, IntegerNumberProperty integerNumberProperty) => AssignVariant(propertyName, integerNumberProperty); @@ -359,6 +364,8 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "histogram": return JsonSerializer.Deserialize(ref reader, options); + case "icu_collation_keyword": + return JsonSerializer.Deserialize(ref reader, options); case "integer": return JsonSerializer.Deserialize(ref reader, options); case "integer_range": @@ -489,6 +496,9 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "histogram": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.HistogramProperty), options); return; + case "icu_collation_keyword": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty), options); + return; case "integer": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty), options); return; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoScript.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoScript.g.cs index 02ab55c6fd7..a337db042a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoScript.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoScript.g.cs @@ -32,5 +32,5 @@ public sealed partial class NodeInfoScript [JsonInclude, JsonPropertyName("allowed_types")] public string AllowedTypes { get; init; } [JsonInclude, JsonPropertyName("disable_max_compilations_rate")] - public string DisableMaxCompilationsRate { get; init; } + public string? DisableMaxCompilationsRate { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettings.g.cs index 7d30877163b..7338c3d1df9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettings.g.cs @@ -34,7 +34,7 @@ public sealed partial class NodeInfoSettings [JsonInclude, JsonPropertyName("bootstrap")] public Elastic.Clients.Elasticsearch.Nodes.NodeInfoBootstrap? Bootstrap { get; init; } [JsonInclude, JsonPropertyName("client")] - public Elastic.Clients.Elasticsearch.Nodes.NodeInfoClient Client { get; init; } + public Elastic.Clients.Elasticsearch.Nodes.NodeInfoClient? Client { get; init; } [JsonInclude, JsonPropertyName("cluster")] public Elastic.Clients.Elasticsearch.Nodes.NodeInfoSettingsCluster Cluster { get; init; } [JsonInclude, JsonPropertyName("discovery")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs index 5d03a211a2e..094f4f133f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs @@ -30,5 +30,5 @@ namespace Elastic.Clients.Elasticsearch.Nodes; public sealed partial class NodeInfoSettingsNetwork { [JsonInclude, JsonPropertyName("host")] - public string Host { get; init; } + public string? Host { get; init; } } \ No newline at end of file