From d9e264af70c9b1cbe0044867d828b838787e6363 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Thu, 31 Mar 2022 15:40:41 +0100 Subject: [PATCH] Add Put Mapping API (#6236) --- .../Fluent/Promise/DescriptorPromiseBase.cs | 2 +- .../Common/Infer/PropertyName/PropertyName.cs | 2 +- .../Common/IsADictionaryBase.cs | 216 +++--- .../DefaultRequestResponseSerializer.cs | 1 + .../Serialization/DictionaryConverter.cs | 250 +++---- .../Serialization/IsADictionaryConverter.cs | 52 +- .../Types/Mapping/Properties.cs | 20 + .../Types/Mapping/PropertyBase.cs | 60 ++ .../_Generated/Api/ApiUrlsLookup.g.cs | 1 + .../IndexManagement/PutMappingRequest.g.cs | 686 ++++++++++++++++++ .../IndexManagement/PutMappingResponse.g.cs | 35 + .../ElasticsearchClient.IndexManagement.g.cs | 28 + .../Aggregations/AggregateDictionary.g.cs | 1 + .../Types/Aggregations/Buckets.g.cs | 2 + .../Types/Aggregations/BucketsPath.g.cs | 2 + .../Types/Aggregations/FieldDateMath.g.cs | 2 + .../Types/Aggregations/Percentiles.g.cs | 2 + .../Types/Aggregations/TermsExclude.g.cs | 2 + .../Types/Aggregations/TermsInclude.g.cs | 2 + .../_Generated/Types/Analysis/Analyzers.g.cs | 54 +- .../Analysis/AsciiFoldingTokenFilter.g.cs | 2 +- .../_Generated/Types/Analysis/CharFilter.g.cs | 2 + .../Types/Analysis/CharFilterDefinitions.g.cs | 36 +- .../Types/Analysis/CharGroupTokenizer.g.cs | 2 +- .../Analysis/CommonGramsTokenFilter.g.cs | 2 +- .../Types/Analysis/ConditionTokenFilter.g.cs | 2 +- .../Types/Analysis/CustomAnalyzer.g.cs | 2 +- .../Types/Analysis/CustomNormalizer.g.cs | 2 +- .../Analysis/DelimitedPayloadTokenFilter.g.cs | 2 +- .../DictionaryDecompounderTokenFilter.g.cs | 2 +- .../Types/Analysis/DutchAnalyzer.g.cs | 2 +- .../Types/Analysis/EdgeNGramTokenFilter.g.cs | 2 +- .../Types/Analysis/EdgeNGramTokenizer.g.cs | 2 +- .../Types/Analysis/ElisionTokenFilter.g.cs | 2 +- .../Types/Analysis/FingerprintAnalyzer.g.cs | 2 +- .../Analysis/FingerprintTokenFilter.g.cs | 2 +- .../Types/Analysis/HtmlStripCharFilter.g.cs | 2 +- .../Types/Analysis/HunspellTokenFilter.g.cs | 2 +- .../HyphenationDecompounderTokenFilter.g.cs | 2 +- .../Types/Analysis/IcuAnalyzer.g.cs | 2 +- .../Analysis/IcuCollationTokenFilter.g.cs | 2 +- .../Types/Analysis/IcuFoldingTokenFilter.g.cs | 2 +- .../Analysis/IcuNormalizationCharFilter.g.cs | 2 +- .../Analysis/IcuNormalizationTokenFilter.g.cs | 2 +- .../Types/Analysis/IcuTokenizer.g.cs | 2 +- .../Analysis/IcuTransformTokenFilter.g.cs | 2 +- .../Types/Analysis/KStemTokenFilter.g.cs | 2 +- .../Types/Analysis/KeepTypesTokenFilter.g.cs | 2 +- .../Types/Analysis/KeepWordsTokenFilter.g.cs | 2 +- .../Types/Analysis/KeywordAnalyzer.g.cs | 2 +- .../Analysis/KeywordMarkerTokenFilter.g.cs | 2 +- .../Types/Analysis/KeywordTokenizer.g.cs | 2 +- .../Types/Analysis/KuromojiAnalyzer.g.cs | 2 +- .../KuromojiIterationMarkCharFilter.g.cs | 2 +- .../KuromojiPartOfSpeechTokenFilter.g.cs | 2 +- .../KuromojiReadingFormTokenFilter.g.cs | 2 +- .../Analysis/KuromojiStemmerTokenFilter.g.cs | 2 +- .../Types/Analysis/KuromojiTokenizer.g.cs | 2 +- .../Types/Analysis/LanguageAnalyzer.g.cs | 2 +- .../Types/Analysis/LengthTokenFilter.g.cs | 2 +- .../Types/Analysis/LetterTokenizer.g.cs | 2 +- .../Analysis/LimitTokenCountTokenFilter.g.cs | 2 +- .../Types/Analysis/LowercaseNormalizer.g.cs | 2 +- .../Types/Analysis/LowercaseTokenFilter.g.cs | 2 +- .../Types/Analysis/LowercaseTokenizer.g.cs | 2 +- .../Types/Analysis/MappingCharFilter.g.cs | 2 +- .../Analysis/MultiplexerTokenFilter.g.cs | 2 +- .../Types/Analysis/NGramTokenFilter.g.cs | 2 +- .../Types/Analysis/NGramTokenizer.g.cs | 2 +- .../Types/Analysis/NoriAnalyzer.g.cs | 2 +- .../Analysis/NoriPartOfSpeechTokenFilter.g.cs | 2 +- .../Types/Analysis/NoriTokenizer.g.cs | 2 +- .../Types/Analysis/Normalizers.g.cs | 30 +- .../Analysis/PathHierarchyTokenizer.g.cs | 2 +- .../Types/Analysis/PatternAnalyzer.g.cs | 2 +- .../Analysis/PatternCaptureTokenFilter.g.cs | 2 +- .../Analysis/PatternReplaceCharFilter.g.cs | 2 +- .../Analysis/PatternReplaceTokenFilter.g.cs | 2 +- .../Types/Analysis/PatternTokenizer.g.cs | 2 +- .../Types/Analysis/PhoneticTokenFilter.g.cs | 2 +- .../Types/Analysis/PorterStemTokenFilter.g.cs | 2 +- .../Types/Analysis/PredicateTokenFilter.g.cs | 2 +- .../Analysis/RemoveDuplicatesTokenFilter.g.cs | 2 +- .../Types/Analysis/ReverseTokenFilter.g.cs | 2 +- .../Types/Analysis/ShingleTokenFilter.g.cs | 2 +- .../Types/Analysis/SimpleAnalyzer.g.cs | 2 +- .../Types/Analysis/SnowballAnalyzer.g.cs | 2 +- .../Types/Analysis/SnowballTokenFilter.g.cs | 2 +- .../Types/Analysis/StandardAnalyzer.g.cs | 2 +- .../Types/Analysis/StandardTokenizer.g.cs | 2 +- .../Analysis/StemmerOverrideTokenFilter.g.cs | 2 +- .../Types/Analysis/StemmerTokenFilter.g.cs | 2 +- .../Types/Analysis/StopAnalyzer.g.cs | 2 +- .../Types/Analysis/StopTokenFilter.g.cs | 2 +- .../_Generated/Types/Analysis/StopWords.g.cs | 2 + .../Analysis/SynonymGraphTokenFilter.g.cs | 2 +- .../Types/Analysis/SynonymTokenFilter.g.cs | 2 +- .../Types/Analysis/TokenFilter.g.cs | 2 + .../Analysis/TokenFilterDefinitions.g.cs | 122 +++- .../_Generated/Types/Analysis/Tokenizer.g.cs | 2 + .../Types/Analysis/TokenizerDefinitions.g.cs | 54 +- .../Types/Analysis/TrimTokenFilter.g.cs | 2 +- .../Types/Analysis/TruncateTokenFilter.g.cs | 2 +- .../Types/Analysis/UaxEmailUrlTokenizer.g.cs | 2 +- .../Types/Analysis/UniqueTokenFilter.g.cs | 2 +- .../Types/Analysis/UppercaseTokenFilter.g.cs | 2 +- .../Types/Analysis/WhitespaceAnalyzer.g.cs | 2 +- .../Types/Analysis/WhitespaceTokenizer.g.cs | 2 +- .../WordDelimiterGraphTokenFilter.g.cs | 2 +- .../Analysis/WordDelimiterTokenFilter.g.cs | 2 +- .../_Generated/Types/ByteSize.g.cs | 2 + .../_Generated/Types/DateOrEpochMillis.g.cs | 2 + .../Types/Enums/Enums.IndexManagement.g.cs | 84 +++ .../_Generated/Types/Enums/Enums.Mapping.g.cs | 357 +++++++++ .../_Generated/Types/ExpandWildcards.g.cs | 2 + .../_Generated/Types/Fuzziness.g.cs | 2 + .../_Generated/Types/GeoHashLocation.g.cs | 33 + .../_Generated/Types/Ids.g.cs | 2 + .../Types/Ilm/LifecycleExplainManaged.g.cs | 2 +- .../Types/Ilm/LifecycleExplainUnmanaged.g.cs | 2 +- .../Types/Ilm/LifecycleExplains.g.cs | 26 +- .../FielddataFrequencyFilter.g.cs | 41 ++ .../IndexManagement/NumericFielddata.g.cs | 33 + .../IndexManagement/StringFielddata.g.cs | 33 + .../_Generated/Types/LatLonGeoLocation.g.cs | 37 + .../AggregateMetricDoubleProperty.g.cs | 41 ++ .../Types/Mapping/BinaryProperty.g.cs | 33 + .../Types/Mapping/BooleanProperty.g.cs | 49 ++ .../Types/Mapping/ByteNumberProperty.g.cs | 37 + .../Types/Mapping/CompletionProperty.g.cs | 57 ++ .../Mapping/ConstantKeywordProperty.g.cs | 36 + .../Types/Mapping/CoreProperty.g.cs | 30 + .../Types/Mapping/CorePropertyBase.g.cs | 41 ++ .../Types/Mapping/DateNanosProperty.g.cs | 57 ++ .../Types/Mapping/DateProperty.g.cs | 65 ++ .../Types/Mapping/DateRangeProperty.g.cs | 37 + .../Mapping/DenseVectorIndexOptions.g.cs | 41 ++ .../Types/Mapping/DenseVectorProperty.g.cs | 49 ++ .../Types/Mapping/DocValuesProperty.g.cs | 30 + .../Types/Mapping/DocValuesPropertyBase.g.cs | 33 + .../Types/Mapping/DoubleNumberProperty.g.cs | 37 + .../Types/Mapping/DoubleRangeProperty.g.cs | 33 + .../Types/Mapping/DynamicTemplate.g.cs | 169 +++++ .../Types/Mapping/FieldAliasProperty.g.cs | 37 + .../Types/Mapping/FieldNamesField.g.cs | 57 ++ .../Types/Mapping/FlattenedProperty.g.cs | 69 ++ .../Types/Mapping/FloatNumberProperty.g.cs | 37 + .../Types/Mapping/FloatRangeProperty.g.cs | 33 + .../Types/Mapping/GenericProperty.g.cs | 77 ++ .../Types/Mapping/GeoPointProperty.g.cs | 45 ++ .../Types/Mapping/GeoShapeProperty.g.cs | 53 ++ .../Mapping/HalfFloatNumberProperty.g.cs | 37 + .../Types/Mapping/HistogramProperty.g.cs | 37 + .../Types/Mapping/IntegerNumberProperty.g.cs | 37 + .../Types/Mapping/IntegerRangeProperty.g.cs | 33 + .../_Generated/Types/Mapping/IpProperty.g.cs | 49 ++ .../Types/Mapping/IpRangeProperty.g.cs | 33 + .../Types/Mapping/JoinProperty.g.cs | 37 + .../Types/Mapping/KeywordProperty.g.cs | 69 ++ .../Types/Mapping/LongNumberProperty.g.cs | 37 + .../Types/Mapping/LongRangeProperty.g.cs | 33 + .../Types/Mapping/MatchOnlyTextProperty.g.cs | 45 ++ .../Types/Mapping/Murmur3HashProperty.g.cs | 33 + .../Types/Mapping/NestedProperty.g.cs | 45 ++ .../Types/Mapping/NumberProperty.g.cs | 30 + .../Types/Mapping/NumberPropertyBase.g.cs | 41 ++ .../Types/Mapping/ObjectProperty.g.cs | 37 + .../Types/Mapping/PercolatorProperty.g.cs | 33 + .../Types/Mapping/PointProperty.g.cs | 45 ++ .../_Generated/Types/Mapping/Properties.g.cs | 146 ++++ .../Types/Mapping/PropertyBase.g.cs | 57 ++ .../Types/Mapping/RangeProperty.g.cs | 30 + .../Types/Mapping/RangePropertyBase.g.cs | 41 ++ .../Types/Mapping/RankFeatureProperty.g.cs | 37 + .../Types/Mapping/RankFeaturesProperty.g.cs | 33 + .../Types/Mapping/RoutingField.g.cs | 57 ++ .../Mapping/ScaledFloatNumberProperty.g.cs | 45 ++ .../Mapping/SearchAsYouTypeProperty.g.cs | 65 ++ .../Types/Mapping/ShapeProperty.g.cs | 49 ++ .../Types/Mapping/ShortNumberProperty.g.cs | 37 + .../_Generated/Types/Mapping/SourceField.g.cs | 133 ++++ .../Types/Mapping/StandardNumberProperty.g.cs | 41 ++ .../Types/Mapping/SuggestContext.g.cs | 45 ++ .../Types/Mapping/TextIndexPrefixes.g.cs | 37 + .../Types/Mapping/TextProperty.g.cs | 89 +++ .../Types/Mapping/TokenCountProperty.g.cs | 53 ++ .../Mapping/UnsignedLongNumberProperty.g.cs | 37 + .../Types/Mapping/VersionProperty.g.cs | 33 + .../Types/Mapping/WildcardProperty.g.cs | 37 + .../Types/Nodes/NodeReloadResult.g.cs | 2 + .../_Generated/Types/QueryDsl/Like.g.cs | 2 + .../QueryDsl/SimpleQueryStringFlags.g.cs | 2 + .../_Generated/Types/SourceConfig.g.cs | 2 + .../_Generated/Types/SourceConfigParam.g.cs | 2 + .../_Generated/Types/Tasks/TaskInfos.g.cs | 2 + .../_Generated/Types/TrackHits.g.cs | 2 + src/Playground/Program.cs | 44 +- 197 files changed, 5290 insertions(+), 356 deletions(-) create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Mapping/Properties.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Mapping/PropertyBase.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/NumericFielddata.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/StringFielddata.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CoreProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CorePropertyBase.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesPropertyBase.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldNamesField.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GenericProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberPropertyBase.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PropertyBase.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangePropertyBase.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RoutingField.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/StandardNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SuggestContext.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextIndexPrefixes.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs diff --git a/src/Elastic.Clients.Elasticsearch/Common/Fluent/Promise/DescriptorPromiseBase.cs b/src/Elastic.Clients.Elasticsearch/Common/Fluent/Promise/DescriptorPromiseBase.cs index 0fd00f87f6f..b132ad054c6 100644 --- a/src/Elastic.Clients.Elasticsearch/Common/Fluent/Promise/DescriptorPromiseBase.cs +++ b/src/Elastic.Clients.Elasticsearch/Common/Fluent/Promise/DescriptorPromiseBase.cs @@ -18,7 +18,7 @@ public abstract class DescriptorPromiseBase : IDescriptor, { internal readonly TValue PromisedValue; - protected DescriptorPromiseBase(TValue instance) + internal DescriptorPromiseBase(TValue instance) { PromisedValue = instance; Self = (TDescriptor)this; diff --git a/src/Elastic.Clients.Elasticsearch/Common/Infer/PropertyName/PropertyName.cs b/src/Elastic.Clients.Elasticsearch/Common/Infer/PropertyName/PropertyName.cs index 7629e7daae4..2149e3c8961 100644 --- a/src/Elastic.Clients.Elasticsearch/Common/Infer/PropertyName/PropertyName.cs +++ b/src/Elastic.Clients.Elasticsearch/Common/Infer/PropertyName/PropertyName.cs @@ -61,7 +61,7 @@ public PropertyName(PropertyInfo property) string IUrlParameter.GetString(ITransportConfiguration settings) { - if (!(settings is IElasticsearchClientSettings elasticsearchSettings)) + if (settings is not IElasticsearchClientSettings elasticsearchSettings) { throw new ArgumentNullException(nameof(settings), $"Can not resolve {nameof(PropertyName)} if no {nameof(IElasticsearchClientSettings)} is provided"); diff --git a/src/Elastic.Clients.Elasticsearch/Common/IsADictionaryBase.cs b/src/Elastic.Clients.Elasticsearch/Common/IsADictionaryBase.cs index 6e7a2efe3e3..fbe21b2daf4 100644 --- a/src/Elastic.Clients.Elasticsearch/Common/IsADictionaryBase.cs +++ b/src/Elastic.Clients.Elasticsearch/Common/IsADictionaryBase.cs @@ -8,157 +8,159 @@ using System.ComponentModel; using System.Linq; -namespace Elastic.Clients.Elasticsearch -{ +namespace Elastic.Clients.Elasticsearch; + +public interface IIsADictionary { } - public interface IIsADictionary { } +public interface IIsADictionary : IDictionary, IIsADictionary { } - public interface IIsADictionary : IDictionary, IIsADictionary { } +/// +/// A base dictionary type for internally tagged unions. +/// +/// +/// - public abstract class IsADictionaryBase : IIsADictionary +public abstract class IsADictionaryBase : IIsADictionary +{ + internal IsADictionaryBase() => BackingDictionary = new Dictionary(); + + internal IsADictionaryBase(IDictionary backingDictionary) { - protected IsADictionaryBase() => BackingDictionary = new Dictionary(); + if (backingDictionary != null) + foreach (var key in backingDictionary.Keys) + ValidateKey(Sanitize(key)); - protected IsADictionaryBase(IDictionary backingDictionary) - { - // ReSharper disable VirtualMemberCallInConstructor - if (backingDictionary != null) - foreach (var key in backingDictionary.Keys) - ValidateKey(Sanitize(key)); - // ReSharper enable VirtualMemberCallInConstructor + BackingDictionary = backingDictionary != null + ? new Dictionary(backingDictionary) + : new Dictionary(); + } - BackingDictionary = backingDictionary != null - ? new Dictionary(backingDictionary) - : new Dictionary(); - } + public TValue this[TKey key] + { + get => BackingDictionary[Sanitize(key)]; + set => BackingDictionary[ValidateKey(Sanitize(key))] = value; + } - public TValue this[TKey key] - { - get => BackingDictionary[Sanitize(key)]; - set => BackingDictionary[ValidateKey(Sanitize(key))] = value; - } + internal Dictionary BackingDictionary { get; } + int ICollection>.Count => BackingDictionary.Count; + bool ICollection>.IsReadOnly => Self.IsReadOnly; - protected Dictionary BackingDictionary { get; } - int ICollection>.Count => BackingDictionary.Count; - bool ICollection>.IsReadOnly => Self.IsReadOnly; + TValue IDictionary.this[TKey key] + { + get => BackingDictionary[Sanitize(key)]; + set => BackingDictionary[ValidateKey(Sanitize(key))] = value; + } - TValue IDictionary.this[TKey key] - { - get => BackingDictionary[Sanitize(key)]; - set => BackingDictionary[ValidateKey(Sanitize(key))] = value; - } + ICollection IDictionary.Keys => BackingDictionary.Keys; + private ICollection> Self => BackingDictionary; + ICollection IDictionary.Values => BackingDictionary.Values; - ICollection IDictionary.Keys => BackingDictionary.Keys; - private ICollection> Self => BackingDictionary; - ICollection IDictionary.Values => BackingDictionary.Values; + void ICollection>.Add(KeyValuePair item) + { + ValidateKey(Sanitize(item.Key)); + Self.Add(item); + } - void ICollection>.Add(KeyValuePair item) - { - ValidateKey(Sanitize(item.Key)); - Self.Add(item); - } + void ICollection>.Clear() => BackingDictionary.Clear(); - void ICollection>.Clear() => BackingDictionary.Clear(); + [EditorBrowsable(EditorBrowsableState.Never)] + bool ICollection>.Contains(KeyValuePair item) => Self.Contains(item); - [EditorBrowsable(EditorBrowsableState.Never)] - bool ICollection>.Contains(KeyValuePair item) => Self.Contains(item); + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => Self.CopyTo(array, arrayIndex); - void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => Self.CopyTo(array, arrayIndex); + bool ICollection>.Remove(KeyValuePair item) => Self.Remove(item); - bool ICollection>.Remove(KeyValuePair item) => Self.Remove(item); + void IDictionary.Add(TKey key, TValue value) => BackingDictionary.Add(ValidateKey(Sanitize(key)), value); - void IDictionary.Add(TKey key, TValue value) => BackingDictionary.Add(ValidateKey(Sanitize(key)), value); + [EditorBrowsable(EditorBrowsableState.Never)] + bool IDictionary.ContainsKey(TKey key) => BackingDictionary.ContainsKey(Sanitize(key)); - [EditorBrowsable(EditorBrowsableState.Never)] - bool IDictionary.ContainsKey(TKey key) => BackingDictionary.ContainsKey(Sanitize(key)); + bool IDictionary.Remove(TKey key) => BackingDictionary.Remove(Sanitize(key)); - bool IDictionary.Remove(TKey key) => BackingDictionary.Remove(Sanitize(key)); + bool IDictionary.TryGetValue(TKey key, out TValue value) => BackingDictionary.TryGetValue(Sanitize(key), out value); - bool IDictionary.TryGetValue(TKey key, out TValue value) => BackingDictionary.TryGetValue(Sanitize(key), out value); + IEnumerator IEnumerable.GetEnumerator() => BackingDictionary.GetEnumerator(); - IEnumerator IEnumerable.GetEnumerator() => BackingDictionary.GetEnumerator(); + IEnumerator> IEnumerable>.GetEnumerator() => BackingDictionary.GetEnumerator(); - IEnumerator> IEnumerable>.GetEnumerator() => BackingDictionary.GetEnumerator(); + protected virtual TKey ValidateKey(TKey key) => key; - protected virtual TKey ValidateKey(TKey key) => key; + protected virtual TKey Sanitize(TKey key) => key; +} - protected virtual TKey Sanitize(TKey key) => key; - } +public abstract class IsADictionaryDescriptorBase + : DescriptorPromiseBase + where TDescriptor : IsADictionaryDescriptorBase + where TPromised : class, IIsADictionary +{ + protected IsADictionaryDescriptorBase(TPromised instance) : base(instance) { } - public abstract class IsADictionaryDescriptorBase - : DescriptorPromiseBase - where TDescriptor : IsADictionaryDescriptorBase - where TPromised : class, IIsADictionary + protected TDescriptor Assign(TKey key, TValue value) { - protected IsADictionaryDescriptorBase(TPromised instance) : base(instance) { } - - protected TDescriptor Assign(TKey key, TValue value) - { - PromisedValue.Add(key, value); - return Self; - } + PromisedValue.Add(key, value); + return Self; } +} - public interface IIsAReadOnlyDictionary { } +public interface IIsAReadOnlyDictionary { } - public interface IIsAReadOnlyDictionary : IReadOnlyDictionary, IIsAReadOnlyDictionary { } +public interface IIsAReadOnlyDictionary : IReadOnlyDictionary, IIsAReadOnlyDictionary { } - public abstract class IsAReadOnlyDictionaryBase : IIsAReadOnlyDictionary +public abstract class IsAReadOnlyDictionaryBase : IIsAReadOnlyDictionary +{ + protected IsAReadOnlyDictionaryBase(IReadOnlyDictionary backingDictionary) { - protected IsAReadOnlyDictionaryBase(IReadOnlyDictionary backingDictionary) - { - if (backingDictionary == null) - return; + if (backingDictionary == null) + return; - var dictionary = new Dictionary(backingDictionary.Count); - foreach (var key in backingDictionary.Keys) - // ReSharper disable once VirtualMemberCallInConstructor - // expect all implementations of Sanitize to be pure - dictionary[Sanitize(key)] = backingDictionary[key]; + var dictionary = new Dictionary(backingDictionary.Count); + foreach (var key in backingDictionary.Keys) + // ReSharper disable once VirtualMemberCallInConstructor + // expect all implementations of Sanitize to be pure + dictionary[Sanitize(key)] = backingDictionary[key]; - BackingDictionary = dictionary; - } + BackingDictionary = dictionary; + } - public int Count => BackingDictionary.Count; + public int Count => BackingDictionary.Count; - public TValue this[TKey key] => BackingDictionary[key]; + public TValue this[TKey key] => BackingDictionary[key]; - public IEnumerable Keys => BackingDictionary.Keys; + public IEnumerable Keys => BackingDictionary.Keys; - public IEnumerable Values => BackingDictionary.Values; - protected internal IReadOnlyDictionary BackingDictionary { get; } = EmptyReadOnly.Dictionary; + public IEnumerable Values => BackingDictionary.Values; + protected internal IReadOnlyDictionary BackingDictionary { get; } = EmptyReadOnly.Dictionary; - IEnumerator IEnumerable.GetEnumerator() => BackingDictionary.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => BackingDictionary.GetEnumerator(); - IEnumerator> IEnumerable>.GetEnumerator() => - BackingDictionary.GetEnumerator(); + IEnumerator> IEnumerable>.GetEnumerator() => + BackingDictionary.GetEnumerator(); - public bool ContainsKey(TKey key) => BackingDictionary.ContainsKey(key); + public bool ContainsKey(TKey key) => BackingDictionary.ContainsKey(key); - public bool TryGetValue(TKey key, out TValue value) => - BackingDictionary.TryGetValue(key, out value); + public bool TryGetValue(TKey key, out TValue value) => + BackingDictionary.TryGetValue(key, out value); - protected virtual TKey Sanitize(TKey key) => key; - } + protected virtual TKey Sanitize(TKey key) => key; +} - internal static class EmptyReadOnlyExtensions - { - public static IReadOnlyCollection ToReadOnlyCollection(this IEnumerable enumerable) => - enumerable == null ? EmptyReadOnly.Collection : new ReadOnlyCollection(enumerable.ToList()); +internal static class EmptyReadOnlyExtensions +{ + public static IReadOnlyCollection ToReadOnlyCollection(this IEnumerable enumerable) => + enumerable == null ? EmptyReadOnly.Collection : new ReadOnlyCollection(enumerable.ToList()); - public static IReadOnlyCollection ToReadOnlyCollection(this IList enumerable) => - enumerable == null || enumerable.Count == 0 ? EmptyReadOnly.Collection : new ReadOnlyCollection(enumerable); - } + public static IReadOnlyCollection ToReadOnlyCollection(this IList enumerable) => + enumerable == null || enumerable.Count == 0 ? EmptyReadOnly.Collection : new ReadOnlyCollection(enumerable); +} - internal static class EmptyReadOnly - { - public static readonly IReadOnlyCollection Collection = new ReadOnlyCollection(new TElement[0]); - public static readonly IReadOnlyList List = new List(); - } +internal static class EmptyReadOnly +{ + public static readonly IReadOnlyCollection Collection = new ReadOnlyCollection(new TElement[0]); + public static readonly IReadOnlyList List = new List(); +} - internal static class EmptyReadOnly - { - public static readonly IReadOnlyDictionary Dictionary = new ReadOnlyDictionary(new Dictionary(0)); - } +internal static class EmptyReadOnly +{ + public static readonly IReadOnlyDictionary Dictionary = new ReadOnlyDictionary(new Dictionary(0)); } diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs b/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs index 504a242426a..6f8d1596fba 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/DefaultRequestResponseSerializer.cs @@ -45,6 +45,7 @@ public DefaultRequestResponseSerializer(IElasticsearchClientSettings settings) new SelfTwoWaySerializableConverterFactory(settings), new IndicesJsonConverter(settings), new DictionaryConverter(), + new IsADictionaryConverter(), new UnionConverter() }, PropertyNamingPolicy = JsonNamingPolicy.CamelCase diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/DictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/Serialization/DictionaryConverter.cs index 2dfab6a55ad..cc6464f1cfe 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/DictionaryConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/DictionaryConverter.cs @@ -4,166 +4,152 @@ using System; using System.Collections.Generic; -using System.Reflection; using System.Runtime.Serialization; using System.Text.Json; using System.Text.Json.Serialization; -using Elastic.Clients.Elasticsearch.Tasks; -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch; + +internal sealed class DictionaryConverter : JsonConverterFactory { + public override bool CanConvert(Type typeToConvert) + { + if (!typeToConvert.IsGenericType) + return false; + + return typeToConvert.GetGenericTypeDefinition() == typeof(Dictionary<,>); + } - internal sealed class DictionaryConverter : JsonConverterFactory + public override JsonConverter CreateConverter( + Type typeToConvert, + JsonSerializerOptions options) { - public override bool CanConvert(Type typeToConvert) - { - if (!typeToConvert.IsGenericType) - return false; + var args = typeToConvert.GetGenericArguments(); + + var keyType = args[0]; + var valueType = args[1]; - return typeToConvert.GetGenericTypeDefinition() == typeof(Dictionary<,>); - // TODO - This works for serialisation but not for deserialisation - //& typeToConvert.GetGenericArguments()[0].GetInterfaces().Any(x => x.UnderlyingSystemType == typeof(IDictionaryKey)); + if (keyType.IsClass) + { + return (JsonConverter)Activator.CreateInstance( + typeof(DictionaryConverterInner<,>).MakeGenericType(keyType, valueType)); } - public override JsonConverter CreateConverter( - Type type, + return null; + } + + private class DictionaryConverterInner : JsonConverter> where TKey : class + { + private readonly JsonConverter? _valueConverter = null; + private readonly Type _valueType; + + public DictionaryConverterInner() => _valueType = typeof(TValue); + + public override Dictionary Read( + ref Utf8JsonReader reader, + Type typeToConvert, JsonSerializerOptions options) { - var keyType = type.GetGenericArguments()[0]; - var valueType = type.GetGenericArguments()[1]; - - if (keyType.IsClass) + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + var dictionary = new Dictionary(); + while (reader.Read()) { - return (JsonConverter)Activator.CreateInstance( - typeof(DictionaryConverterInner<,>).MakeGenericType(keyType, valueType), - BindingFlags.Instance | BindingFlags.Public, - null, - new object[] { options }, - null); - } + if (reader.TokenType == JsonTokenType.EndObject) + return dictionary; - return null; - } + // Get the key. + if (reader.TokenType != JsonTokenType.PropertyName) + throw new JsonException(); - private class DictionaryConverterInner : JsonConverter> where TKey : class - { - private readonly Type _keyType; - private readonly JsonConverter? _valueConverter = null; - private readonly Type _valueType; + var keyValue = reader.GetString(); - public DictionaryConverterInner(JsonSerializerOptions options) - { - // For performance, use the existing converter if available. - //_valueConverter = (JsonConverter)options - // .GetConverter(typeof(TValue)); + if (keyValue is null) + throw new JsonException("Key was null."); - // Cache the key and value types. - _keyType = typeof(TKey); - _valueType = typeof(TValue); - } + // TODO: This is all very basic + TKey key; - public override Dictionary Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException(); - var dictionary = new Dictionary(); - while (reader.Read()) + if (typeof(TKey) == typeof(string)) + { + key = (TKey)Activator.CreateInstance(typeof(string), keyValue.ToCharArray()); + } + else if (typeof(TKey) == typeof(IndexName)) + { + key = IndexName.Parse(keyValue) as TKey; + } + else if (typeof(TKey) == typeof(Field)) + { + key = new Field(keyValue) as TKey; + } + else if (typeof(TKey) == typeof(TaskId)) + { + key = new TaskId(keyValue) as TKey; + } + else if (typeof(TKey) == typeof(PropertyName)) + { + key = new PropertyName(keyValue) as TKey; + } + else + { + throw new JsonException("Unsupported dictionary key"); + //key = (TKey)Activator.CreateInstance(typeof(TKey), + // BindingFlags.Instance, + // null, + // new object[] { propertyName }, + // null); + } + + // Get the value. + TValue value; + if (_valueConverter != null) { - if (reader.TokenType == JsonTokenType.EndObject) - return dictionary; - - // Get the key. - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException(); - - var keyValue = reader.GetString(); - - if (keyValue is null) - throw new JsonException("Key was null."); - - // TODO: This is all very basic - TKey key; - - if (typeof(TKey) == typeof(string)) - { - key = (TKey)Activator.CreateInstance(typeof(string), keyValue.ToCharArray()); - } - else if (typeof(TKey) == typeof(IndexName)) - { - key = IndexName.Parse(keyValue) as TKey; - } - else if (typeof(TKey) == typeof(Field)) - { - key = new Field(keyValue) as TKey; - } - else if (typeof(TKey) == typeof(TaskId)) - { - key = new TaskId(keyValue) as TKey; - } - else - { - throw new JsonException("Unsupported dictionary key"); - //key = (TKey)Activator.CreateInstance(typeof(TKey), - // BindingFlags.Instance, - // null, - // new object[] { propertyName }, - // null); - } - - // Get the value. - TValue value; - if (_valueConverter != null) - { - reader.Read(); - value = _valueConverter.Read(ref reader, _valueType, options); - } - else - value = JsonSerializer.Deserialize(ref reader, options); - - // Add to dictionary. - dictionary.Add(key, value); + reader.Read(); + value = _valueConverter.Read(ref reader, _valueType, options); } + else + value = JsonSerializer.Deserialize(ref reader, options); - return dictionary; + // Add to dictionary. + dictionary.Add(key, value); } - public override void Write( - Utf8JsonWriter writer, - Dictionary dictionary, - JsonSerializerOptions options) + return dictionary; + } + + public override void Write( + Utf8JsonWriter writer, + Dictionary dictionary, + JsonSerializerOptions options) + { + writer.WriteStartObject(); + + foreach (var item in dictionary) { - writer.WriteStartObject(); + if (item.Key is null) + throw new SerializationException("Null key"); - foreach (var item in dictionary) + var propertyName = item.Key switch { - if (item.Key is null) - throw new SerializationException("Null key"); - - var propertyName = item.Key switch - { - string stringKey => stringKey, - IDictionaryKey key => key.Key, - _ => throw new SerializationException("Must implement IDictionaryKey") - }; - - writer.WritePropertyName - (options.PropertyNamingPolicy?.ConvertName(propertyName) ?? propertyName); - - if (item.Value is null) - { - writer.WriteNullValue(); - } - else if (_valueConverter != null) - _valueConverter.Write(writer, item.Value, options); - else - JsonSerializer.Serialize(writer, item.Value, item.Value.GetType(), options); - } + string stringKey => stringKey, + IDictionaryKey key => key.Key, + _ => throw new SerializationException("Must implement IDictionaryKey") + }; + + writer.WritePropertyName + (options.PropertyNamingPolicy?.ConvertName(propertyName) ?? propertyName); - writer.WriteEndObject(); + if (item.Value is null) + { + writer.WriteNullValue(); + } + else if (_valueConverter != null) + _valueConverter.Write(writer, item.Value, options); + else + JsonSerializer.Serialize(writer, item.Value, item.Value.GetType(), options); } + + writer.WriteEndObject(); } } } diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/IsADictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/Serialization/IsADictionaryConverter.cs index a5fdc6dd61b..d2ad6c5d1c8 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/IsADictionaryConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/IsADictionaryConverter.cs @@ -6,24 +6,52 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -using Elastic.Clients.Elasticsearch.Aggregations; +using Elastic.Clients.Elasticsearch.Mapping; -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch; + +// TODO : We need to handle these cases https://github.com/elastic/elasticsearch-specification/pull/1589 + +internal sealed class IsADictionaryConverter : JsonConverterFactory { - internal sealed class IsADictionaryConverter : JsonConverter where T : IsADictionaryBase + public override bool CanConvert(Type typeToConvert) => + typeToConvert.BaseType is not null && + typeToConvert.BaseType.IsGenericType && + typeToConvert.BaseType.GetGenericTypeDefinition() == typeof(IsADictionaryBase<,>); + + public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) + { + var args = typeToConvert.BaseType.GetGenericArguments(); + + var keyType = args[0]; + var valueType = args[1]; + + if (keyType.IsClass) + { + return (JsonConverter)Activator.CreateInstance( + typeof(IsADictionaryConverterInner<,,>).MakeGenericType(typeToConvert, keyType, valueType)); + } + + return null; + } + + private class IsADictionaryConverterInner : JsonConverter + where TKey : class + where TType : IsADictionaryBase, new() { - public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => throw new NotImplementedException(); - public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) + public override TType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - writer.WriteStartObject(); + var dictionary = JsonSerializer.Deserialize>(ref reader, options); - foreach (var item in value) - { - writer.WritePropertyName(item.Key); - JsonSerializer.Serialize(writer, item.Value, item.Value.GetType(), options); - } + if (dictionary is null) + return null; - writer.WriteEndObject(); + return (TType)Activator.CreateInstance(typeof(TType), new object[] { dictionary }); } + + public override void Write(Utf8JsonWriter writer, TType value, JsonSerializerOptions options) => + JsonSerializer.Serialize>(writer, value.BackingDictionary, options); } } + + diff --git a/src/Elastic.Clients.Elasticsearch/Types/Mapping/Properties.cs b/src/Elastic.Clients.Elasticsearch/Types/Mapping/Properties.cs new file mode 100644 index 00000000000..3e4048d20f0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Mapping/Properties.cs @@ -0,0 +1,20 @@ +// 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. + +namespace Elastic.Clients.Elasticsearch.Mapping; + +public partial class Properties +{ + public bool TryGetProperty(PropertyName propertyName, out T property) where T : PropertyBase + { + if (BackingDictionary.TryGetValue(propertyName, out var propertyBase) && propertyBase is T finalProperty) + { + property = finalProperty; + return true; + } + + property = default; + return false; + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Mapping/PropertyBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Mapping/PropertyBase.cs new file mode 100644 index 00000000000..024685eb8d7 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Mapping/PropertyBase.cs @@ -0,0 +1,60 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Mapping; + +[JsonConverter(typeof(PropertyInterfaceConverter))] +public partial interface IProperty +{ +} + +// FUTURE GENERATED +internal sealed partial class PropertyInterfaceConverter : JsonConverter +{ + public override IProperty? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var copiedReader = reader; + + string? type = null; + + using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); + + if (jsonDoc is not null) + { + var root = jsonDoc.RootElement; + + if (root.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) + { + type = readType.ToString(); + } + } + + // object is the default when no type is specified in the property object + if (type is null) + return JsonSerializer.Deserialize(ref reader, options); + + return DeserializeVariant(type, ref reader, options); + } + + public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerializerOptions options) => throw new NotImplementedException(); + + //private static PropertyBase DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + //{ + // switch (type) + // { + // case "text": + // return JsonSerializer.Deserialize(ref reader, options); + + // case "ip": + // return JsonSerializer.Deserialize(ref reader, options); + + // default: + // throw new JsonException("Encounted an unknown property type which could not be deserialised."); + // } + //} +} diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs index eb05c61c9dc..dfdb20aba13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -85,6 +85,7 @@ internal static class ApiUrlsLookups internal static ApiUrls IndexManagementOpen = new ApiUrls(new[] { "/{index}/_open" }); internal static ApiUrls IndexManagementPromoteDataStream = new ApiUrls(new[] { "/_data_stream/_promote/{name}" }); internal static ApiUrls IndexManagementPutAlias = new ApiUrls(new[] { "/{index}/_alias/{name}" }); + internal static ApiUrls IndexManagementPutMapping = new ApiUrls(new[] { "/{index}/_mapping" }); internal static ApiUrls IndexManagementRefresh = new ApiUrls(new[] { "/_refresh", "/{index}/_refresh" }); internal static ApiUrls IndexManagementShrink = new ApiUrls(new[] { "/{index}/_shrink/{target}" }); internal static ApiUrls IndexManagementSplit = new ApiUrls(new[] { "/{index}/_split/{target}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs new file mode 100644 index 00000000000..43a28b25660 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -0,0 +1,686 @@ +// 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. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.IndexManagement +{ + public class PutMappingRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public bool? WriteIndexOnly { get => Q("write_index_only"); set => Q("write_index_only", value); } + } + + public partial class PutMappingRequest : PlainRequestBase + { + public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPutMapping; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public bool? WriteIndexOnly { get => Q("write_index_only"); set => Q("write_index_only", value); } + + [JsonInclude] + [JsonPropertyName("date_detection")] + public bool? DateDetection { get; set; } + + [JsonInclude] + [JsonPropertyName("dynamic")] + public Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? Dynamic { get; set; } + + [JsonInclude] + [JsonPropertyName("dynamic_date_formats")] + public IEnumerable? DynamicDateFormats { get; set; } + + [JsonInclude] + [JsonPropertyName("dynamic_templates")] + public Union?, IEnumerable>?>? DynamicTemplates { get; set; } + + [JsonInclude] + [JsonPropertyName("_field_names")] + public Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNames { get; set; } + + [JsonInclude] + [JsonPropertyName("_meta")] + public Dictionary? Meta { get; set; } + + [JsonInclude] + [JsonPropertyName("numeric_detection")] + public bool? NumericDetection { get; set; } + + [JsonInclude] + [JsonPropertyName("properties")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + + [JsonInclude] + [JsonPropertyName("_routing")] + public Elastic.Clients.Elasticsearch.Mapping.RoutingField? Routing { get; set; } + + [JsonInclude] + [JsonPropertyName("_source")] + public Elastic.Clients.Elasticsearch.Mapping.SourceField? Source { get; set; } + + [JsonInclude] + [JsonPropertyName("runtime")] + public Dictionary>? Runtime { get; set; } + } + + public sealed partial class PutMappingRequestDescriptor : RequestDescriptorBase, PutMappingRequestParameters> + { + internal PutMappingRequestDescriptor(Action> configure) => configure.Invoke(this); + public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal PutMappingRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPutMapping; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public PutMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public PutMappingRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public PutMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public PutMappingRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public PutMappingRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public PutMappingRequestDescriptor WriteIndexOnly(bool? writeIndexOnly = true) => Qs("write_index_only", writeIndexOnly); + public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + private Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNamesValue { get; set; } + + private Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } + + private Action FieldNamesDescriptorAction { get; set; } + + private Dictionary? MetaValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } + + private Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } + + private Action RoutingDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.SourceField? SourceValue { get; set; } + + private Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } + + private Action SourceDescriptorAction { get; set; } + + private bool? DateDetectionValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + + private IEnumerable? DynamicDateFormatsValue { get; set; } + + private Union?, IEnumerable>?>? DynamicTemplatesValue { get; set; } + + private bool? NumericDetectionValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + + private Dictionary>? RuntimeValue { get; set; } + + public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) + { + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; + return Self; + } + + public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) + { + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor FieldNames(Action configure) + { + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptorAction = configure; + return Self; + } + + public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) + { + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; + return Self; + } + + public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Routing(Action configure) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptorAction = configure; + return Self; + } + + public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptorAction = configure; + return Self; + } + + public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) + { + DateDetectionValue = dateDetection; + return Self; + } + + public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public PutMappingRequestDescriptor DynamicDateFormats(IEnumerable? dynamicDateFormats) + { + DynamicDateFormatsValue = dynamicDateFormats; + return Self; + } + + public PutMappingRequestDescriptor DynamicTemplates(Union?, IEnumerable>?>? dynamicTemplates) + { + DynamicTemplatesValue = dynamicTemplates; + return Self; + } + + public PutMappingRequestDescriptor NumericDetection(bool? numericDetection = true) + { + NumericDetectionValue = numericDetection; + return Self; + } + + public PutMappingRequestDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public PutMappingRequestDescriptor Runtime(Func>, FluentDictionary>> selector) + { + RuntimeValue = selector?.Invoke(new FluentDictionary>()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FieldNamesDescriptor is not null) + { + writer.WritePropertyName("_field_names"); + JsonSerializer.Serialize(writer, FieldNamesDescriptor, options); + } + else if (FieldNamesDescriptorAction is not null) + { + writer.WritePropertyName("_field_names"); + JsonSerializer.Serialize(writer, new Mapping.FieldNamesFieldDescriptor(FieldNamesDescriptorAction), options); + } + else if (FieldNamesValue is not null) + { + writer.WritePropertyName("_field_names"); + JsonSerializer.Serialize(writer, FieldNamesValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (RoutingDescriptor is not null) + { + writer.WritePropertyName("_routing"); + JsonSerializer.Serialize(writer, RoutingDescriptor, options); + } + else if (RoutingDescriptorAction is not null) + { + writer.WritePropertyName("_routing"); + JsonSerializer.Serialize(writer, new Mapping.RoutingFieldDescriptor(RoutingDescriptorAction), options); + } + else if (RoutingValue is not null) + { + writer.WritePropertyName("_routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SourceDescriptor is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, new Mapping.SourceFieldDescriptor(SourceDescriptorAction), options); + } + else if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); + } + + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class PutMappingRequestDescriptor : RequestDescriptorBase + { + internal PutMappingRequestDescriptor(Action configure) => configure.Invoke(this); + public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal PutMappingRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPutMapping; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public PutMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public PutMappingRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public PutMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public PutMappingRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public PutMappingRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public PutMappingRequestDescriptor WriteIndexOnly(bool? writeIndexOnly = true) => Qs("write_index_only", writeIndexOnly); + public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + private Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNamesValue { get; set; } + + private Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } + + private Action FieldNamesDescriptorAction { get; set; } + + private Dictionary? MetaValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } + + private Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } + + private Action RoutingDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.SourceField? SourceValue { get; set; } + + private Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } + + private Action SourceDescriptorAction { get; set; } + + private bool? DateDetectionValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + + private IEnumerable? DynamicDateFormatsValue { get; set; } + + private Union?, IEnumerable>?>? DynamicTemplatesValue { get; set; } + + private bool? NumericDetectionValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + + private Dictionary>? RuntimeValue { get; set; } + + public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) + { + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; + return Self; + } + + public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) + { + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor FieldNames(Action configure) + { + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptorAction = configure; + return Self; + } + + public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) + { + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; + return Self; + } + + public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Routing(Action configure) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptorAction = configure; + return Self; + } + + public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptorAction = configure; + return Self; + } + + public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) + { + DateDetectionValue = dateDetection; + return Self; + } + + public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public PutMappingRequestDescriptor DynamicDateFormats(IEnumerable? dynamicDateFormats) + { + DynamicDateFormatsValue = dynamicDateFormats; + return Self; + } + + public PutMappingRequestDescriptor DynamicTemplates(Union?, IEnumerable>?>? dynamicTemplates) + { + DynamicTemplatesValue = dynamicTemplates; + return Self; + } + + public PutMappingRequestDescriptor NumericDetection(bool? numericDetection = true) + { + NumericDetectionValue = numericDetection; + return Self; + } + + public PutMappingRequestDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public PutMappingRequestDescriptor Runtime(Func>, FluentDictionary>> selector) + { + RuntimeValue = selector?.Invoke(new FluentDictionary>()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FieldNamesDescriptor is not null) + { + writer.WritePropertyName("_field_names"); + JsonSerializer.Serialize(writer, FieldNamesDescriptor, options); + } + else if (FieldNamesDescriptorAction is not null) + { + writer.WritePropertyName("_field_names"); + JsonSerializer.Serialize(writer, new Mapping.FieldNamesFieldDescriptor(FieldNamesDescriptorAction), options); + } + else if (FieldNamesValue is not null) + { + writer.WritePropertyName("_field_names"); + JsonSerializer.Serialize(writer, FieldNamesValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (RoutingDescriptor is not null) + { + writer.WritePropertyName("_routing"); + JsonSerializer.Serialize(writer, RoutingDescriptor, options); + } + else if (RoutingDescriptorAction is not null) + { + writer.WritePropertyName("_routing"); + JsonSerializer.Serialize(writer, new Mapping.RoutingFieldDescriptor(RoutingDescriptorAction), options); + } + else if (RoutingValue is not null) + { + writer.WritePropertyName("_routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SourceDescriptor is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, new Mapping.SourceFieldDescriptor(SourceDescriptorAction), options); + } + else if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); + } + + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingResponse.g.cs new file mode 100644 index 00000000000..7cddb752452 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingResponse.g.cs @@ -0,0 +1,35 @@ +// 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. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.IndexManagement +{ + public partial class PutMappingResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + + [JsonInclude] + [JsonPropertyName("_shards")] + public Elastic.Clients.Elasticsearch.ShardStatistics? Shards { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs index a5276a89f3d..bf977c1beb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs @@ -392,6 +392,34 @@ public Task PutAliasAsync(Elastic.Clients.Elasticsearch.Indice return DoRequestAsync(descriptor); } + public PutMappingResponse PutMapping(PutMappingRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task PutMappingAsync(PutMappingRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null) + { + var descriptor = new PutMappingRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task PutMappingAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new PutMappingRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public RefreshResponse Refresh(RefreshRequest request) { request.BeforeRequest(); 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 d7b1db8bbf7..27c47ee2f19 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -18,6 +18,7 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; using System.Text.Json.Serialization; #nullable restore diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs index c2ff3565794..ac4b00a07e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Buckets.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs index 164f66ce745..101e5ac4c1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FieldDateMath.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FieldDateMath.g.cs index 06f41b30984..bc49245b379 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FieldDateMath.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FieldDateMath.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs index 2702585dfd1..fff800a9c6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Percentiles.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsExclude.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsExclude.g.cs index 499c5cfcd8f..73f47727fb1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsExclude.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsExclude.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs index aeb7dafa9c3..b8021140c7b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Aggregations diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs index 3cbace424c5..3344caf64fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs @@ -18,19 +18,67 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public interface IAnalyzersVariant + public partial class Analyzers : IsADictionaryBase { + public Analyzers() + { + } + + public Analyzers(IDictionary container) : base(container) + { + } + + public void Add(string name, IAnalyzer analyzers) => BackingDictionary.Add(name, analyzers); } - public interface IAnalyzers : IIsADictionary + internal sealed partial class AnalyzerInterfaceConverter { + private static IAnalyzer DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + case "dutch": + return JsonSerializer.Deserialize(ref reader, options); + case "snowball": + return JsonSerializer.Deserialize(ref reader, options); + case "kuromoji": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_analyzer": + return JsonSerializer.Deserialize(ref reader, options); + case "whitespace": + return JsonSerializer.Deserialize(ref reader, options); + case "stop": + return JsonSerializer.Deserialize(ref reader, options); + case "standard": + return JsonSerializer.Deserialize(ref reader, options); + case "simple": + return JsonSerializer.Deserialize(ref reader, options); + case "pattern": + return JsonSerializer.Deserialize(ref reader, options); + case "nori": + return JsonSerializer.Deserialize(ref reader, options); + case "language": + return JsonSerializer.Deserialize(ref reader, options); + case "keyword": + return JsonSerializer.Deserialize(ref reader, options); + case "fingerprint": + return JsonSerializer.Deserialize(ref reader, options); + case "custom": + return JsonSerializer.Deserialize(ref reader, options); + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } } - public class Analyzers : IsADictionaryBase + public partial interface IAnalyzer { + public string Type { get; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs index 1650fc076dc..993d100c1c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class AsciiFoldingTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class AsciiFoldingTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("preserve_original")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilter.g.cs index 00383689da4..8af561b1919 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilter.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs index e98d5be0e6e..a888c695b62 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharFilterDefinitions.g.cs @@ -18,19 +18,49 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public interface ICharFilterDefinitionsVariant + public partial class CharFilterDefinitions : IsADictionaryBase { + public CharFilterDefinitions() + { + } + + public CharFilterDefinitions(IDictionary container) : base(container) + { + } + + public void Add(string name, ICharFilterDefinition charfilterdefinitions) => BackingDictionary.Add(name, charfilterdefinitions); } - public interface ICharFilterDefinitions : IIsADictionary + internal sealed partial class CharFilterDefinitionInterfaceConverter { + private static ICharFilterDefinition DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + case "kuromoji_iteration_mark": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_normalizer": + return JsonSerializer.Deserialize(ref reader, options); + case "pattern_replace": + return JsonSerializer.Deserialize(ref reader, options); + case "mapping": + return JsonSerializer.Deserialize(ref reader, options); + case "html_strip": + return JsonSerializer.Deserialize(ref reader, options); + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } } - public class CharFilterDefinitions : IsADictionaryBase + public partial interface ICharFilterDefinition { + public string Type { get; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs index f82ad4c3a1d..bd4d046fd06 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class CharGroupTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class CharGroupTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("max_token_length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs index 3911358b00e..563e401f301 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class CommonGramsTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class CommonGramsTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("common_words")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ConditionTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ConditionTokenFilter.g.cs index fa1373f7268..565e1201fa4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ConditionTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ConditionTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class ConditionTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class ConditionTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("filter")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs index 9bd2a3bc0ea..04e07312aab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class CustomAnalyzer : IAnalyzersVariant + public partial class CustomAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("char_filter")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomNormalizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomNormalizer.g.cs index 5ebf7e88734..2c33676e2fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomNormalizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomNormalizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class CustomNormalizer : INormalizersVariant + public partial class CustomNormalizer : INormalizer { [JsonInclude] [JsonPropertyName("char_filter")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs index fb9dd439740..9faae69f545 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class DelimitedPayloadTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class DelimitedPayloadTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("delimiter")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs index c1cc0c67ed2..fbd015de133 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class DictionaryDecompounderTokenFilter : Analysis.CompoundWordTokenFilterBase, ITokenFilterDefinitionsVariant + public partial class DictionaryDecompounderTokenFilter : Analysis.CompoundWordTokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DutchAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DutchAnalyzer.g.cs index af0d6a82519..361000a4df4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DutchAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DutchAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class DutchAnalyzer : IAnalyzersVariant + public partial class DutchAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("stopwords")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs index 2fe3ffb8a4d..479d208e90c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class EdgeNGramTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class EdgeNGramTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("max_gram")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs index b378eff3d8b..9ca6c5ef4e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class EdgeNGramTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class EdgeNGramTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("custom_token_chars")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs index 575f8c575a6..0aebd63f811 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class ElisionTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class ElisionTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("articles")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs index 837f368f098..a2e87f10733 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class FingerprintAnalyzer : IAnalyzersVariant + public partial class FingerprintAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("max_output_size")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs index e2b0e40b841..46276bd7f95 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class FingerprintTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class FingerprintTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("max_output_size")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs index 02210621443..dba61e7ed91 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class HtmlStripCharFilter : Analysis.CharFilterBase, ICharFilterDefinitionsVariant + public partial class HtmlStripCharFilter : Analysis.CharFilterBase, ICharFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs index a4788085c65..0036cff964b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class HunspellTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class HunspellTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("dedup")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs index b45482c6d85..f5c72159231 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class HyphenationDecompounderTokenFilter : Analysis.CompoundWordTokenFilterBase, ITokenFilterDefinitionsVariant + public partial class HyphenationDecompounderTokenFilter : Analysis.CompoundWordTokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuAnalyzer.g.cs index 82f4fb5bf48..79228998005 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuAnalyzer : IAnalyzersVariant + public partial class IcuAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("method")] 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 d531dc40bf4..22a55cbd781 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuCollationTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class IcuCollationTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("alternate")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs index 8c05c5b6197..6b6f770d079 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuFoldingTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class IcuFoldingTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs index 93fbadf1af4..134c574dfc5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuNormalizationCharFilter : Analysis.CharFilterBase, ICharFilterDefinitionsVariant + public partial class IcuNormalizationCharFilter : Analysis.CharFilterBase, ICharFilterDefinition { [JsonInclude] [JsonPropertyName("mode")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs index 55de323d20d..68fdffafc98 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuNormalizationTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class IcuNormalizationTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("name")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTokenizer.g.cs index b8e649133ef..5ee9d1b1323 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuTokenizer : Analysis.TokenizerBase, ITokenFilterDefinitionsVariant, ITokenizerDefinitionsVariant + public partial class IcuTokenizer : Analysis.TokenizerBase, ITokenFilterDefinition, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("rule_files")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs index 13037c4fbe4..30f99193f75 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class IcuTransformTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class IcuTransformTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("dir")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KStemTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KStemTokenFilter.g.cs index 9805df0786f..bc8b5ad6c25 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KStemTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KStemTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KStemTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KStemTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs index 484e9a8f777..bdc896d2dbb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KeepTypesTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KeepTypesTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("mode")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs index 8ae48eace55..a8bfceb9988 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KeepWordsTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KeepWordsTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("keep_words")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs index e7e415a537a..e47d3cbb8e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KeywordAnalyzer : IAnalyzersVariant + public partial class KeywordAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs index bf517b2c426..28e372868d3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KeywordMarkerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KeywordMarkerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("ignore_case")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs index 9f8ef89aa21..21cd1e25b51 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KeywordTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class KeywordTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("buffer_size")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs index bdd67ffcf18..216a712f178 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KuromojiAnalyzer : IAnalyzersVariant + public partial class KuromojiAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("mode")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs index b907860ba3b..581164e0d64 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KuromojiIterationMarkCharFilter : Analysis.CharFilterBase, ICharFilterDefinitionsVariant + public partial class KuromojiIterationMarkCharFilter : Analysis.CharFilterBase, ICharFilterDefinition { [JsonInclude] [JsonPropertyName("normalize_kana")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs index ea34d8d43e5..917b4e8a407 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KuromojiPartOfSpeechTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KuromojiPartOfSpeechTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("stoptags")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs index aad4f62ebfa..e596e124903 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KuromojiReadingFormTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KuromojiReadingFormTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs index 561adf739d7..84f2b93727c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KuromojiStemmerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class KuromojiStemmerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("minimum_length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs index a8ffe32cb34..28f5253d042 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class KuromojiTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class KuromojiTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("discard_compound_token")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LanguageAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LanguageAnalyzer.g.cs index dd8998ea926..5d27e7c31a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LanguageAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LanguageAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LanguageAnalyzer : IAnalyzersVariant + public partial class LanguageAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("language")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs index 0d36fd76834..7a5356860f8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LengthTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class LengthTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("max")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LetterTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LetterTokenizer.g.cs index 1fbcf30fe83..3bc3b12ed64 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LetterTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LetterTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LetterTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class LetterTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs index fe91f36aaba..1cf3f97eca7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LimitTokenCountTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class LimitTokenCountTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("consume_all_tokens")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseNormalizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseNormalizer.g.cs index df246c1a138..905dbdd9354 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseNormalizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseNormalizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LowercaseNormalizer : INormalizersVariant + public partial class LowercaseNormalizer : INormalizer { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs index a3627ae798f..a602902e344 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LowercaseTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class LowercaseTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("language")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenizer.g.cs index 63ec455165c..67ed50f358f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class LowercaseTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class LowercaseTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MappingCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MappingCharFilter.g.cs index 2f133df0665..e5f87e078ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MappingCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MappingCharFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class MappingCharFilter : Analysis.CharFilterBase, ICharFilterDefinitionsVariant + public partial class MappingCharFilter : Analysis.CharFilterBase, ICharFilterDefinition { [JsonInclude] [JsonPropertyName("mappings")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs index f4fa7da377b..fc7455961f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class MultiplexerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class MultiplexerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("filters")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs index a5a9b7f8d8b..457884ec9e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class NGramTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class NGramTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("max_gram")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs index 0980d378477..ad54426808b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class NGramTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class NGramTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("custom_token_chars")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs index 1256ceffbd2..af7f4b4b374 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class NoriAnalyzer : IAnalyzersVariant + public partial class NoriAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("decompound_mode")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs index 2d3cadfef28..45021b64641 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class NoriPartOfSpeechTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class NoriPartOfSpeechTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("stoptags")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs index 5bff3a5adc5..ed0de23f926 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class NoriTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class NoriTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("decompound_mode")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs index be131ae8751..426a30959e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Normalizers.g.cs @@ -18,19 +18,43 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public interface INormalizersVariant + public partial class Normalizers : IsADictionaryBase { + public Normalizers() + { + } + + public Normalizers(IDictionary container) : base(container) + { + } + + public void Add(string name, INormalizer normalizers) => BackingDictionary.Add(name, normalizers); } - public interface INormalizers : IIsADictionary + internal sealed partial class NormalizerInterfaceConverter { + private static INormalizer DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + case "custom": + return JsonSerializer.Deserialize(ref reader, options); + case "lowercase": + return JsonSerializer.Deserialize(ref reader, options); + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } } - public class Normalizers : IsADictionaryBase + public partial interface INormalizer { + public string Type { get; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs index 543cd3b9e84..6d9a13ec37b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PathHierarchyTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class PathHierarchyTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("buffer_size")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs index 2d939af7c75..de8394033d0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PatternAnalyzer : IAnalyzersVariant + public partial class PatternAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("flags")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs index 8413371814c..bf2e97df0f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PatternCaptureTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class PatternCaptureTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("patterns")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs index b6dc1334bef..f6807b2b9da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PatternReplaceCharFilter : Analysis.CharFilterBase, ICharFilterDefinitionsVariant + public partial class PatternReplaceCharFilter : Analysis.CharFilterBase, ICharFilterDefinition { [JsonInclude] [JsonPropertyName("flags")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs index bc83908d1b5..d0739f2960e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PatternReplaceTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class PatternReplaceTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("flags")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs index 9abc64e6631..a7de43423da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PatternTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class PatternTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("flags")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs index e7f127596df..a7c8238eb58 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PhoneticTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class PhoneticTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("encoder")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs index 762dd436c21..fff8b869c5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PorterStemTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class PorterStemTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PredicateTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PredicateTokenFilter.g.cs index bba2a56806d..f5a71b35d1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PredicateTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PredicateTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class PredicateTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class PredicateTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("script")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs index 78c21d3bd31..b597efff185 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class RemoveDuplicatesTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class RemoveDuplicatesTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ReverseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ReverseTokenFilter.g.cs index c7830885185..3d9a3b74813 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ReverseTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ReverseTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class ReverseTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class ReverseTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs index 1bddf3ead74..3b6f785d8f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class ShingleTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class ShingleTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("filler_token")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs index a8c5354b6d3..8b4fb224e58 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class SimpleAnalyzer : IAnalyzersVariant + public partial class SimpleAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs index 4a0c2aaffaf..7e16bcb2747 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class SnowballAnalyzer : IAnalyzersVariant + public partial class SnowballAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("language")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs index c4bda602dbe..3e83b5ca3bd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class SnowballTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class SnowballTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("language")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs index 39ff93f64fe..2dda7742e6b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class StandardAnalyzer : IAnalyzersVariant + public partial class StandardAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("max_token_length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs index 283336e0496..528c732d96a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class StandardTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class StandardTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("max_token_length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs index 8de50915b0c..4fe44c101a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class StemmerOverrideTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class StemmerOverrideTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("rules")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerTokenFilter.g.cs index 1eac9ba4f1f..7c2047e3942 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StemmerTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class StemmerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class StemmerTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("language")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs index 04d166405f2..07f7c4d655a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class StopAnalyzer : IAnalyzersVariant + public partial class StopAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("stopwords")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs index 5cf9784ddf5..a74afe619f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class StopTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class StopTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("ignore_case")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopWords.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopWords.g.cs index ec54bbecfb7..b0633d67cfd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopWords.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopWords.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs index b40ceb9721c..23fb9d68105 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class SynonymGraphTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class SynonymGraphTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("expand")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs index 0d8bc392450..fb8e21cda89 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class SynonymTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class SynonymTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("expand")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilter.g.cs index 63346c0ccc2..f34b593c65c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilter.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs index aa76a075b8d..8a5cebe6a77 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenFilterDefinitions.g.cs @@ -18,19 +18,135 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public interface ITokenFilterDefinitionsVariant + public partial class TokenFilterDefinitions : IsADictionaryBase { + public TokenFilterDefinitions() + { + } + + public TokenFilterDefinitions(IDictionary container) : base(container) + { + } + + public void Add(string name, ITokenFilterDefinition tokenfilterdefinitions) => BackingDictionary.Add(name, tokenfilterdefinitions); } - public interface ITokenFilterDefinitions : IIsADictionary + internal sealed partial class TokenFilterDefinitionInterfaceConverter { + private static ITokenFilterDefinition DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + case "dictionary_decompounder": + return JsonSerializer.Deserialize(ref reader, options); + case "phonetic": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_transform": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_normalizer": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_folding": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_collation": + return JsonSerializer.Deserialize(ref reader, options); + case "icu_tokenizer": + return JsonSerializer.Deserialize(ref reader, options); + case "kuromoji_part_of_speech": + return JsonSerializer.Deserialize(ref reader, options); + case "kuromoji_readingform": + return JsonSerializer.Deserialize(ref reader, options); + case "kuromoji_stemmer": + return JsonSerializer.Deserialize(ref reader, options); + case "word_delimiter": + return JsonSerializer.Deserialize(ref reader, options); + case "word_delimiter_graph": + return JsonSerializer.Deserialize(ref reader, options); + case "uppercase": + return JsonSerializer.Deserialize(ref reader, options); + case "unique": + return JsonSerializer.Deserialize(ref reader, options); + case "truncate": + return JsonSerializer.Deserialize(ref reader, options); + case "trim": + return JsonSerializer.Deserialize(ref reader, options); + case "synonym": + return JsonSerializer.Deserialize(ref reader, options); + case "synonym_graph": + return JsonSerializer.Deserialize(ref reader, options); + case "stop": + return JsonSerializer.Deserialize(ref reader, options); + case "stemmer": + return JsonSerializer.Deserialize(ref reader, options); + case "stemmer_override": + return JsonSerializer.Deserialize(ref reader, options); + case "snowball": + return JsonSerializer.Deserialize(ref reader, options); + case "shingle": + return JsonSerializer.Deserialize(ref reader, options); + case "reverse": + return JsonSerializer.Deserialize(ref reader, options); + case "remove_duplicates": + return JsonSerializer.Deserialize(ref reader, options); + case "predicate_token_filter": + return JsonSerializer.Deserialize(ref reader, options); + case "porter_stem": + return JsonSerializer.Deserialize(ref reader, options); + case "pattern_replace": + return JsonSerializer.Deserialize(ref reader, options); + case "pattern_capture": + return JsonSerializer.Deserialize(ref reader, options); + case "nori_part_of_speech": + return JsonSerializer.Deserialize(ref reader, options); + case "ngram": + return JsonSerializer.Deserialize(ref reader, options); + case "multiplexer": + return JsonSerializer.Deserialize(ref reader, options); + case "lowercase": + return JsonSerializer.Deserialize(ref reader, options); + case "limit": + return JsonSerializer.Deserialize(ref reader, options); + case "length": + return JsonSerializer.Deserialize(ref reader, options); + case "kstem": + return JsonSerializer.Deserialize(ref reader, options); + case "keyword_marker": + return JsonSerializer.Deserialize(ref reader, options); + case "keep": + return JsonSerializer.Deserialize(ref reader, options); + case "keep_types": + return JsonSerializer.Deserialize(ref reader, options); + case "hyphenation_decompounder": + return JsonSerializer.Deserialize(ref reader, options); + case "hunspell": + return JsonSerializer.Deserialize(ref reader, options); + case "fingerprint": + return JsonSerializer.Deserialize(ref reader, options); + case "elision": + return JsonSerializer.Deserialize(ref reader, options); + case "edge_ngram": + return JsonSerializer.Deserialize(ref reader, options); + case "delimited_payload": + return JsonSerializer.Deserialize(ref reader, options); + case "condition": + return JsonSerializer.Deserialize(ref reader, options); + case "common_grams": + return JsonSerializer.Deserialize(ref reader, options); + case "asciifolding": + return JsonSerializer.Deserialize(ref reader, options); + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } } - public class TokenFilterDefinitions : IsADictionaryBase + public partial interface ITokenFilterDefinition { + public string Type { get; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizer.g.cs index dccee5bdf2e..b4acd98484d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizer.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs index ab6e9f4a8d0..570dac3594c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TokenizerDefinitions.g.cs @@ -18,19 +18,67 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public interface ITokenizerDefinitionsVariant + public partial class TokenizerDefinitions : IsADictionaryBase { + public TokenizerDefinitions() + { + } + + public TokenizerDefinitions(IDictionary container) : base(container) + { + } + + public void Add(string name, ITokenizerDefinition tokenizerdefinitions) => BackingDictionary.Add(name, tokenizerdefinitions); } - public interface ITokenizerDefinitions : IIsADictionary + internal sealed partial class TokenizerDefinitionInterfaceConverter { + private static ITokenizerDefinition DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + case "icu_tokenizer": + return JsonSerializer.Deserialize(ref reader, options); + case "pattern": + return JsonSerializer.Deserialize(ref reader, options); + case "kuromoji_tokenizer": + return JsonSerializer.Deserialize(ref reader, options); + case "whitespace": + return JsonSerializer.Deserialize(ref reader, options); + case "uax_url_email": + return JsonSerializer.Deserialize(ref reader, options); + case "standard": + return JsonSerializer.Deserialize(ref reader, options); + case "path_hierarchy": + return JsonSerializer.Deserialize(ref reader, options); + case "nori_tokenizer": + return JsonSerializer.Deserialize(ref reader, options); + case "ngram": + return JsonSerializer.Deserialize(ref reader, options); + case "lowercase": + return JsonSerializer.Deserialize(ref reader, options); + case "letter": + return JsonSerializer.Deserialize(ref reader, options); + case "keyword": + return JsonSerializer.Deserialize(ref reader, options); + case "edge_ngram": + return JsonSerializer.Deserialize(ref reader, options); + case "char_group": + return JsonSerializer.Deserialize(ref reader, options); + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } } - public class TokenizerDefinitions : IsADictionaryBase + public partial interface ITokenizerDefinition { + public string Type { get; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TrimTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TrimTokenFilter.g.cs index 88a1593b8e0..e474e17db0d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TrimTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TrimTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class TrimTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class TrimTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs index 9a14314bd47..aeed8655921 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class TruncateTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class TruncateTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs index fd5b24b8c9f..145f6a819a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class UaxEmailUrlTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class UaxEmailUrlTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("max_token_length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs index d72e9006fd4..f03b1256fe1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class UniqueTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class UniqueTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("only_on_same_position")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs index 6826d3a3d8b..04d714298c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class UppercaseTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class UppercaseTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs index 4ab9a1ebd30..0ca08bf4bc2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class WhitespaceAnalyzer : IAnalyzersVariant + public partial class WhitespaceAnalyzer : IAnalyzer { [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs index ad5f2e638b4..6ec5e959b05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class WhitespaceTokenizer : Analysis.TokenizerBase, ITokenizerDefinitionsVariant + public partial class WhitespaceTokenizer : Analysis.TokenizerBase, ITokenizerDefinition { [JsonInclude] [JsonPropertyName("max_token_length")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs index 24a1459f1ed..cfea636c97f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class WordDelimiterGraphTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class WordDelimiterGraphTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("adjust_offsets")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs index 89907fde726..47de41f0d74 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Analysis { - public partial class WordDelimiterTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinitionsVariant + public partial class WordDelimiterTokenFilter : Analysis.TokenFilterBase, ITokenFilterDefinition { [JsonInclude] [JsonPropertyName("catenate_all")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs index 6bb8ca4dec1..e15fdd79e94 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DateOrEpochMillis.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DateOrEpochMillis.g.cs index 37d76e42768..f2a3c537f3c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DateOrEpochMillis.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DateOrEpochMillis.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs index b336929ba95..5c5a2ec6b31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs @@ -185,6 +185,48 @@ public override void Write(Utf8JsonWriter writer, IndexRoutingRebalanceOptions v } } + [JsonConverter(typeof(NumericFielddataFormatConverter))] + public enum NumericFielddataFormat + { + [EnumMember(Value = "disabled")] + Disabled, + [EnumMember(Value = "array")] + Array + } + + internal sealed class NumericFielddataFormatConverter : JsonConverter + { + public override NumericFielddataFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "disabled": + return NumericFielddataFormat.Disabled; + case "array": + return NumericFielddataFormat.Array; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, NumericFielddataFormat value, JsonSerializerOptions options) + { + switch (value) + { + case NumericFielddataFormat.Disabled: + writer.WriteStringValue("disabled"); + return; + case NumericFielddataFormat.Array: + writer.WriteStringValue("array"); + return; + } + + writer.WriteNullValue(); + } + } + [JsonConverter(typeof(SegmentSortMissingConverter))] public enum SegmentSortMissing { @@ -310,4 +352,46 @@ public override void Write(Utf8JsonWriter writer, SegmentSortOrder value, JsonSe writer.WriteNullValue(); } } + + [JsonConverter(typeof(StringFielddataFormatConverter))] + public enum StringFielddataFormat + { + [EnumMember(Value = "paged_bytes")] + PagedBytes, + [EnumMember(Value = "disabled")] + Disabled + } + + internal sealed class StringFielddataFormatConverter : JsonConverter + { + public override StringFielddataFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "paged_bytes": + return StringFielddataFormat.PagedBytes; + case "disabled": + return StringFielddataFormat.Disabled; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, StringFielddataFormat value, JsonSerializerOptions options) + { + switch (value) + { + case StringFielddataFormat.PagedBytes: + writer.WriteStringValue("paged_bytes"); + return; + case StringFielddataFormat.Disabled: + writer.WriteStringValue("disabled"); + return; + } + + writer.WriteNullValue(); + } + } } \ No newline at end of file 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 68c625d8697..e89ff8a0ac2 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 @@ -24,6 +24,286 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Mapping { + [JsonConverter(typeof(DynamicMappingConverter))] + public enum DynamicMapping + { + [EnumMember(Value = "true")] + True, + [EnumMember(Value = "strict")] + Strict, + [EnumMember(Value = "runtime")] + Runtime, + [EnumMember(Value = "false")] + False + } + + internal sealed class DynamicMappingConverter : JsonConverter + { + public override DynamicMapping Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "true": + return DynamicMapping.True; + case "strict": + return DynamicMapping.Strict; + case "runtime": + return DynamicMapping.Runtime; + case "false": + return DynamicMapping.False; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, DynamicMapping value, JsonSerializerOptions options) + { + switch (value) + { + case DynamicMapping.True: + writer.WriteStringValue("true"); + return; + case DynamicMapping.Strict: + writer.WriteStringValue("strict"); + return; + case DynamicMapping.Runtime: + writer.WriteStringValue("runtime"); + return; + case DynamicMapping.False: + writer.WriteStringValue("false"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(GeoOrientationConverter))] + public enum GeoOrientation + { + [EnumMember(Value = "right")] + Right, + [EnumMember(Value = "left")] + Left + } + + internal sealed class GeoOrientationConverter : JsonConverter + { + public override GeoOrientation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "right": + return GeoOrientation.Right; + case "left": + return GeoOrientation.Left; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, GeoOrientation value, JsonSerializerOptions options) + { + switch (value) + { + case GeoOrientation.Right: + writer.WriteStringValue("right"); + return; + case GeoOrientation.Left: + writer.WriteStringValue("left"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(GeoStrategyConverter))] + public enum GeoStrategy + { + [EnumMember(Value = "term")] + Term, + [EnumMember(Value = "recursive")] + Recursive + } + + internal sealed class GeoStrategyConverter : JsonConverter + { + public override GeoStrategy Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "term": + return GeoStrategy.Term; + case "recursive": + return GeoStrategy.Recursive; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, GeoStrategy value, JsonSerializerOptions options) + { + switch (value) + { + case GeoStrategy.Term: + writer.WriteStringValue("term"); + return; + case GeoStrategy.Recursive: + writer.WriteStringValue("recursive"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(IndexOptionsConverter))] + public enum IndexOptions + { + [EnumMember(Value = "positions")] + Positions, + [EnumMember(Value = "offsets")] + Offsets, + [EnumMember(Value = "freqs")] + Freqs, + [EnumMember(Value = "docs")] + Docs + } + + internal sealed class IndexOptionsConverter : JsonConverter + { + public override IndexOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "positions": + return IndexOptions.Positions; + case "offsets": + return IndexOptions.Offsets; + case "freqs": + return IndexOptions.Freqs; + case "docs": + return IndexOptions.Docs; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, IndexOptions value, JsonSerializerOptions options) + { + switch (value) + { + case IndexOptions.Positions: + writer.WriteStringValue("positions"); + return; + case IndexOptions.Offsets: + writer.WriteStringValue("offsets"); + return; + case IndexOptions.Freqs: + writer.WriteStringValue("freqs"); + return; + case IndexOptions.Docs: + writer.WriteStringValue("docs"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(MatchTypeConverter))] + public enum MatchType + { + [EnumMember(Value = "simple")] + Simple, + [EnumMember(Value = "regex")] + Regex + } + + internal sealed class MatchTypeConverter : JsonConverter + { + public override MatchType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "simple": + return MatchType.Simple; + case "regex": + return MatchType.Regex; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, MatchType value, JsonSerializerOptions options) + { + switch (value) + { + case MatchType.Simple: + writer.WriteStringValue("simple"); + return; + case MatchType.Regex: + writer.WriteStringValue("regex"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(OnScriptErrorConverter))] + public enum OnScriptError + { + [EnumMember(Value = "fail")] + Fail, + [EnumMember(Value = "continue")] + Continue + } + + internal sealed class OnScriptErrorConverter : JsonConverter + { + public override OnScriptError Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "fail": + return OnScriptError.Fail; + case "continue": + return OnScriptError.Continue; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, OnScriptError value, JsonSerializerOptions options) + { + switch (value) + { + case OnScriptError.Fail: + writer.WriteStringValue("fail"); + return; + case OnScriptError.Continue: + writer.WriteStringValue("continue"); + return; + } + + writer.WriteNullValue(); + } + } + [JsonConverter(typeof(RuntimeFieldTypeConverter))] public enum RuntimeFieldType { @@ -101,6 +381,83 @@ public override void Write(Utf8JsonWriter writer, RuntimeFieldType value, JsonSe } } + [JsonConverter(typeof(TermVectorOptionConverter))] + public enum TermVectorOption + { + [EnumMember(Value = "yes")] + Yes, + [EnumMember(Value = "with_positions_payloads")] + WithPositionsPayloads, + [EnumMember(Value = "with_positions_offsets_payloads")] + WithPositionsOffsetsPayloads, + [EnumMember(Value = "with_positions_offsets")] + WithPositionsOffsets, + [EnumMember(Value = "with_positions")] + WithPositions, + [EnumMember(Value = "with_offsets")] + WithOffsets, + [EnumMember(Value = "no")] + No + } + + internal sealed class TermVectorOptionConverter : JsonConverter + { + public override TermVectorOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yes": + return TermVectorOption.Yes; + case "with_positions_payloads": + return TermVectorOption.WithPositionsPayloads; + case "with_positions_offsets_payloads": + return TermVectorOption.WithPositionsOffsetsPayloads; + case "with_positions_offsets": + return TermVectorOption.WithPositionsOffsets; + case "with_positions": + return TermVectorOption.WithPositions; + case "with_offsets": + return TermVectorOption.WithOffsets; + case "no": + return TermVectorOption.No; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, TermVectorOption value, JsonSerializerOptions options) + { + switch (value) + { + case TermVectorOption.Yes: + writer.WriteStringValue("yes"); + return; + case TermVectorOption.WithPositionsPayloads: + writer.WriteStringValue("with_positions_payloads"); + return; + case TermVectorOption.WithPositionsOffsetsPayloads: + writer.WriteStringValue("with_positions_offsets_payloads"); + return; + case TermVectorOption.WithPositionsOffsets: + writer.WriteStringValue("with_positions_offsets"); + return; + case TermVectorOption.WithPositions: + writer.WriteStringValue("with_positions"); + return; + case TermVectorOption.WithOffsets: + writer.WriteStringValue("with_offsets"); + return; + case TermVectorOption.No: + writer.WriteStringValue("no"); + return; + } + + writer.WriteNullValue(); + } + } + [JsonConverter(typeof(TimeSeriesMetricTypeConverter))] public enum TimeSeriesMetricType { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ExpandWildcards.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ExpandWildcards.g.cs index 69fd42816f3..43ca546ba3c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ExpandWildcards.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ExpandWildcards.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs index 4399283dbcc..c086ea0bd6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs new file mode 100644 index 00000000000..475052b7eb8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class GeoHashLocation + { + [JsonInclude] + [JsonPropertyName("geohash")] + public string Geohash { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ids.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ids.g.cs index a293413ef19..e59132dbf4a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ids.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ids.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainManaged.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainManaged.g.cs index 5618a3412a3..05c571caa5e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainManaged.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainManaged.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Ilm.ExplainLifecycle { - public partial class LifecycleExplainManaged : ILifecycleExplainsVariant + public partial class LifecycleExplainManaged : ILifecycleExplain { [JsonInclude] [JsonPropertyName("action")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainUnmanaged.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainUnmanaged.g.cs index 091f9e87a35..ca74b949f13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainUnmanaged.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplainUnmanaged.g.cs @@ -24,7 +24,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Ilm.ExplainLifecycle { - public partial class LifecycleExplainUnmanaged : ILifecycleExplainsVariant + public partial class LifecycleExplainUnmanaged : ILifecycleExplain { [JsonInclude] [JsonPropertyName("index")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplains.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplains.g.cs index 835da91e7c6..83db9747366 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplains.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ilm/LifecycleExplains.g.cs @@ -18,19 +18,39 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Ilm.ExplainLifecycle { - public interface ILifecycleExplainsVariant + public partial class LifecycleExplains : IsADictionaryBase { + public LifecycleExplains() + { + } + + public LifecycleExplains(IDictionary container) : base(container) + { + } + + public void Add(string name, ILifecycleExplain lifecycleexplains) => BackingDictionary.Add(name, lifecycleexplains); } - public interface ILifecycleExplains : IIsADictionary + internal sealed partial class LifecycleExplainInterfaceConverter { + private static ILifecycleExplain DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } } - public class LifecycleExplains : IsADictionaryBase + public partial interface ILifecycleExplain { + public bool Managed { get; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs new file mode 100644 index 00000000000..07d8f10b523 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.IndexManagement +{ + public partial class FielddataFrequencyFilter + { + [JsonInclude] + [JsonPropertyName("max")] + public double Max { get; init; } + + [JsonInclude] + [JsonPropertyName("min")] + public double Min { get; init; } + + [JsonInclude] + [JsonPropertyName("min_segment_size")] + public int MinSegmentSize { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/NumericFielddata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/NumericFielddata.g.cs new file mode 100644 index 00000000000..328ddd27c46 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/NumericFielddata.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.IndexManagement +{ + public partial class NumericFielddata + { + [JsonInclude] + [JsonPropertyName("format")] + public Elastic.Clients.Elasticsearch.IndexManagement.NumericFielddataFormat Format { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/StringFielddata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/StringFielddata.g.cs new file mode 100644 index 00000000000..43f995f0930 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/StringFielddata.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.IndexManagement +{ + public partial class StringFielddata + { + [JsonInclude] + [JsonPropertyName("format")] + public Elastic.Clients.Elasticsearch.IndexManagement.StringFielddataFormat Format { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs new file mode 100644 index 00000000000..f2a319ba41c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class LatLonGeoLocation + { + [JsonInclude] + [JsonPropertyName("lat")] + public double Lat { get; init; } + + [JsonInclude] + [JsonPropertyName("lon")] + public double Lon { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs new file mode 100644 index 00000000000..7acfdfc4271 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class AggregateMetricDoubleProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("default_metric")] + public string DefaultMetric { get; init; } + + [JsonInclude] + [JsonPropertyName("metrics")] + public IReadOnlyCollection Metrics { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "aggregate_metric_double"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs new file mode 100644 index 00000000000..51ef81b96e5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class BinaryProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "binary"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs new file mode 100644 index 00000000000..e6297cf8add --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs @@ -0,0 +1,49 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class BooleanProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("fielddata")] + public Elastic.Clients.Elasticsearch.IndexManagement.NumericFielddata? Fielddata { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public bool? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "boolean"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs new file mode 100644 index 00000000000..5aebea42af3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class ByteNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public double? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "byte"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs new file mode 100644 index 00000000000..305e3fdb44b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -0,0 +1,57 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class CompletionProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("analyzer")] + public string? Analyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("contexts")] + public IReadOnlyCollection? Contexts { get; init; } + + [JsonInclude] + [JsonPropertyName("max_input_length")] + public int? MaxInputLength { get; init; } + + [JsonInclude] + [JsonPropertyName("preserve_position_increments")] + public bool? PreservePositionIncrements { get; init; } + + [JsonInclude] + [JsonPropertyName("preserve_separators")] + public bool? PreserveSeparators { get; init; } + + [JsonInclude] + [JsonPropertyName("search_analyzer")] + public string? SearchAnalyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "completion"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs new file mode 100644 index 00000000000..10c66ff3a5f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs @@ -0,0 +1,36 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class ConstantKeywordProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "constant_keyword"; + [JsonInclude] + [JsonPropertyName("value")] + public object? Value { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CoreProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CoreProperty.g.cs new file mode 100644 index 00000000000..6c04c2e1314 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CoreProperty.g.cs @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class CoreProperty + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CorePropertyBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CorePropertyBase.g.cs new file mode 100644 index 00000000000..49c3ac1522f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CorePropertyBase.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public abstract partial class CorePropertyBase : Mapping.PropertyBase + { + [JsonInclude] + [JsonPropertyName("copy_to")] + public Elastic.Clients.Elasticsearch.Fields? CopyTo { get; init; } + + [JsonInclude] + [JsonPropertyName("similarity")] + public string? Similarity { get; init; } + + [JsonInclude] + [JsonPropertyName("store")] + public bool? Store { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs new file mode 100644 index 00000000000..38da4d5a4db --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs @@ -0,0 +1,57 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DateNanosProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("format")] + public string? Format { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("precision_step")] + public int? PrecisionStep { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "date_nanos"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs new file mode 100644 index 00000000000..73d2aab7e21 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs @@ -0,0 +1,65 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DateProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("fielddata")] + public Elastic.Clients.Elasticsearch.IndexManagement.NumericFielddata? Fielddata { get; init; } + + [JsonInclude] + [JsonPropertyName("format")] + public string? Format { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("locale")] + public string? Locale { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("precision_step")] + public int? PrecisionStep { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "date"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs new file mode 100644 index 00000000000..f049643f0a6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DateRangeProperty : Mapping.RangePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("format")] + public string? Format { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "date_range"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs new file mode 100644 index 00000000000..440b4550e0f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DenseVectorIndexOptions + { + [JsonInclude] + [JsonPropertyName("ef_construction")] + public int EfConstruction { get; init; } + + [JsonInclude] + [JsonPropertyName("m")] + public int m { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs new file mode 100644 index 00000000000..0b12fb756fc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs @@ -0,0 +1,49 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DenseVectorProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("dims")] + public int Dims { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions? IndexOptions { get; init; } + + [JsonInclude] + [JsonPropertyName("similarity")] + public string? Similarity { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "dense_vector"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesProperty.g.cs new file mode 100644 index 00000000000..54e225fdafd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesProperty.g.cs @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DocValuesProperty + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesPropertyBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesPropertyBase.g.cs new file mode 100644 index 00000000000..4b28583efdc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DocValuesPropertyBase.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public abstract partial class DocValuesPropertyBase : Mapping.CorePropertyBase + { + [JsonInclude] + [JsonPropertyName("doc_values")] + public bool? DocValues { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs new file mode 100644 index 00000000000..99112f68bdf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DoubleNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public double? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "double"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs new file mode 100644 index 00000000000..b04db4dae7b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DoubleRangeProperty : Mapping.RangePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "double_range"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs new file mode 100644 index 00000000000..c06385df777 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs @@ -0,0 +1,169 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class DynamicTemplate + { + [JsonInclude] + [JsonPropertyName("mapping")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Mapping { get; set; } + + [JsonInclude] + [JsonPropertyName("match")] + public string? Match { get; set; } + + [JsonInclude] + [JsonPropertyName("match_mapping_type")] + public string? MatchMappingType { get; set; } + + [JsonInclude] + [JsonPropertyName("match_pattern")] + public Elastic.Clients.Elasticsearch.Mapping.MatchType? MatchPattern { get; set; } + + [JsonInclude] + [JsonPropertyName("path_match")] + public string? PathMatch { get; set; } + + [JsonInclude] + [JsonPropertyName("path_unmatch")] + public string? PathUnmatch { get; set; } + + [JsonInclude] + [JsonPropertyName("unmatch")] + public string? Unmatch { get; set; } + } + + public sealed partial class DynamicTemplateDescriptor : DescriptorBase + { + internal DynamicTemplateDescriptor(Action configure) => configure.Invoke(this); + public DynamicTemplateDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Mapping.Properties? MappingValue { get; set; } + + private string? MatchValue { get; set; } + + private string? MatchMappingTypeValue { get; set; } + + private Elastic.Clients.Elasticsearch.Mapping.MatchType? MatchPatternValue { get; set; } + + private string? PathMatchValue { get; set; } + + private string? PathUnmatchValue { get; set; } + + private string? UnmatchValue { get; set; } + + public DynamicTemplateDescriptor Mapping(Elastic.Clients.Elasticsearch.Mapping.Properties? mapping) + { + MappingValue = mapping; + return Self; + } + + public DynamicTemplateDescriptor Match(string? match) + { + MatchValue = match; + return Self; + } + + public DynamicTemplateDescriptor MatchMappingType(string? matchMappingType) + { + MatchMappingTypeValue = matchMappingType; + return Self; + } + + public DynamicTemplateDescriptor MatchPattern(Elastic.Clients.Elasticsearch.Mapping.MatchType? matchPattern) + { + MatchPatternValue = matchPattern; + return Self; + } + + public DynamicTemplateDescriptor PathMatch(string? pathMatch) + { + PathMatchValue = pathMatch; + return Self; + } + + public DynamicTemplateDescriptor PathUnmatch(string? pathUnmatch) + { + PathUnmatchValue = pathUnmatch; + return Self; + } + + public DynamicTemplateDescriptor Unmatch(string? unmatch) + { + UnmatchValue = unmatch; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (MappingValue is not null) + { + writer.WritePropertyName("mapping"); + JsonSerializer.Serialize(writer, MappingValue, options); + } + + if (!string.IsNullOrEmpty(MatchValue)) + { + writer.WritePropertyName("match"); + writer.WriteStringValue(MatchValue); + } + + if (!string.IsNullOrEmpty(MatchMappingTypeValue)) + { + writer.WritePropertyName("match_mapping_type"); + writer.WriteStringValue(MatchMappingTypeValue); + } + + if (MatchPatternValue is not null) + { + writer.WritePropertyName("match_pattern"); + JsonSerializer.Serialize(writer, MatchPatternValue, options); + } + + if (!string.IsNullOrEmpty(PathMatchValue)) + { + writer.WritePropertyName("path_match"); + writer.WriteStringValue(PathMatchValue); + } + + if (!string.IsNullOrEmpty(PathUnmatchValue)) + { + writer.WritePropertyName("path_unmatch"); + writer.WriteStringValue(PathUnmatchValue); + } + + if (!string.IsNullOrEmpty(UnmatchValue)) + { + writer.WritePropertyName("unmatch"); + writer.WriteStringValue(UnmatchValue); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs new file mode 100644 index 00000000000..27524d9a43e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class FieldAliasProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("path")] + public string? Path { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "alias"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldNamesField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldNamesField.g.cs new file mode 100644 index 00000000000..9bd87171596 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldNamesField.g.cs @@ -0,0 +1,57 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class FieldNamesField + { + [JsonInclude] + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + } + + public sealed partial class FieldNamesFieldDescriptor : DescriptorBase + { + internal FieldNamesFieldDescriptor(Action configure) => configure.Invoke(this); + public FieldNamesFieldDescriptor() : base() + { + } + + private bool EnabledValue { get; set; } + + public FieldNamesFieldDescriptor Enabled(bool enabled = true) + { + EnabledValue = enabled; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(EnabledValue); + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs new file mode 100644 index 00000000000..95996dcd162 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs @@ -0,0 +1,69 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class FlattenedProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("depth_limit")] + public int? DepthLimit { get; init; } + + [JsonInclude] + [JsonPropertyName("doc_values")] + public bool? DocValues { get; init; } + + [JsonInclude] + [JsonPropertyName("eager_global_ordinals")] + public bool? EagerGlobalOrdinals { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptions { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("similarity")] + public string? Similarity { get; init; } + + [JsonInclude] + [JsonPropertyName("split_queries_on_whitespace")] + public bool? SplitQueriesOnWhitespace { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "flattened"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs new file mode 100644 index 00000000000..176fddc90fa --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class FloatNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public float? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "float"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs new file mode 100644 index 00000000000..76b452fb606 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class FloatRangeProperty : Mapping.RangePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "float_range"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GenericProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GenericProperty.g.cs new file mode 100644 index 00000000000..96829a106a9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GenericProperty.g.cs @@ -0,0 +1,77 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class GenericProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("analyzer")] + public string Analyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("boost")] + public double Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("fielddata")] + public Elastic.Clients.Elasticsearch.IndexManagement.StringFielddata Fielddata { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool Index { get; init; } + + [JsonInclude] + [JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.IndexOptions IndexOptions { get; init; } + + [JsonInclude] + [JsonPropertyName("norms")] + public bool Norms { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("position_increment_gap")] + public int PositionIncrementGap { get; init; } + + [JsonInclude] + [JsonPropertyName("search_analyzer")] + public string SearchAnalyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("term_vector")] + public Elastic.Clients.Elasticsearch.Mapping.TermVectorOption TermVector { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs new file mode 100644 index 00000000000..86beb091149 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs @@ -0,0 +1,45 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class GeoPointProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_z_value")] + public bool? IgnoreZValue { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public Elastic.Clients.Elasticsearch.GeoLocation? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "geo_point"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs new file mode 100644 index 00000000000..299e6c1684b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -0,0 +1,53 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class GeoShapeProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("coerce")] + public bool? Coerce { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_z_value")] + public bool? IgnoreZValue { get; init; } + + [JsonInclude] + [JsonPropertyName("orientation")] + public Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? Orientation { get; init; } + + [JsonInclude] + [JsonPropertyName("strategy")] + public Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? Strategy { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "geo_shape"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs new file mode 100644 index 00000000000..8789dcf2ecb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class HalfFloatNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public float? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "half_float"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs new file mode 100644 index 00000000000..225d9e36221 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class HistogramProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "histogram"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs new file mode 100644 index 00000000000..91291b08a5e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class IntegerNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public int? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "integer"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs new file mode 100644 index 00000000000..478e85bf64f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class IntegerRangeProperty : Mapping.RangePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "integer_range"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs new file mode 100644 index 00000000000..700c25fe248 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs @@ -0,0 +1,49 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class IpProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "ip"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs new file mode 100644 index 00000000000..e52a3deb865 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class IpRangeProperty : Mapping.RangePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "ip_range"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs new file mode 100644 index 00000000000..2101eb79664 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class JoinProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("relations")] + public Dictionary>? Relations { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "join"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs new file mode 100644 index 00000000000..6f3e2747cff --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs @@ -0,0 +1,69 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class KeywordProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("eager_global_ordinals")] + public bool? EagerGlobalOrdinals { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptions { get; init; } + + [JsonInclude] + [JsonPropertyName("normalizer")] + public string? Normalizer { get; init; } + + [JsonInclude] + [JsonPropertyName("norms")] + public bool? Norms { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("split_queries_on_whitespace")] + public bool? SplitQueriesOnWhitespace { get; init; } + + [JsonInclude] + [JsonPropertyName("time_series_dimension")] + public bool? TimeSeriesDimension { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "keyword"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs new file mode 100644 index 00000000000..ca04182f91b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class LongNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public long? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "long"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs new file mode 100644 index 00000000000..7eac315b5e2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class LongRangeProperty : Mapping.RangePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "long_range"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs new file mode 100644 index 00000000000..b99dec13090 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs @@ -0,0 +1,45 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class MatchOnlyTextProperty : IProperty + { + [JsonInclude] + [JsonPropertyName("copy_to")] + public Elastic.Clients.Elasticsearch.Fields? CopyTo { get; init; } + + [JsonInclude] + [JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Fields { get; init; } + + [JsonInclude] + [JsonPropertyName("meta")] + public Dictionary? Meta { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "match_only_text"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs new file mode 100644 index 00000000000..6863f35438c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class Murmur3HashProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "murmur3"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs new file mode 100644 index 00000000000..c8cfd756f6e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs @@ -0,0 +1,45 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class NestedProperty : Mapping.CorePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("enabled")] + public bool? Enabled { get; init; } + + [JsonInclude] + [JsonPropertyName("include_in_parent")] + public bool? IncludeInParent { get; init; } + + [JsonInclude] + [JsonPropertyName("include_in_root")] + public bool? IncludeInRoot { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "nested"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberProperty.g.cs new file mode 100644 index 00000000000..32dc2e86a3a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberProperty.g.cs @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class NumberProperty + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberPropertyBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberPropertyBase.g.cs new file mode 100644 index 00000000000..6a173cee01a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NumberPropertyBase.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public abstract partial class NumberPropertyBase : Mapping.DocValuesPropertyBase + { + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("time_series_metric")] + public Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs new file mode 100644 index 00000000000..4e8cf16af58 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class ObjectProperty : Mapping.CorePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("enabled")] + public bool? Enabled { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "object"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs new file mode 100644 index 00000000000..9fa9fb40bee --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class PercolatorProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "percolator"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs new file mode 100644 index 00000000000..f69dfc30647 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs @@ -0,0 +1,45 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class PointProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_z_value")] + public bool? IgnoreZValue { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "point"; + } +} \ 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 new file mode 100644 index 00000000000..f3ee876558b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs @@ -0,0 +1,146 @@ +// 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. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class Properties : IsADictionaryBase + { + public Properties() + { + } + + public Properties(IDictionary container) : base(container) + { + } + + public void Add(string name, IProperty property) => BackingDictionary.Add(name, property); + } + + internal sealed partial class PropertyInterfaceConverter + { + private static IProperty DeserializeVariant(string type, ref Utf8JsonReader reader, JsonSerializerOptions options) + { + switch (type) + { + case "match_only_text": + return JsonSerializer.Deserialize(ref reader, options); + case "point": + return JsonSerializer.Deserialize(ref reader, options); + case "wildcard": + return JsonSerializer.Deserialize(ref reader, options); + case "version": + return JsonSerializer.Deserialize(ref reader, options); + case "token_count": + return JsonSerializer.Deserialize(ref reader, options); + case "shape": + return JsonSerializer.Deserialize(ref reader, options); + case "murmur3": + return JsonSerializer.Deserialize(ref reader, options); + case "ip": + return JsonSerializer.Deserialize(ref reader, options); + case "completion": + return JsonSerializer.Deserialize(ref reader, options); + case "geo_shape": + return JsonSerializer.Deserialize(ref reader, options); + case "geo_point": + return JsonSerializer.Deserialize(ref reader, options); + case "date_range": + return JsonSerializer.Deserialize(ref reader, options); + case "double_range": + return JsonSerializer.Deserialize(ref reader, options); + case "float_range": + return JsonSerializer.Deserialize(ref reader, options); + case "integer_range": + return JsonSerializer.Deserialize(ref reader, options); + case "ip_range": + return JsonSerializer.Deserialize(ref reader, options); + case "long_range": + return JsonSerializer.Deserialize(ref reader, options); + case "scaled_float": + return JsonSerializer.Deserialize(ref reader, options); + case "unsigned_long": + return JsonSerializer.Deserialize(ref reader, options); + case "byte": + return JsonSerializer.Deserialize(ref reader, options); + case "short": + return JsonSerializer.Deserialize(ref reader, options); + case "long": + return JsonSerializer.Deserialize(ref reader, options); + case "integer": + return JsonSerializer.Deserialize(ref reader, options); + case "double": + return JsonSerializer.Deserialize(ref reader, options); + case "half_float": + return JsonSerializer.Deserialize(ref reader, options); + case "float": + return JsonSerializer.Deserialize(ref reader, options); + case "keyword": + return JsonSerializer.Deserialize(ref reader, options); + case "date_nanos": + return JsonSerializer.Deserialize(ref reader, options); + case "date": + return JsonSerializer.Deserialize(ref reader, options); + case "boolean": + return JsonSerializer.Deserialize(ref reader, options); + case "binary": + return JsonSerializer.Deserialize(ref reader, options); + case "text": + return JsonSerializer.Deserialize(ref reader, options); + case "search_as_you_type": + return JsonSerializer.Deserialize(ref reader, options); + case "nested": + return JsonSerializer.Deserialize(ref reader, options); + case "object": + return JsonSerializer.Deserialize(ref reader, options); + case "aggregate_metric_double": + return JsonSerializer.Deserialize(ref reader, options); + case "dense_vector": + return JsonSerializer.Deserialize(ref reader, options); + case "histogram": + return JsonSerializer.Deserialize(ref reader, options); + case "alias": + return JsonSerializer.Deserialize(ref reader, options); + case "constant_keyword": + return JsonSerializer.Deserialize(ref reader, options); + case "rank_features": + return JsonSerializer.Deserialize(ref reader, options); + case "rank_feature": + return JsonSerializer.Deserialize(ref reader, options); + case "percolator": + return JsonSerializer.Deserialize(ref reader, options); + case "join": + return JsonSerializer.Deserialize(ref reader, options); + case "flattened": + return JsonSerializer.Deserialize(ref reader, options); + default: + throw new JsonException("Encounted an unknown variant type which could not be deserialised."); + } + } + } + + public partial interface IProperty + { + public string Type { get; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PropertyBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PropertyBase.g.cs new file mode 100644 index 00000000000..516b6b85a9f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PropertyBase.g.cs @@ -0,0 +1,57 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public abstract partial class PropertyBase + { + [JsonInclude] + [JsonPropertyName("dynamic")] + public Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? Dynamic { get; init; } + + [JsonInclude] + [JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Fields { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_above")] + public int? IgnoreAbove { get; init; } + + [JsonInclude] + [JsonPropertyName("local_metadata")] + public Dictionary? LocalMetadata { get; init; } + + [JsonInclude] + [JsonPropertyName("meta")] + public Dictionary? Meta { get; init; } + + [JsonInclude] + [JsonPropertyName("name")] + public string? Name { get; init; } + + [JsonInclude] + [JsonPropertyName("properties")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangeProperty.g.cs new file mode 100644 index 00000000000..f1f764d42ca --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangeProperty.g.cs @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class RangeProperty + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangePropertyBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangePropertyBase.g.cs new file mode 100644 index 00000000000..00a46b89f41 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RangePropertyBase.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public abstract partial class RangePropertyBase : Mapping.DocValuesPropertyBase + { + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("coerce")] + public bool? Coerce { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs new file mode 100644 index 00000000000..8d04235c911 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class RankFeatureProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("positive_score_impact")] + public bool? PositiveScoreImpact { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "rank_feature"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs new file mode 100644 index 00000000000..dc4a23db5c6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class RankFeaturesProperty : Mapping.PropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "rank_features"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RoutingField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RoutingField.g.cs new file mode 100644 index 00000000000..e83ed082887 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RoutingField.g.cs @@ -0,0 +1,57 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class RoutingField + { + [JsonInclude] + [JsonPropertyName("required")] + public bool Required { get; set; } + } + + public sealed partial class RoutingFieldDescriptor : DescriptorBase + { + internal RoutingFieldDescriptor(Action configure) => configure.Invoke(this); + public RoutingFieldDescriptor() : base() + { + } + + private bool RequiredValue { get; set; } + + public RoutingFieldDescriptor Required(bool required = true) + { + RequiredValue = required; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("required"); + writer.WriteBooleanValue(RequiredValue); + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs new file mode 100644 index 00000000000..0d7621423b9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs @@ -0,0 +1,45 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class ScaledFloatNumberProperty : Mapping.NumberPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("coerce")] + public bool? Coerce { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public double? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("scaling_factor")] + public double? ScalingFactor { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "scaled_float"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs new file mode 100644 index 00000000000..d5f433f38b0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs @@ -0,0 +1,65 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class SearchAsYouTypeProperty : Mapping.CorePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("analyzer")] + public string? Analyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptions { get; init; } + + [JsonInclude] + [JsonPropertyName("max_shingle_size")] + public int? MaxShingleSize { get; init; } + + [JsonInclude] + [JsonPropertyName("norms")] + public bool? Norms { get; init; } + + [JsonInclude] + [JsonPropertyName("search_analyzer")] + public string? SearchAnalyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("search_quote_analyzer")] + public string? SearchQuoteAnalyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("term_vector")] + public Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVector { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "search_as_you_type"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs new file mode 100644 index 00000000000..efddbe58629 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -0,0 +1,49 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class ShapeProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("coerce")] + public bool? Coerce { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_malformed")] + public bool? IgnoreMalformed { get; init; } + + [JsonInclude] + [JsonPropertyName("ignore_z_value")] + public bool? IgnoreZValue { get; init; } + + [JsonInclude] + [JsonPropertyName("orientation")] + public Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? Orientation { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "shape"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs new file mode 100644 index 00000000000..0db37bd29dc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class ShortNumberProperty : Mapping.StandardNumberProperty, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public double? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "short"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs new file mode 100644 index 00000000000..6f48c741060 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs @@ -0,0 +1,133 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class SourceField + { + [JsonInclude] + [JsonPropertyName("compress")] + public bool? Compress { get; set; } + + [JsonInclude] + [JsonPropertyName("compress_threshold")] + public string? CompressThreshold { get; set; } + + [JsonInclude] + [JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + [JsonInclude] + [JsonPropertyName("excludes")] + public IEnumerable? Excludes { get; set; } + + [JsonInclude] + [JsonPropertyName("includes")] + public IEnumerable? Includes { get; set; } + } + + public sealed partial class SourceFieldDescriptor : DescriptorBase + { + internal SourceFieldDescriptor(Action configure) => configure.Invoke(this); + public SourceFieldDescriptor() : base() + { + } + + private bool? CompressValue { get; set; } + + private string? CompressThresholdValue { get; set; } + + private bool? EnabledValue { get; set; } + + private IEnumerable? ExcludesValue { get; set; } + + private IEnumerable? IncludesValue { get; set; } + + public SourceFieldDescriptor Compress(bool? compress = true) + { + CompressValue = compress; + return Self; + } + + public SourceFieldDescriptor CompressThreshold(string? compressThreshold) + { + CompressThresholdValue = compressThreshold; + return Self; + } + + public SourceFieldDescriptor Enabled(bool? enabled = true) + { + EnabledValue = enabled; + return Self; + } + + public SourceFieldDescriptor Excludes(IEnumerable? excludes) + { + ExcludesValue = excludes; + return Self; + } + + public SourceFieldDescriptor Includes(IEnumerable? includes) + { + IncludesValue = includes; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (CompressValue.HasValue) + { + writer.WritePropertyName("compress"); + writer.WriteBooleanValue(CompressValue.Value); + } + + if (!string.IsNullOrEmpty(CompressThresholdValue)) + { + writer.WritePropertyName("compress_threshold"); + writer.WriteStringValue(CompressThresholdValue); + } + + if (EnabledValue.HasValue) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(EnabledValue.Value); + } + + if (ExcludesValue is not null) + { + writer.WritePropertyName("excludes"); + JsonSerializer.Serialize(writer, ExcludesValue, options); + } + + if (IncludesValue is not null) + { + writer.WritePropertyName("includes"); + JsonSerializer.Serialize(writer, IncludesValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/StandardNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/StandardNumberProperty.g.cs new file mode 100644 index 00000000000..4030b902055 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/StandardNumberProperty.g.cs @@ -0,0 +1,41 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class StandardNumberProperty : Mapping.NumberPropertyBase + { + [JsonInclude] + [JsonPropertyName("coerce")] + public bool? Coerce { get; init; } + + [JsonInclude] + [JsonPropertyName("on_script_error")] + public Elastic.Clients.Elasticsearch.Mapping.OnScriptError? OnScriptError { get; init; } + + [JsonInclude] + [JsonPropertyName("script")] + public ScriptBase? Script { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SuggestContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SuggestContext.g.cs new file mode 100644 index 00000000000..9c23f36969c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SuggestContext.g.cs @@ -0,0 +1,45 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class SuggestContext + { + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + + [JsonInclude] + [JsonPropertyName("path")] + public string? Path { get; init; } + + [JsonInclude] + [JsonPropertyName("precision")] + public Union? Precision { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextIndexPrefixes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextIndexPrefixes.g.cs new file mode 100644 index 00000000000..d8545e096fc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextIndexPrefixes.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class TextIndexPrefixes + { + [JsonInclude] + [JsonPropertyName("max_chars")] + public int MaxChars { get; init; } + + [JsonInclude] + [JsonPropertyName("min_chars")] + public int MinChars { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs new file mode 100644 index 00000000000..4093f4fb65d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs @@ -0,0 +1,89 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class TextProperty : Mapping.CorePropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("analyzer")] + public string? Analyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("eager_global_ordinals")] + public bool? EagerGlobalOrdinals { get; init; } + + [JsonInclude] + [JsonPropertyName("fielddata")] + public bool? Fielddata { get; init; } + + [JsonInclude] + [JsonPropertyName("fielddata_frequency_filter")] + public Elastic.Clients.Elasticsearch.IndexManagement.FielddataFrequencyFilter? FielddataFrequencyFilter { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("index_options")] + public Elastic.Clients.Elasticsearch.Mapping.IndexOptions? IndexOptions { get; init; } + + [JsonInclude] + [JsonPropertyName("index_phrases")] + public bool? IndexPhrases { get; init; } + + [JsonInclude] + [JsonPropertyName("index_prefixes")] + public Elastic.Clients.Elasticsearch.Mapping.TextIndexPrefixes? IndexPrefixes { get; init; } + + [JsonInclude] + [JsonPropertyName("norms")] + public bool? Norms { get; init; } + + [JsonInclude] + [JsonPropertyName("position_increment_gap")] + public int? PositionIncrementGap { get; init; } + + [JsonInclude] + [JsonPropertyName("search_analyzer")] + public string? SearchAnalyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("search_quote_analyzer")] + public string? SearchQuoteAnalyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("term_vector")] + public Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVector { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "text"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs new file mode 100644 index 00000000000..4b67e9391e1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs @@ -0,0 +1,53 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class TokenCountProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("analyzer")] + public string? Analyzer { get; init; } + + [JsonInclude] + [JsonPropertyName("boost")] + public double? Boost { get; init; } + + [JsonInclude] + [JsonPropertyName("enable_position_increments")] + public bool? EnablePositionIncrements { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public bool? Index { get; init; } + + [JsonInclude] + [JsonPropertyName("null_value")] + public double? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "token_count"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs new file mode 100644 index 00000000000..55dfccde416 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class UnsignedLongNumberProperty : Mapping.NumberPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public long? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "unsigned_long"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs new file mode 100644 index 00000000000..7a0748a5905 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class VersionProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "version"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs new file mode 100644 index 00000000000..796d140f93a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs @@ -0,0 +1,37 @@ +// 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. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Mapping +{ + public partial class WildcardProperty : Mapping.DocValuesPropertyBase, IProperty + { + [JsonInclude] + [JsonPropertyName("null_value")] + public string? NullValue { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type => "wildcard"; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs index 52d9c1e1e4c..8657a3a8fdd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Nodes diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs index e48817eb411..dedede76a81 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.QueryDsl diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringFlags.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringFlags.g.cs index bbad0ca16f8..e0540440ebf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringFlags.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringFlags.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.QueryDsl diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs index 82643391521..587a21d105f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs index a5cf2ee46ce..273d1084e2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs index 35e3f9ef686..0e1bb0b9d1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfos.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch.Tasks diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs index 17ebd47ffe2..80935faf768 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs @@ -18,6 +18,8 @@ using Elastic.Transport; using System; using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; #nullable restore namespace Elastic.Clients.Elasticsearch diff --git a/src/Playground/Program.cs b/src/Playground/Program.cs index c196eb26f99..121337ce93f 100644 --- a/src/Playground/Program.cs +++ b/src/Playground/Program.cs @@ -2,4 +2,46 @@ // 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. -return; +using System.Text; +using Elastic.Clients.Elasticsearch; +using Elastic.Clients.Elasticsearch.IndexManagement; +using Elastic.Clients.Elasticsearch.Mapping; + +var client = new ElasticsearchClient(); + +var putMappingRequest = new PutMappingRequest("test-index") +{ + Properties = new Properties + { + { "field1", new TextProperty { Boost = 2.0, Store = false } } + } +}; + +var stream = new MemoryStream(); + +client.RequestResponseSerializer.Serialize(putMappingRequest, stream); + +stream.Position = 0; + +var sr = new StreamReader(stream); + +var json = sr.ReadToEnd(); + +Console.WriteLine(json); + +Console.ReadKey(); + +const string propertiesJson = @"{""field1"":{""boost"":2,""type"":""text"",""store"":false},""field2"":{""type"":""ip""},""name"":{""properties"":{""first"":{""type"":""text"",""fields"":{""keyword"":{""type"":""keyword"",""ignore_above"":256}}},""last"":{""type"":""text"",""fields"":{""keyword"":{""type"":""keyword"",""ignore_above"":256}}}}}}"; + +stream = new MemoryStream(Encoding.UTF8.GetBytes(propertiesJson)); + +var properties = client.RequestResponseSerializer.Deserialize(stream); + +if (properties.TryGetProperty("field1", out var textProperty)) +{ + Console.WriteLine($"Found field1 with boost: {textProperty.Boost}"); +} + +Console.WriteLine("DONE"); + +Console.ReadKey();