From 089f0f44ce93c64258fa1133f30c052612c8975b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:43:59 +0200 Subject: [PATCH] Regenerate client using the latest specification (#8369) (#8370) Co-authored-by: Florian Bernd --- .../Api/Cluster/HealthResponse.g.cs | 8 + .../_Generated/Api/Esql/EsqlQueryRequest.g.cs | 8 +- .../IndexManagement/GetDataStreamRequest.g.cs | 16 + .../IndexManagement/ResolveIndexRequest.g.cs | 36 + .../Api/Ingest/PutPipelineRequest.g.cs | 47 + .../Api/OpenPointInTimeRequest.g.cs | 116 +- .../Api/OpenPointInTimeResponse.g.cs | 8 + .../_Generated/Api/SearchRequest.g.cs | 116 -- .../_Generated/Api/Sql/QueryRequest.g.cs | 8 +- .../Api/Xpack/XpackInfoRequest.g.cs | 6 +- .../Client/ElasticsearchClient.Ingest.g.cs | 50 +- .../Aggregations/AggregateDictionary.g.cs | 8 + .../Aggregations/TimeSeriesAggregate.g.cs | 36 + .../Types/Aggregations/TimeSeriesBucket.g.cs | 87 ++ .../Types/Analysis/ClassicTokenizer.g.cs | 90 ++ .../Types/Analysis/EdgeNGramTokenizer.g.cs | 14 +- .../Analysis/KeywordMarkerTokenFilter.g.cs | 3 +- .../Types/Analysis/KeywordTokenizer.g.cs | 14 +- .../Types/Analysis/NGramTokenizer.g.cs | 14 +- .../Analysis/SimplePatternSplitTokenizer.g.cs | 90 ++ .../Analysis/SimplePatternTokenizer.g.cs | 90 ++ .../Types/Analysis/ThaiTokenizer.g.cs | 73 ++ .../_Generated/Types/Analysis/Tokenizers.g.cs | 32 + .../_Generated/Types/Cluster/CurrentNode.g.cs | 2 + .../Types/Cluster/IndexHealthStats.g.cs | 2 + .../Cluster/NodeAllocationExplanation.g.cs | 2 + .../Types/Cluster/ShardHealthStats.g.cs | 2 + .../Core/Search/AggregationProfileDebug.g.cs | 8 + .../Types/Core/Search/DfsKnnProfile.g.cs | 40 + .../Types/Core/Search/DfsProfile.g.cs | 36 + .../Core/Search/DfsStatisticsBreakdown.g.cs | 48 + .../Core/Search/DfsStatisticsProfile.g.cs | 46 + .../_Generated/Types/Core/Search/Hit.g.cs | 2 +- .../Types/Core/Search/KnnCollectorResult.g.cs | 42 + .../Core/Search/KnnQueryProfileBreakdown.g.cs | 72 ++ .../Core/Search/KnnQueryProfileResult.g.cs | 46 + .../Types/Core/Search/QueryBreakdown.g.cs | 4 + .../Types/Core/Search/ShardProfile.g.cs | 10 + .../_Generated/Types/Enrich/CacheStats.g.cs | 6 + .../_Generated/Types/Enums/Enums.Esql.g.cs | 113 ++ .../_Generated/Types/Enums/Enums.Ingest.g.cs | 172 ++- .../Types/Enums/Enums.MachineLearning.g.cs | 84 +- .../_Generated/Types/Enums/Enums.Sql.g.cs | 106 ++ .../_Generated/Types/Enums/Enums.Xpack.g.cs | 78 ++ .../Types/Ingest/AppendProcessor.g.cs | 5 +- .../Types/Ingest/DotExpanderProcessor.g.cs | 50 + .../Types/Ingest/GeoGridProcessor.g.cs | 1010 +++++++++++++++++ .../Types/Ingest/GeoIpProcessor.g.cs | 47 + .../_Generated/Types/Ingest/Pipeline.g.cs | 47 + .../_Generated/Types/Ingest/Processor.g.cs | 30 + .../Types/Ingest/RedactProcessor.g.cs | 727 ++++++++++++ .../Types/Ingest/UserAgentProcessor.g.cs | 88 +- .../Types/MachineLearning/CalendarEvent.g.cs | 78 ++ .../TrainedModelDeploymentStats.g.cs | 2 +- .../Types/Mapping/BinaryProperty.g.cs | 30 - .../Types/Mapping/BooleanProperty.g.cs | 30 - .../Types/Mapping/ByteNumberProperty.g.cs | 30 - .../Types/Mapping/CompletionProperty.g.cs | 30 - .../Types/Mapping/CompositeSubField.g.cs | 59 + .../Types/Mapping/DateNanosProperty.g.cs | 30 - .../Types/Mapping/DateProperty.g.cs | 30 - .../Types/Mapping/DateRangeProperty.g.cs | 30 - .../Types/Mapping/DoubleNumberProperty.g.cs | 30 - .../Types/Mapping/DoubleRangeProperty.g.cs | 30 - .../Types/Mapping/DynamicProperty.g.cs | 30 - .../Types/Mapping/FloatNumberProperty.g.cs | 30 - .../Types/Mapping/FloatRangeProperty.g.cs | 30 - .../Types/Mapping/GeoPointProperty.g.cs | 30 - .../Types/Mapping/GeoShapeProperty.g.cs | 30 - .../Mapping/HalfFloatNumberProperty.g.cs | 30 - .../Types/Mapping/IcuCollationProperty.g.cs | 30 - .../Types/Mapping/IntegerNumberProperty.g.cs | 30 - .../Types/Mapping/IntegerRangeProperty.g.cs | 30 - .../_Generated/Types/Mapping/IpProperty.g.cs | 30 - .../Types/Mapping/IpRangeProperty.g.cs | 30 - .../Types/Mapping/LongNumberProperty.g.cs | 30 - .../Types/Mapping/LongRangeProperty.g.cs | 30 - .../Types/Mapping/Murmur3HashProperty.g.cs | 30 - .../Types/Mapping/NestedProperty.g.cs | 30 - .../Types/Mapping/ObjectProperty.g.cs | 30 - .../Types/Mapping/PointProperty.g.cs | 30 - .../Types/Mapping/RuntimeField.g.cs | 44 + .../Mapping/ScaledFloatNumberProperty.g.cs | 30 - .../Types/Mapping/ShapeProperty.g.cs | 30 - .../Types/Mapping/ShortNumberProperty.g.cs | 30 - .../Types/Mapping/TokenCountProperty.g.cs | 30 - .../Mapping/UnsignedLongNumberProperty.g.cs | 30 - .../Types/Mapping/VersionProperty.g.cs | 30 - .../Types/Mapping/WildcardProperty.g.cs | 30 - .../_Generated/Types/Nodes/Ingest.g.cs | 2 +- .../_Generated/Types/Nodes/IngestStats.g.cs | 92 ++ .../_Generated/Types/Nodes/IngestTotal.g.cs | 16 +- .../Types/QueryDsl/TermsSetQuery.g.cs | 67 +- .../_Generated/Types/Rank.g.cs | 227 ---- .../Types/Snapshot/SnapshotShardFailure.g.cs | 2 + .../Client/ElasticsearchClient.Esql.cs | 2 +- .../Api/Cluster/HealthResponse.g.cs | 8 + .../_Generated/Api/Esql/EsqlQueryRequest.g.cs | 8 +- .../IndexManagement/GetDataStreamRequest.g.cs | 16 + .../IndexManagement/ResolveIndexRequest.g.cs | 36 + .../Api/Ingest/PutPipelineRequest.g.cs | 47 + .../Api/OpenPointInTimeRequest.g.cs | 116 +- .../Api/OpenPointInTimeResponse.g.cs | 8 + .../DeleteBehavioralAnalyticsRequest.g.cs | 2 + .../DeleteSearchApplicationRequest.g.cs | 6 +- .../GetBehavioralAnalyticsRequest.g.cs | 4 +- .../GetSearchApplicationRequest.g.cs | 4 +- .../PutBehavioralAnalyticsRequest.g.cs | 4 +- .../PutSearchApplicationRequest.g.cs | 4 +- .../SearchApplicationSearchRequest.g.cs | 8 +- .../_Generated/Api/SearchShardsResponse.g.cs | 2 +- .../Api/Security/PutRoleRequest.g.cs | 160 +++ .../_Generated/Api/Sql/QueryRequest.g.cs | 8 +- .../Api/Xpack/XpackInfoRequest.g.cs | 6 +- .../Client/ElasticsearchClient.Ingest.g.cs | 100 +- ...ElasticsearchClient.SearchApplication.g.cs | 112 +- .../Aggregations/AggregateDictionary.g.cs | 8 + .../Types/Aggregations/Aggregation.g.cs | 30 + .../RandomSamplerAggregation.g.cs | 129 +++ .../Aggregations/TimeSeriesAggregate.g.cs | 36 + .../Aggregations/TimeSeriesAggregation.g.cs} | 56 +- .../Types/Aggregations/TimeSeriesBucket.g.cs | 87 ++ .../Types/Analysis/ClassicTokenizer.g.cs | 90 ++ .../Types/Analysis/EdgeNGramTokenizer.g.cs | 14 +- .../Analysis/KeywordMarkerTokenFilter.g.cs | 3 +- .../Types/Analysis/KeywordTokenizer.g.cs | 14 +- .../Types/Analysis/NGramTokenizer.g.cs | 14 +- .../Analysis/SimplePatternSplitTokenizer.g.cs | 90 ++ .../Analysis/SimplePatternTokenizer.g.cs | 90 ++ .../Types/Analysis/ThaiTokenizer.g.cs | 73 ++ .../_Generated/Types/Analysis/Tokenizers.g.cs | 32 + .../_Generated/Types/Cluster/CurrentNode.g.cs | 2 + .../Types/Cluster/IndexHealthStats.g.cs | 2 + .../Cluster/NodeAllocationExplanation.g.cs | 2 + .../Types/Cluster/ShardHealthStats.g.cs | 2 + .../Core/Search/AggregationProfileDebug.g.cs | 8 + .../Types/Core/Search/DfsKnnProfile.g.cs | 40 + .../Types/Core/Search/DfsProfile.g.cs | 36 + .../Core/Search/DfsStatisticsBreakdown.g.cs | 48 + .../Core/Search/DfsStatisticsProfile.g.cs | 46 + .../_Generated/Types/Core/Search/Hit.g.cs | 2 +- .../Types/Core/Search/KnnCollectorResult.g.cs | 42 + .../Core/Search/KnnQueryProfileBreakdown.g.cs | 72 ++ .../Core/Search/KnnQueryProfileResult.g.cs | 46 + .../Types/Core/Search/QueryBreakdown.g.cs | 4 + .../Types/Core/Search/ShardProfile.g.cs | 10 + .../SearchShardsNodeAttributes.g.cs | 73 ++ .../_Generated/Types/Enrich/CacheStats.g.cs | 6 + .../_Generated/Types/Enums/Enums.Esql.g.cs | 113 ++ .../_Generated/Types/Enums/Enums.Ingest.g.cs | 172 ++- .../Types/Enums/Enums.MachineLearning.g.cs | 84 +- .../_Generated/Types/Enums/Enums.Sql.g.cs | 106 ++ .../_Generated/Types/Enums/Enums.Xpack.g.cs | 78 ++ .../Types/Ingest/AppendProcessor.g.cs | 5 +- .../Types/Ingest/DotExpanderProcessor.g.cs | 50 + .../Types/Ingest/GeoGridProcessor.g.cs | 1010 +++++++++++++++++ .../Types/Ingest/GeoIpProcessor.g.cs | 47 + .../_Generated/Types/Ingest/Pipeline.g.cs | 47 + .../_Generated/Types/Ingest/Processor.g.cs | 30 + .../Types/Ingest/RedactProcessor.g.cs | 727 ++++++++++++ .../Types/Ingest/UserAgentProcessor.g.cs | 88 +- .../Types/MachineLearning/CalendarEvent.g.cs | 78 ++ .../TrainedModelDeploymentStats.g.cs | 2 +- .../Types/Mapping/BinaryProperty.g.cs | 30 - .../Types/Mapping/BooleanProperty.g.cs | 30 - .../Types/Mapping/ByteNumberProperty.g.cs | 30 - .../Types/Mapping/CompletionProperty.g.cs | 30 - .../Types/Mapping/CompositeSubField.g.cs | 59 + .../Types/Mapping/DateNanosProperty.g.cs | 30 - .../Types/Mapping/DateProperty.g.cs | 30 - .../Types/Mapping/DateRangeProperty.g.cs | 30 - .../Types/Mapping/DoubleNumberProperty.g.cs | 30 - .../Types/Mapping/DoubleRangeProperty.g.cs | 30 - .../Types/Mapping/DynamicProperty.g.cs | 30 - .../Types/Mapping/FloatNumberProperty.g.cs | 30 - .../Types/Mapping/FloatRangeProperty.g.cs | 30 - .../Types/Mapping/GeoPointProperty.g.cs | 30 - .../Types/Mapping/GeoShapeProperty.g.cs | 30 - .../Mapping/HalfFloatNumberProperty.g.cs | 30 - .../Types/Mapping/IcuCollationProperty.g.cs | 30 - .../Types/Mapping/IntegerNumberProperty.g.cs | 30 - .../Types/Mapping/IntegerRangeProperty.g.cs | 30 - .../_Generated/Types/Mapping/IpProperty.g.cs | 30 - .../Types/Mapping/IpRangeProperty.g.cs | 30 - .../Types/Mapping/LongNumberProperty.g.cs | 30 - .../Types/Mapping/LongRangeProperty.g.cs | 30 - .../Types/Mapping/Murmur3HashProperty.g.cs | 30 - .../Types/Mapping/NestedProperty.g.cs | 30 - .../Types/Mapping/ObjectProperty.g.cs | 30 - .../Types/Mapping/PointProperty.g.cs | 30 - .../Types/Mapping/RuntimeField.g.cs | 44 + .../Mapping/ScaledFloatNumberProperty.g.cs | 30 - .../Types/Mapping/ShapeProperty.g.cs | 30 - .../Types/Mapping/ShortNumberProperty.g.cs | 30 - .../Types/Mapping/TokenCountProperty.g.cs | 30 - .../Mapping/UnsignedLongNumberProperty.g.cs | 30 - .../Types/Mapping/VersionProperty.g.cs | 30 - .../Types/Mapping/WildcardProperty.g.cs | 30 - .../_Generated/Types/NodeAttributes.g.cs | 4 - .../_Generated/Types/Nodes/Http.g.cs | 8 + .../_Generated/Types/Nodes/HttpRoute.g.cs | 36 + .../Types/Nodes/HttpRouteRequests.g.cs | 38 + .../Types/Nodes/HttpRouteResponses.g.cs | 40 + .../_Generated/Types/Nodes/Ingest.g.cs | 2 +- .../_Generated/Types/Nodes/IngestStats.g.cs | 92 ++ .../_Generated/Types/Nodes/IngestTotal.g.cs | 16 +- .../Types/Nodes/SizeHttpHistogram.g.cs | 38 + .../Types/Nodes/TimeHttpHistogram.g.cs | 38 + .../Types/QueryDsl/TermsSetQuery.g.cs | 67 +- .../Security/RemoteIndicesPrivileges.g.cs | 363 ++++++ .../Types/Snapshot/SnapshotShardFailure.g.cs | 2 + 211 files changed, 8948 insertions(+), 2868 deletions(-) create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Rank.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs rename src/{Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RrfRank.g.cs => Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs} (51%) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ThaiTokenizer.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsProfile.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnCollectorResult.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchShards/SearchShardsNodeAttributes.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Esql.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Sql.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Xpack.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompositeSubField.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRoute.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteRequests.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteResponses.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs index a3fac39235a..609d064dd95 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs @@ -145,6 +145,14 @@ public sealed partial class HealthResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("timed_out")] public bool TimedOut { get; init; } + /// + /// + /// The number of primary shards that are not allocated. + /// + /// + [JsonInclude, JsonPropertyName("unassigned_primary_shards")] + public int UnassignedPrimaryShards { get; init; } + /// /// /// The number of shards that are not allocated. diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs index 69b18ee8d0e..3a9c22fbcf8 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -51,7 +51,7 @@ public sealed partial class EsqlQueryRequestParameters : RequestParameters /// A short version of the Accept header, e.g. json, yaml. /// /// - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } } /// @@ -92,7 +92,7 @@ public sealed partial class EsqlQueryRequest : PlainRequest /// [JsonIgnore] - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } /// /// @@ -163,7 +163,7 @@ public EsqlQueryRequestDescriptor() public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns); - public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format); + public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? format) => Qs("format", format); private bool? ColumnarValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } @@ -328,7 +328,7 @@ public EsqlQueryRequestDescriptor() public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns); - public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format); + public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? format) => Qs("format", format); private bool? ColumnarValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs index 3a26e483e8b..88efd35baf2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs @@ -52,6 +52,13 @@ public sealed partial class GetDataStreamRequestParameters : RequestParameters /// /// public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Whether the maximum timestamp for each data stream should be calculated and returned. + /// + /// + public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } } /// @@ -102,6 +109,14 @@ public GetDataStreamRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamN /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Whether the maximum timestamp for each data stream should be calculated and returned. + /// + /// + [JsonIgnore] + public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } } /// @@ -133,6 +148,7 @@ public GetDataStreamRequestDescriptor() public GetDataStreamRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetDataStreamRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public GetDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public GetDataStreamRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); public GetDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs index c18ffe5c104..35ff26b1dce 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs @@ -31,6 +31,15 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class ResolveIndexRequestParameters : RequestParameters { + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + /// + /// + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + /// /// /// Type of index that wildcard patterns can match. @@ -40,6 +49,13 @@ public sealed partial class ResolveIndexRequestParameters : RequestParameters /// /// public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } } /// @@ -62,6 +78,16 @@ public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) internal override string OperationName => "indices.resolve_index"; + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + /// + /// + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + /// /// /// Type of index that wildcard patterns can match. @@ -72,6 +98,14 @@ public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) /// [JsonIgnore] public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } } /// @@ -96,7 +130,9 @@ public ResolveIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Na internal override string OperationName => "indices.resolve_index"; + public ResolveIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ResolveIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public ResolveIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public ResolveIndexRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs index f4488ec31d1..f4019717ca4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -97,6 +97,15 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + /// /// /// Description of the ingest pipeline. @@ -170,6 +179,7 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. return Self; } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -182,6 +192,18 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. private Action>[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -300,6 +322,12 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -416,6 +444,7 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless. return Self; } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -428,6 +457,18 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless. private Action[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -546,6 +587,12 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs index 856765300ec..769f6db4bcb 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs @@ -90,7 +90,7 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Serverless.Indices i protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "open_point_in_time"; @@ -136,6 +136,14 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Serverless.Indices i /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + + /// + /// + /// Allows to filter indices if the provided query rewrites to match_none on every shard. + /// + /// + [JsonInclude, JsonPropertyName("index_filter")] + public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilter { get; set; } } /// @@ -164,7 +172,7 @@ public OpenPointInTimeRequestDescriptor() : this(typeof(TDocument)) protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "open_point_in_time"; @@ -180,8 +188,59 @@ public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elast return Self; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } + private Action> IndexFilterDescriptorAction { get; set; } + + /// + /// + /// Allows to filter indices if the provided query rewrites to match_none on every shard. + /// + /// + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Action> configure) + { + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterValue, options); + } + + writer.WriteEndObject(); } } @@ -207,7 +266,7 @@ public OpenPointInTimeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "open_point_in_time"; @@ -223,7 +282,58 @@ public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Se return Self; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } + private Action IndexFilterDescriptorAction { get; set; } + + /// + /// + /// Allows to filter indices if the provided query rewrites to match_none on every shard. + /// + /// + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Action configure) + { + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterValue, options); + } + + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs index 6094b36e7d1..b31084c2922 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs @@ -30,4 +30,12 @@ public sealed partial class OpenPointInTimeResponse : ElasticsearchResponse { [JsonInclude, JsonPropertyName("id")] public string Id { get; init; } + + /// + /// + /// Shards used to create the PIT + /// + /// + [JsonInclude, JsonPropertyName("_shards")] + public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs index 43b83d2d913..35976debed0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs @@ -373,12 +373,6 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "rank") - { - variant.Rank = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "rescore") { variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); @@ -585,12 +579,6 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Query, options); } - if (value.Rank is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, value.Rank, options); - } - if (value.Rescore is not null) { writer.WritePropertyName("rescore"); @@ -1128,14 +1116,6 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) [JsonInclude, JsonPropertyName("query")] public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - /// - /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. - /// - /// - [JsonInclude, JsonPropertyName("rank")] - public Elastic.Clients.Elasticsearch.Serverless.Rank? Rank { get; set; } - /// /// /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. @@ -1401,9 +1381,6 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Rank? RankValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RankDescriptor RankDescriptor { get; set; } - private Action RankDescriptorAction { get; set; } private ICollection? RescoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } @@ -1790,35 +1767,6 @@ public SearchRequestDescriptor Query(Action - /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. - /// - /// - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Serverless.Rank? rank) - { - RankDescriptor = null; - RankDescriptorAction = null; - RankValue = rank; - return Self; - } - - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Serverless.RankDescriptor descriptor) - { - RankValue = null; - RankDescriptorAction = null; - RankDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Rank(Action configure) - { - RankValue = null; - RankDescriptor = null; - RankDescriptorAction = configure; - return Self; - } - /// /// /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. @@ -2367,22 +2315,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } - if (RankDescriptor is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankDescriptor, options); - } - else if (RankDescriptorAction is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RankDescriptor(RankDescriptorAction), options); - } - else if (RankValue is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankValue, options); - } - if (RescoreDescriptor is not null) { writer.WritePropertyName("rescore"); @@ -2668,9 +2600,6 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless. private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Rank? RankValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RankDescriptor RankDescriptor { get; set; } - private Action RankDescriptorAction { get; set; } private ICollection? RescoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } @@ -3057,35 +2986,6 @@ public SearchRequestDescriptor Query(Action - /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. - /// - /// - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Serverless.Rank? rank) - { - RankDescriptor = null; - RankDescriptorAction = null; - RankValue = rank; - return Self; - } - - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Serverless.RankDescriptor descriptor) - { - RankValue = null; - RankDescriptorAction = null; - RankDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Rank(Action configure) - { - RankValue = null; - RankDescriptor = null; - RankDescriptorAction = configure; - return Self; - } - /// /// /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. @@ -3634,22 +3534,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } - if (RankDescriptor is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankDescriptor, options); - } - else if (RankDescriptorAction is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RankDescriptor(RankDescriptorAction), options); - } - else if (RankValue is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankValue, options); - } - if (RescoreDescriptor is not null) { writer.WritePropertyName("rescore"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs index acc10e56463..c07aacaaa31 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs @@ -36,7 +36,7 @@ public sealed partial class QueryRequestParameters : RequestParameters /// Format for the response. /// /// - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } } /// @@ -60,7 +60,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// [JsonIgnore] - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } /// /// @@ -215,7 +215,7 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - public QueryRequestDescriptor Format(string? format) => Qs("format", format); + public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? format) => Qs("format", format); private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } @@ -567,7 +567,7 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - public QueryRequestDescriptor Format(string? format) => Qs("format", format); + public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? format) => Qs("format", format); private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs index 87f0195bc1a..36f4e1f3351 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs @@ -43,7 +43,7 @@ public sealed partial class XpackInfoRequestParameters : RequestParameters /// A comma-separated list of the information categories to include in the response. For example, build,license,features. /// /// - public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } + public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } } /// @@ -75,7 +75,7 @@ public sealed partial class XpackInfoRequest : PlainRequest /// [JsonIgnore] - public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } + public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } } /// @@ -100,7 +100,7 @@ public XpackInfoRequestDescriptor() internal override string OperationName => "xpack.info"; public XpackInfoRequestDescriptor AcceptEnterprise(bool? acceptEnterprise = true) => Qs("accept_enterprise", acceptEnterprise); - public XpackInfoRequestDescriptor Categories(ICollection? categories) => Qs("categories", categories); + public XpackInfoRequestDescriptor Categories(ICollection? categories) => Qs("categories", categories); protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs index 903fa74a8f7..cdd7941b0fe 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs @@ -43,7 +43,7 @@ internal IngestNamespacedClient(ElasticsearchClient client) : base(client) /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequest request, CancellationToken cancellationToken = default) { @@ -55,7 +55,7 @@ public virtual Task DeleteGeoipDatabaseAsync(Delete /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -67,7 +67,7 @@ public virtual Task DeleteGeoipDatabaseAsync /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, CancellationToken cancellationToken = default) { @@ -80,7 +80,7 @@ public virtual Task DeleteGeoipDatabaseAsync /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -94,7 +94,7 @@ public virtual Task DeleteGeoipDatabaseAsync /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -106,7 +106,7 @@ public virtual Task DeleteGeoipDatabaseAsync(Delete /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, CancellationToken cancellationToken = default) { @@ -119,7 +119,7 @@ public virtual Task DeleteGeoipDatabaseAsync(Elasti /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -274,7 +274,7 @@ public virtual Task GeoIpStatsAsync(Action /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequest request, CancellationToken cancellationToken = default) { @@ -286,7 +286,7 @@ public virtual Task GetGeoipDatabaseAsync(GetGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -298,7 +298,7 @@ public virtual Task GetGeoipDatabaseAsync(G /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, CancellationToken cancellationToken = default) { @@ -311,7 +311,7 @@ public virtual Task GetGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -325,7 +325,7 @@ public virtual Task GetGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(CancellationToken cancellationToken = default) { @@ -338,7 +338,7 @@ public virtual Task GetGeoipDatabaseAsync(C /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -352,7 +352,7 @@ public virtual Task GetGeoipDatabaseAsync(A /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -364,7 +364,7 @@ public virtual Task GetGeoipDatabaseAsync(GetGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, CancellationToken cancellationToken = default) { @@ -377,7 +377,7 @@ public virtual Task GetGeoipDatabaseAsync(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -391,7 +391,7 @@ public virtual Task GetGeoipDatabaseAsync(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task GetGeoipDatabaseAsync(Cancellation /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -632,7 +632,7 @@ public virtual Task ProcessorGrokAsync(Action /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequest request, CancellationToken cancellationToken = default) { @@ -644,7 +644,7 @@ public virtual Task PutGeoipDatabaseAsync(PutGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -656,7 +656,7 @@ public virtual Task PutGeoipDatabaseAsync(P /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -669,7 +669,7 @@ public virtual Task PutGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -683,7 +683,7 @@ public virtual Task PutGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -695,7 +695,7 @@ public virtual Task PutGeoipDatabaseAsync(PutGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -708,7 +708,7 @@ public virtual Task PutGeoipDatabaseAsync(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs index 2201077a4d4..7f1f89d7900 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -101,6 +101,7 @@ public AggregateDictionary(IReadOnlyDictionary backingDictio public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumAggregate? GetSum(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestPercentileRanksAggregate? GetTDigestPercentileRanks(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestPercentilesAggregate? GetTDigestPercentiles(string key) => TryGet(key); + public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TimeSeriesAggregate? GetTimeSeries(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopHitsAggregate? GetTopHits(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsAggregate? GetTopMetrics(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestAggregate? GetTTest(string key) => TryGet(key); @@ -559,6 +560,13 @@ public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions opt break; } + case "time_series": + { + var item = JsonSerializer.Deserialize(ref reader, options); + dictionary.Add(nameParts[1], item); + break; + } + case "top_hits": { var item = JsonSerializer.Deserialize(ref reader, options); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs new file mode 100644 index 00000000000..8eeb3961a76 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.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. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; + +public sealed partial class TimeSeriesAggregate : IAggregate +{ + [JsonInclude, JsonPropertyName("buckets")] + public IReadOnlyCollection Buckets { get; init; } + [JsonInclude, JsonPropertyName("meta")] + public IReadOnlyDictionary? Meta { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs new file mode 100644 index 00000000000..920d0906f9c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; + +internal sealed partial class TimeSeriesBucketConverter : JsonConverter +{ + public override TimeSeriesBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException("Unexpected JSON detected."); + long docCount = default; + IReadOnlyDictionary key = default; + Dictionary additionalProperties = null; + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + if (reader.TokenType == JsonTokenType.PropertyName) + { + var property = reader.GetString(); + if (property == "doc_count") + { + docCount = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "key") + { + key = JsonSerializer.Deserialize>(ref reader, options); + continue; + } + + if (property.Contains("#")) + { + additionalProperties ??= new Dictionary(); + AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); + continue; + } + + throw new JsonException("Unknown property read from JSON."); + } + } + + return new TimeSeriesBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; + } + + public override void Write(Utf8JsonWriter writer, TimeSeriesBucket value, JsonSerializerOptions options) + { + throw new NotImplementedException("'TimeSeriesBucket' is a readonly type, used only on responses and does not support being written to JSON."); + } +} + +[JsonConverter(typeof(TimeSeriesBucketConverter))] +public sealed partial class TimeSeriesBucket +{ + /// + /// + /// Nested aggregations + /// + /// + public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } + public long DocCount { get; init; } + public IReadOnlyDictionary Key { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs new file mode 100644 index 00000000000..dd3cd63d201 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs @@ -0,0 +1,90 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class ClassicTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("max_token_length")] + public int? MaxTokenLength { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "classic"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class ClassicTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal ClassicTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public ClassicTokenizerDescriptor() : base() + { + } + + private int? MaxTokenLengthValue { get; set; } + private string? VersionValue { get; set; } + + public ClassicTokenizerDescriptor MaxTokenLength(int? maxTokenLength) + { + MaxTokenLengthValue = maxTokenLength; + return Self; + } + + public ClassicTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (MaxTokenLengthValue.HasValue) + { + writer.WritePropertyName("max_token_length"); + writer.WriteNumberValue(MaxTokenLengthValue.Value); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("classic"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + ClassicTokenizer IBuildableDescriptor.Build() => new() + { + MaxTokenLength = MaxTokenLengthValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs index 6992131e171..41b05db29a7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs @@ -36,7 +36,7 @@ public sealed partial class EdgeNGramTokenizer : ITokenizer [JsonInclude, JsonPropertyName("min_gram")] public int MinGram { get; set; } [JsonInclude, JsonPropertyName("token_chars")] - public ICollection TokenChars { get; set; } + public ICollection? TokenChars { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "edge_ngram"; @@ -56,7 +56,7 @@ public EdgeNGramTokenizerDescriptor() : base() private string? CustomTokenCharsValue { get; set; } private int MaxGramValue { get; set; } private int MinGramValue { get; set; } - private ICollection TokenCharsValue { get; set; } + private ICollection? TokenCharsValue { get; set; } private string? VersionValue { get; set; } public EdgeNGramTokenizerDescriptor CustomTokenChars(string? customTokenChars) @@ -77,7 +77,7 @@ public EdgeNGramTokenizerDescriptor MinGram(int minGram) return Self; } - public EdgeNGramTokenizerDescriptor TokenChars(ICollection tokenChars) + public EdgeNGramTokenizerDescriptor TokenChars(ICollection? tokenChars) { TokenCharsValue = tokenChars; return Self; @@ -102,8 +102,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxGramValue); writer.WritePropertyName("min_gram"); writer.WriteNumberValue(MinGramValue); - writer.WritePropertyName("token_chars"); - JsonSerializer.Serialize(writer, TokenCharsValue, options); + if (TokenCharsValue is not null) + { + writer.WritePropertyName("token_chars"); + JsonSerializer.Serialize(writer, TokenCharsValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("edge_ngram"); if (!string.IsNullOrEmpty(VersionValue)) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs index 9fc8bf1b52e..63c98e51412 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs @@ -32,6 +32,7 @@ public sealed partial class KeywordMarkerTokenFilter : ITokenFilter [JsonInclude, JsonPropertyName("ignore_case")] public bool? IgnoreCase { get; set; } [JsonInclude, JsonPropertyName("keywords")] + [SingleOrManyCollectionConverter(typeof(string))] public ICollection? Keywords { get; set; } [JsonInclude, JsonPropertyName("keywords_path")] public string? KeywordsPath { get; set; } @@ -101,7 +102,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o if (KeywordsValue is not null) { writer.WritePropertyName("keywords"); - JsonSerializer.Serialize(writer, KeywordsValue, options); + SingleOrManySerializationHelper.Serialize(KeywordsValue, writer, options); } if (!string.IsNullOrEmpty(KeywordsPathValue)) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs index 25621e123f4..379e6bdb7e9 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; public sealed partial class KeywordTokenizer : ITokenizer { [JsonInclude, JsonPropertyName("buffer_size")] - public int BufferSize { get; set; } + public int? BufferSize { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "keyword"; @@ -47,10 +47,10 @@ public KeywordTokenizerDescriptor() : base() { } - private int BufferSizeValue { get; set; } + private int? BufferSizeValue { get; set; } private string? VersionValue { get; set; } - public KeywordTokenizerDescriptor BufferSize(int bufferSize) + public KeywordTokenizerDescriptor BufferSize(int? bufferSize) { BufferSizeValue = bufferSize; return Self; @@ -65,8 +65,12 @@ public KeywordTokenizerDescriptor Version(string? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("buffer_size"); - writer.WriteNumberValue(BufferSizeValue); + if (BufferSizeValue.HasValue) + { + writer.WritePropertyName("buffer_size"); + writer.WriteNumberValue(BufferSizeValue.Value); + } + writer.WritePropertyName("type"); writer.WriteStringValue("keyword"); if (!string.IsNullOrEmpty(VersionValue)) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs index b56cc0414bb..1c685bd6ccf 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs @@ -36,7 +36,7 @@ public sealed partial class NGramTokenizer : ITokenizer [JsonInclude, JsonPropertyName("min_gram")] public int MinGram { get; set; } [JsonInclude, JsonPropertyName("token_chars")] - public ICollection TokenChars { get; set; } + public ICollection? TokenChars { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "ngram"; @@ -56,7 +56,7 @@ public NGramTokenizerDescriptor() : base() private string? CustomTokenCharsValue { get; set; } private int MaxGramValue { get; set; } private int MinGramValue { get; set; } - private ICollection TokenCharsValue { get; set; } + private ICollection? TokenCharsValue { get; set; } private string? VersionValue { get; set; } public NGramTokenizerDescriptor CustomTokenChars(string? customTokenChars) @@ -77,7 +77,7 @@ public NGramTokenizerDescriptor MinGram(int minGram) return Self; } - public NGramTokenizerDescriptor TokenChars(ICollection tokenChars) + public NGramTokenizerDescriptor TokenChars(ICollection? tokenChars) { TokenCharsValue = tokenChars; return Self; @@ -102,8 +102,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxGramValue); writer.WritePropertyName("min_gram"); writer.WriteNumberValue(MinGramValue); - writer.WritePropertyName("token_chars"); - JsonSerializer.Serialize(writer, TokenCharsValue, options); + if (TokenCharsValue is not null) + { + writer.WritePropertyName("token_chars"); + JsonSerializer.Serialize(writer, TokenCharsValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("ngram"); if (!string.IsNullOrEmpty(VersionValue)) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs new file mode 100644 index 00000000000..7953d768925 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs @@ -0,0 +1,90 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class SimplePatternSplitTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("pattern")] + public string? Pattern { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "simple_pattern_split"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class SimplePatternSplitTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SimplePatternSplitTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public SimplePatternSplitTokenizerDescriptor() : base() + { + } + + private string? PatternValue { get; set; } + private string? VersionValue { get; set; } + + public SimplePatternSplitTokenizerDescriptor Pattern(string? pattern) + { + PatternValue = pattern; + return Self; + } + + public SimplePatternSplitTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(PatternValue)) + { + writer.WritePropertyName("pattern"); + writer.WriteStringValue(PatternValue); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("simple_pattern_split"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + SimplePatternSplitTokenizer IBuildableDescriptor.Build() => new() + { + Pattern = PatternValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs new file mode 100644 index 00000000000..922ae85dd8e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs @@ -0,0 +1,90 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class SimplePatternTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("pattern")] + public string? Pattern { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "simple_pattern"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class SimplePatternTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SimplePatternTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public SimplePatternTokenizerDescriptor() : base() + { + } + + private string? PatternValue { get; set; } + private string? VersionValue { get; set; } + + public SimplePatternTokenizerDescriptor Pattern(string? pattern) + { + PatternValue = pattern; + return Self; + } + + public SimplePatternTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(PatternValue)) + { + writer.WritePropertyName("pattern"); + writer.WriteStringValue(PatternValue); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("simple_pattern"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + SimplePatternTokenizer IBuildableDescriptor.Build() => new() + { + Pattern = PatternValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs new file mode 100644 index 00000000000..3d31fe4eadc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs @@ -0,0 +1,73 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class ThaiTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("type")] + public string Type => "thai"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class ThaiTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal ThaiTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public ThaiTokenizerDescriptor() : base() + { + } + + private string? VersionValue { get; set; } + + public ThaiTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue("thai"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + ThaiTokenizer IBuildableDescriptor.Build() => new() + { + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs index e43e3e982d9..0e3c17b8211 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs @@ -69,6 +69,9 @@ public TokenizersDescriptor() : base(new Tokenizers()) public TokenizersDescriptor CharGroup(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor CharGroup(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor CharGroup(string tokenizerName, CharGroupTokenizer charGroupTokenizer) => AssignVariant(tokenizerName, charGroupTokenizer); + public TokenizersDescriptor Classic(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor Classic(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor Classic(string tokenizerName, ClassicTokenizer classicTokenizer) => AssignVariant(tokenizerName, classicTokenizer); public TokenizersDescriptor EdgeNGram(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor EdgeNGram(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor EdgeNGram(string tokenizerName, EdgeNGramTokenizer edgeNGramTokenizer) => AssignVariant(tokenizerName, edgeNGramTokenizer); @@ -99,9 +102,18 @@ public TokenizersDescriptor() : base(new Tokenizers()) public TokenizersDescriptor Pattern(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor Pattern(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor Pattern(string tokenizerName, PatternTokenizer patternTokenizer) => AssignVariant(tokenizerName, patternTokenizer); + public TokenizersDescriptor SimplePatternSplit(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor SimplePatternSplit(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor SimplePatternSplit(string tokenizerName, SimplePatternSplitTokenizer simplePatternSplitTokenizer) => AssignVariant(tokenizerName, simplePatternSplitTokenizer); + public TokenizersDescriptor SimplePattern(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor SimplePattern(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor SimplePattern(string tokenizerName, SimplePatternTokenizer simplePatternTokenizer) => AssignVariant(tokenizerName, simplePatternTokenizer); public TokenizersDescriptor Standard(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor Standard(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor Standard(string tokenizerName, StandardTokenizer standardTokenizer) => AssignVariant(tokenizerName, standardTokenizer); + public TokenizersDescriptor Thai(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor Thai(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor Thai(string tokenizerName, ThaiTokenizer thaiTokenizer) => AssignVariant(tokenizerName, thaiTokenizer); public TokenizersDescriptor UaxEmailUrl(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor UaxEmailUrl(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor UaxEmailUrl(string tokenizerName, UaxEmailUrlTokenizer uaxEmailUrlTokenizer) => AssignVariant(tokenizerName, uaxEmailUrlTokenizer); @@ -126,6 +138,8 @@ public override ITokenizer Read(ref Utf8JsonReader reader, Type typeToConvert, J { case "char_group": return JsonSerializer.Deserialize(ref reader, options); + case "classic": + return JsonSerializer.Deserialize(ref reader, options); case "edge_ngram": return JsonSerializer.Deserialize(ref reader, options); case "icu_tokenizer": @@ -146,8 +160,14 @@ public override ITokenizer Read(ref Utf8JsonReader reader, Type typeToConvert, J return JsonSerializer.Deserialize(ref reader, options); case "pattern": return JsonSerializer.Deserialize(ref reader, options); + case "simple_pattern_split": + return JsonSerializer.Deserialize(ref reader, options); + case "simple_pattern": + return JsonSerializer.Deserialize(ref reader, options); case "standard": return JsonSerializer.Deserialize(ref reader, options); + case "thai": + return JsonSerializer.Deserialize(ref reader, options); case "uax_url_email": return JsonSerializer.Deserialize(ref reader, options); case "whitespace": @@ -171,6 +191,9 @@ public override void Write(Utf8JsonWriter writer, ITokenizer value, JsonSerializ case "char_group": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CharGroupTokenizer), options); return; + case "classic": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ClassicTokenizer), options); + return; case "edge_ngram": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EdgeNGramTokenizer), options); return; @@ -201,9 +224,18 @@ public override void Write(Utf8JsonWriter writer, ITokenizer value, JsonSerializ case "pattern": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternTokenizer), options); return; + case "simple_pattern_split": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SimplePatternSplitTokenizer), options); + return; + case "simple_pattern": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SimplePatternTokenizer), options); + return; case "standard": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardTokenizer), options); return; + case "thai": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiTokenizer), options); + return; case "uax_url_email": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.UaxEmailUrlTokenizer), options); return; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs index e96acb32e06..9ae6aadc90c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs @@ -35,6 +35,8 @@ public sealed partial class CurrentNode public string Id { get; init; } [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } + [JsonInclude, JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } [JsonInclude, JsonPropertyName("transport_address")] public string TransportAddress { get; init; } [JsonInclude, JsonPropertyName("weight_ranking")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs index e9f1e22a8a7..8731a5b847d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs @@ -45,6 +45,8 @@ public sealed partial class IndexHealthStats public IReadOnlyDictionary? Shards { get; init; } [JsonInclude, JsonPropertyName("status")] public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } + [JsonInclude, JsonPropertyName("unassigned_primary_shards")] + public int UnassignedPrimaryShards { get; init; } [JsonInclude, JsonPropertyName("unassigned_shards")] public int UnassignedShards { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs index a7d5a34d3cb..9eddb8404ad 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs @@ -39,6 +39,8 @@ public sealed partial class NodeAllocationExplanation public string NodeId { get; init; } [JsonInclude, JsonPropertyName("node_name")] public string NodeName { get; init; } + [JsonInclude, JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } [JsonInclude, JsonPropertyName("store")] public Elastic.Clients.Elasticsearch.Serverless.Cluster.AllocationStore? Store { get; init; } [JsonInclude, JsonPropertyName("transport_address")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs index 36433d2d2fb..0c606274b01 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs @@ -39,6 +39,8 @@ public sealed partial class ShardHealthStats public int RelocatingShards { get; init; } [JsonInclude, JsonPropertyName("status")] public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } + [JsonInclude, JsonPropertyName("unassigned_primary_shards")] + public int UnassignedPrimaryShards { get; init; } [JsonInclude, JsonPropertyName("unassigned_shards")] public int UnassignedShards { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs index 18394575b9a..b37d0f1d624 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs @@ -29,6 +29,8 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; public sealed partial class AggregationProfileDebug { + [JsonInclude, JsonPropertyName("brute_force_used")] + public int? BruteForceUsed { get; init; } [JsonInclude, JsonPropertyName("built_buckets")] public int? BuiltBuckets { get; init; } [JsonInclude, JsonPropertyName("chars_fetched")] @@ -45,6 +47,10 @@ public sealed partial class AggregationProfileDebug public string? Delegate { get; init; } [JsonInclude, JsonPropertyName("delegate_debug")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.AggregationProfileDebug? DelegateDebug { get; init; } + [JsonInclude, JsonPropertyName("dynamic_pruning_attempted")] + public int? DynamicPruningAttempted { get; init; } + [JsonInclude, JsonPropertyName("dynamic_pruning_used")] + public int? DynamicPruningUsed { get; init; } [JsonInclude, JsonPropertyName("empty_collectors_used")] public int? EmptyCollectorsUsed { get; init; } [JsonInclude, JsonPropertyName("extract_count")] @@ -77,6 +83,8 @@ public sealed partial class AggregationProfileDebug public int? SegmentsWithMultiValuedOrds { get; init; } [JsonInclude, JsonPropertyName("segments_with_single_valued_ords")] public int? SegmentsWithSingleValuedOrds { get; init; } + [JsonInclude, JsonPropertyName("skipped_due_to_no_data")] + public int? SkippedDueToNoData { get; init; } [JsonInclude, JsonPropertyName("string_hashing_collectors_used")] public int? StringHashingCollectorsUsed { get; init; } [JsonInclude, JsonPropertyName("surviving_buckets")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs new file mode 100644 index 00000000000..e530248121d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs @@ -0,0 +1,40 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsKnnProfile +{ + [JsonInclude, JsonPropertyName("collector")] + public IReadOnlyCollection Collector { get; init; } + [JsonInclude, JsonPropertyName("query")] + public IReadOnlyCollection Query { get; init; } + [JsonInclude, JsonPropertyName("rewrite_time")] + public long RewriteTime { get; init; } + [JsonInclude, JsonPropertyName("vector_operations_count")] + public long? VectorOperationsCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs new file mode 100644 index 00000000000..9382b2458b4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.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. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsProfile +{ + [JsonInclude, JsonPropertyName("knn")] + public IReadOnlyCollection? Knn { get; init; } + [JsonInclude, JsonPropertyName("statistics")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsStatisticsProfile? Statistics { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs new file mode 100644 index 00000000000..c1e450ddf09 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs @@ -0,0 +1,48 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsStatisticsBreakdown +{ + [JsonInclude, JsonPropertyName("collection_statistics")] + public long CollectionStatistics { get; init; } + [JsonInclude, JsonPropertyName("collection_statistics_count")] + public long CollectionStatisticsCount { get; init; } + [JsonInclude, JsonPropertyName("create_weight")] + public long CreateWeight { get; init; } + [JsonInclude, JsonPropertyName("create_weight_count")] + public long CreateWeightCount { get; init; } + [JsonInclude, JsonPropertyName("rewrite")] + public long Rewrite { get; init; } + [JsonInclude, JsonPropertyName("rewrite_count")] + public long RewriteCount { get; init; } + [JsonInclude, JsonPropertyName("term_statistics")] + public long TermStatistics { get; init; } + [JsonInclude, JsonPropertyName("term_statistics_count")] + public long TermStatisticsCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs new file mode 100644 index 00000000000..45ca7daa2a6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs @@ -0,0 +1,46 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsStatisticsProfile +{ + [JsonInclude, JsonPropertyName("breakdown")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsStatisticsBreakdown Breakdown { get; init; } + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("debug")] + public IReadOnlyDictionary? Debug { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string Description { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs index db68c554542..4950958526d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs @@ -40,7 +40,7 @@ public sealed partial class Hit [JsonInclude, JsonPropertyName("_ignored")] public IReadOnlyCollection? Ignored { get; init; } [JsonInclude, JsonPropertyName("ignored_field_values")] - public IReadOnlyDictionary>? IgnoredFieldValues { get; init; } + public IReadOnlyDictionary>? IgnoredFieldValues { get; init; } [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("inner_hits")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs new file mode 100644 index 00000000000..d75e41dce07 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs @@ -0,0 +1,42 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class KnnCollectorResult +{ + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + [JsonInclude, JsonPropertyName("reason")] + public string Reason { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs new file mode 100644 index 00000000000..1cd52e5c480 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs @@ -0,0 +1,72 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class KnnQueryProfileBreakdown +{ + [JsonInclude, JsonPropertyName("advance")] + public long Advance { get; init; } + [JsonInclude, JsonPropertyName("advance_count")] + public long AdvanceCount { get; init; } + [JsonInclude, JsonPropertyName("build_scorer")] + public long BuildScorer { get; init; } + [JsonInclude, JsonPropertyName("build_scorer_count")] + public long BuildScorerCount { get; init; } + [JsonInclude, JsonPropertyName("compute_max_score")] + public long ComputeMaxScore { get; init; } + [JsonInclude, JsonPropertyName("compute_max_score_count")] + public long ComputeMaxScoreCount { get; init; } + [JsonInclude, JsonPropertyName("count_weight")] + public long CountWeight { get; init; } + [JsonInclude, JsonPropertyName("count_weight_count")] + public long CountWeightCount { get; init; } + [JsonInclude, JsonPropertyName("create_weight")] + public long CreateWeight { get; init; } + [JsonInclude, JsonPropertyName("create_weight_count")] + public long CreateWeightCount { get; init; } + [JsonInclude, JsonPropertyName("match")] + public long Match { get; init; } + [JsonInclude, JsonPropertyName("match_count")] + public long MatchCount { get; init; } + [JsonInclude, JsonPropertyName("next_doc")] + public long NextDoc { get; init; } + [JsonInclude, JsonPropertyName("next_doc_count")] + public long NextDocCount { get; init; } + [JsonInclude, JsonPropertyName("score")] + public long Score { get; init; } + [JsonInclude, JsonPropertyName("score_count")] + public long ScoreCount { get; init; } + [JsonInclude, JsonPropertyName("set_min_competitive_score")] + public long SetMinCompetitiveScore { get; init; } + [JsonInclude, JsonPropertyName("set_min_competitive_score_count")] + public long SetMinCompetitiveScoreCount { get; init; } + [JsonInclude, JsonPropertyName("shallow_advance")] + public long ShallowAdvance { get; init; } + [JsonInclude, JsonPropertyName("shallow_advance_count")] + public long ShallowAdvanceCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs new file mode 100644 index 00000000000..cc0b60423d2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs @@ -0,0 +1,46 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class KnnQueryProfileResult +{ + [JsonInclude, JsonPropertyName("breakdown")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.KnnQueryProfileBreakdown Breakdown { get; init; } + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("debug")] + public IReadOnlyDictionary? Debug { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string Description { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs index 68c7c76cddf..d1437731867 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs @@ -41,6 +41,10 @@ public sealed partial class QueryBreakdown public long ComputeMaxScore { get; init; } [JsonInclude, JsonPropertyName("compute_max_score_count")] public long ComputeMaxScoreCount { get; init; } + [JsonInclude, JsonPropertyName("count_weight")] + public long CountWeight { get; init; } + [JsonInclude, JsonPropertyName("count_weight_count")] + public long CountWeightCount { get; init; } [JsonInclude, JsonPropertyName("create_weight")] public long CreateWeight { get; init; } [JsonInclude, JsonPropertyName("create_weight_count")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs index b7f93f0ad9d..f06dd7d80c0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs @@ -31,10 +31,20 @@ public sealed partial class ShardProfile { [JsonInclude, JsonPropertyName("aggregations")] public IReadOnlyCollection Aggregations { get; init; } + [JsonInclude, JsonPropertyName("cluster")] + public string Cluster { get; init; } + [JsonInclude, JsonPropertyName("dfs")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsProfile? Dfs { get; init; } [JsonInclude, JsonPropertyName("fetch")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FetchProfile? Fetch { get; init; } [JsonInclude, JsonPropertyName("id")] public string Id { get; init; } + [JsonInclude, JsonPropertyName("index")] + public string Index { get; init; } + [JsonInclude, JsonPropertyName("node_id")] + public string NodeId { get; init; } [JsonInclude, JsonPropertyName("searches")] public IReadOnlyCollection Searches { get; init; } + [JsonInclude, JsonPropertyName("shard_id")] + public long ShardId { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs index bd7b388718d..333b77ee818 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs @@ -35,8 +35,14 @@ public sealed partial class CacheStats public int Evictions { get; init; } [JsonInclude, JsonPropertyName("hits")] public int Hits { get; init; } + [JsonInclude, JsonPropertyName("hits_time_in_millis")] + public long HitsTimeInMillis { get; init; } [JsonInclude, JsonPropertyName("misses")] public int Misses { get; init; } + [JsonInclude, JsonPropertyName("misses_time_in_millis")] + public long MissesTimeInMillis { get; init; } [JsonInclude, JsonPropertyName("node_id")] public string NodeId { get; init; } + [JsonInclude, JsonPropertyName("size_in_bytes")] + public long SizeInBytes { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs new file mode 100644 index 00000000000..9f3b55c714b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Esql; + +[JsonConverter(typeof(EsqlFormatConverter))] +public enum EsqlFormat +{ + [EnumMember(Value = "yaml")] + Yaml, + [EnumMember(Value = "txt")] + Txt, + [EnumMember(Value = "tsv")] + Tsv, + [EnumMember(Value = "smile")] + Smile, + [EnumMember(Value = "json")] + Json, + [EnumMember(Value = "csv")] + Csv, + [EnumMember(Value = "cbor")] + Cbor, + [EnumMember(Value = "arrow")] + Arrow +} + +internal sealed class EsqlFormatConverter : JsonConverter +{ + public override EsqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yaml": + return EsqlFormat.Yaml; + case "txt": + return EsqlFormat.Txt; + case "tsv": + return EsqlFormat.Tsv; + case "smile": + return EsqlFormat.Smile; + case "json": + return EsqlFormat.Json; + case "csv": + return EsqlFormat.Csv; + case "cbor": + return EsqlFormat.Cbor; + case "arrow": + return EsqlFormat.Arrow; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, EsqlFormat value, JsonSerializerOptions options) + { + switch (value) + { + case EsqlFormat.Yaml: + writer.WriteStringValue("yaml"); + return; + case EsqlFormat.Txt: + writer.WriteStringValue("txt"); + return; + case EsqlFormat.Tsv: + writer.WriteStringValue("tsv"); + return; + case EsqlFormat.Smile: + writer.WriteStringValue("smile"); + return; + case EsqlFormat.Json: + writer.WriteStringValue("json"); + return; + case EsqlFormat.Csv: + writer.WriteStringValue("csv"); + return; + case EsqlFormat.Cbor: + writer.WriteStringValue("cbor"); + return; + case EsqlFormat.Arrow: + writer.WriteStringValue("arrow"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs index 79956b3e4c1..6d0a3acaabb 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs @@ -105,6 +105,97 @@ public override void Write(Utf8JsonWriter writer, ConvertType value, JsonSeriali } } +[JsonConverter(typeof(GeoGridTargetFormatConverter))] +public enum GeoGridTargetFormat +{ + [EnumMember(Value = "wkt")] + Wkt, + [EnumMember(Value = "geojson")] + Geojson +} + +internal sealed class GeoGridTargetFormatConverter : JsonConverter +{ + public override GeoGridTargetFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "wkt": + return GeoGridTargetFormat.Wkt; + case "geojson": + return GeoGridTargetFormat.Geojson; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, GeoGridTargetFormat value, JsonSerializerOptions options) + { + switch (value) + { + case GeoGridTargetFormat.Wkt: + writer.WriteStringValue("wkt"); + return; + case GeoGridTargetFormat.Geojson: + writer.WriteStringValue("geojson"); + return; + } + + writer.WriteNullValue(); + } +} + +[JsonConverter(typeof(GeoGridTileTypeConverter))] +public enum GeoGridTileType +{ + [EnumMember(Value = "geotile")] + Geotile, + [EnumMember(Value = "geohex")] + Geohex, + [EnumMember(Value = "geohash")] + Geohash +} + +internal sealed class GeoGridTileTypeConverter : JsonConverter +{ + public override GeoGridTileType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "geotile": + return GeoGridTileType.Geotile; + case "geohex": + return GeoGridTileType.Geohex; + case "geohash": + return GeoGridTileType.Geohash; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, GeoGridTileType value, JsonSerializerOptions options) + { + switch (value) + { + case GeoGridTileType.Geotile: + writer.WriteStringValue("geotile"); + return; + case GeoGridTileType.Geohex: + writer.WriteStringValue("geohex"); + return; + case GeoGridTileType.Geohash: + writer.WriteStringValue("geohash"); + return; + } + + writer.WriteNullValue(); + } +} + [JsonConverter(typeof(JsonProcessorConflictStrategyConverter))] public enum JsonProcessorConflictStrategy { @@ -202,26 +293,16 @@ public override void Write(Utf8JsonWriter writer, ShapeType value, JsonSerialize [JsonConverter(typeof(UserAgentPropertyConverter))] public enum UserAgentProperty { - [EnumMember(Value = "PATCH")] - Patch, - [EnumMember(Value = "OS_NAME")] - OsName, - [EnumMember(Value = "OS_MINOR")] - OsMinor, - [EnumMember(Value = "OS_MAJOR")] - OsMajor, - [EnumMember(Value = "OS")] + [EnumMember(Value = "version")] + Version, + [EnumMember(Value = "os")] Os, - [EnumMember(Value = "NAME")] + [EnumMember(Value = "original")] + Original, + [EnumMember(Value = "name")] Name, - [EnumMember(Value = "MINOR")] - Minor, - [EnumMember(Value = "MAJOR")] - Major, - [EnumMember(Value = "DEVICE")] - Device, - [EnumMember(Value = "BUILD")] - Build + [EnumMember(Value = "device")] + Device } internal sealed class UserAgentPropertyConverter : JsonConverter @@ -231,26 +312,16 @@ public override UserAgentProperty Read(ref Utf8JsonReader reader, Type typeToCon var enumString = reader.GetString(); switch (enumString) { - case "PATCH": - return UserAgentProperty.Patch; - case "OS_NAME": - return UserAgentProperty.OsName; - case "OS_MINOR": - return UserAgentProperty.OsMinor; - case "OS_MAJOR": - return UserAgentProperty.OsMajor; - case "OS": + case "version": + return UserAgentProperty.Version; + case "os": return UserAgentProperty.Os; - case "NAME": + case "original": + return UserAgentProperty.Original; + case "name": return UserAgentProperty.Name; - case "MINOR": - return UserAgentProperty.Minor; - case "MAJOR": - return UserAgentProperty.Major; - case "DEVICE": + case "device": return UserAgentProperty.Device; - case "BUILD": - return UserAgentProperty.Build; } ThrowHelper.ThrowJsonException(); @@ -261,35 +332,20 @@ public override void Write(Utf8JsonWriter writer, UserAgentProperty value, JsonS { switch (value) { - case UserAgentProperty.Patch: - writer.WriteStringValue("PATCH"); - return; - case UserAgentProperty.OsName: - writer.WriteStringValue("OS_NAME"); - return; - case UserAgentProperty.OsMinor: - writer.WriteStringValue("OS_MINOR"); - return; - case UserAgentProperty.OsMajor: - writer.WriteStringValue("OS_MAJOR"); + case UserAgentProperty.Version: + writer.WriteStringValue("version"); return; case UserAgentProperty.Os: - writer.WriteStringValue("OS"); + writer.WriteStringValue("os"); return; - case UserAgentProperty.Name: - writer.WriteStringValue("NAME"); + case UserAgentProperty.Original: + writer.WriteStringValue("original"); return; - case UserAgentProperty.Minor: - writer.WriteStringValue("MINOR"); - return; - case UserAgentProperty.Major: - writer.WriteStringValue("MAJOR"); + case UserAgentProperty.Name: + writer.WriteStringValue("name"); return; case UserAgentProperty.Device: - writer.WriteStringValue("DEVICE"); - return; - case UserAgentProperty.Build: - writer.WriteStringValue("BUILD"); + writer.WriteStringValue("device"); return; } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs index bc9ef7c13fd..31515f05fd6 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs @@ -417,12 +417,32 @@ public override void Write(Utf8JsonWriter writer, DeploymentAllocationState valu [JsonConverter(typeof(DeploymentAssignmentStateConverter))] public enum DeploymentAssignmentState { + /// + /// + /// The deployment is preparing to stop and deallocate the model from the relevant nodes. + /// + /// [EnumMember(Value = "stopping")] Stopping, + /// + /// + /// The deployment has recently started but is not yet usable; the model is not allocated on any nodes. + /// + /// [EnumMember(Value = "starting")] Starting, + /// + /// + /// The deployment is usable; at least one node has the model allocated. + /// + /// [EnumMember(Value = "started")] Started, + /// + /// + /// The deployment is on a failed state and must be re-deployed. + /// + /// [EnumMember(Value = "failed")] Failed } @@ -470,70 +490,6 @@ public override void Write(Utf8JsonWriter writer, DeploymentAssignmentState valu } } -[JsonConverter(typeof(DeploymentStateConverter))] -public enum DeploymentState -{ - /// - /// - /// The deployment is preparing to stop and deallocate the model from the relevant nodes. - /// - /// - [EnumMember(Value = "stopping")] - Stopping, - /// - /// - /// The deployment has recently started but is not yet usable; the model is not allocated on any nodes. - /// - /// - [EnumMember(Value = "starting")] - Starting, - /// - /// - /// The deployment is usable; at least one node has the model allocated. - /// - /// - [EnumMember(Value = "started")] - Started -} - -internal sealed class DeploymentStateConverter : JsonConverter -{ - public override DeploymentState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopping": - return DeploymentState.Stopping; - case "starting": - return DeploymentState.Starting; - case "started": - return DeploymentState.Started; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DeploymentState value, JsonSerializerOptions options) - { - switch (value) - { - case DeploymentState.Stopping: - writer.WriteStringValue("stopping"); - return; - case DeploymentState.Starting: - writer.WriteStringValue("starting"); - return; - case DeploymentState.Started: - writer.WriteStringValue("started"); - return; - } - - writer.WriteNullValue(); - } -} - [JsonConverter(typeof(ExcludeFrequentConverter))] public enum ExcludeFrequent { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs new file mode 100644 index 00000000000..4cdbebbc92a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs @@ -0,0 +1,106 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Sql; + +[JsonConverter(typeof(SqlFormatConverter))] +public enum SqlFormat +{ + [EnumMember(Value = "yaml")] + Yaml, + [EnumMember(Value = "txt")] + Txt, + [EnumMember(Value = "tsv")] + Tsv, + [EnumMember(Value = "smile")] + Smile, + [EnumMember(Value = "json")] + Json, + [EnumMember(Value = "csv")] + Csv, + [EnumMember(Value = "cbor")] + Cbor +} + +internal sealed class SqlFormatConverter : JsonConverter +{ + public override SqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yaml": + return SqlFormat.Yaml; + case "txt": + return SqlFormat.Txt; + case "tsv": + return SqlFormat.Tsv; + case "smile": + return SqlFormat.Smile; + case "json": + return SqlFormat.Json; + case "csv": + return SqlFormat.Csv; + case "cbor": + return SqlFormat.Cbor; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, SqlFormat value, JsonSerializerOptions options) + { + switch (value) + { + case SqlFormat.Yaml: + writer.WriteStringValue("yaml"); + return; + case SqlFormat.Txt: + writer.WriteStringValue("txt"); + return; + case SqlFormat.Tsv: + writer.WriteStringValue("tsv"); + return; + case SqlFormat.Smile: + writer.WriteStringValue("smile"); + return; + case SqlFormat.Json: + writer.WriteStringValue("json"); + return; + case SqlFormat.Csv: + writer.WriteStringValue("csv"); + return; + case SqlFormat.Cbor: + writer.WriteStringValue("cbor"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs new file mode 100644 index 00000000000..e217b5508b1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs @@ -0,0 +1,78 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; + +[JsonConverter(typeof(XPackCategoryConverter))] +public enum XPackCategory +{ + [EnumMember(Value = "license")] + License, + [EnumMember(Value = "features")] + Features, + [EnumMember(Value = "build")] + Build +} + +internal sealed class XPackCategoryConverter : JsonConverter +{ + public override XPackCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "license": + return XPackCategory.License; + case "features": + return XPackCategory.Features; + case "build": + return XPackCategory.Build; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, XPackCategory value, JsonSerializerOptions options) + { + switch (value) + { + case XPackCategory.License: + writer.WriteStringValue("license"); + return; + case XPackCategory.Features: + writer.WriteStringValue("features"); + return; + case XPackCategory.Build: + writer.WriteStringValue("build"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs index 0e2b0839e9a..d90d96e78bf 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -94,6 +94,7 @@ public sealed partial class AppendProcessor /// /// [JsonInclude, JsonPropertyName("value")] + [SingleOrManyCollectionConverter(typeof(object))] public ICollection Value { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(AppendProcessor appendProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Append(appendProcessor); @@ -331,7 +332,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); + SingleOrManySerializationHelper.Serialize(ValueValue, writer, options); writer.WriteEndObject(); } } @@ -568,7 +569,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); + SingleOrManySerializationHelper.Serialize(ValueValue, writer, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs index f311c327dd7..e0c64014ac1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs @@ -71,6 +71,16 @@ public sealed partial class DotExpanderProcessor [JsonInclude, JsonPropertyName("on_failure")] public ICollection? OnFailure { get; set; } + /// + /// + /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + /// When false, the processor will merge conflicts by combining the old and the new values into an array. + /// When true, the value from the expanded field will overwrite the existing value. + /// + /// + [JsonInclude, JsonPropertyName("override")] + public bool? Override { get; set; } + /// /// /// The field that contains the field to expand. @@ -108,6 +118,7 @@ public DotExpanderProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } + private bool? OverrideValue { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } @@ -222,6 +233,19 @@ public DotExpanderProcessorDescriptor OnFailure(params Action + /// + /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + /// When false, the processor will merge conflicts by combining the old and the new values into an array. + /// When true, the value from the expanded field will overwrite the existing value. + /// + /// + public DotExpanderProcessorDescriptor Override(bool? value = true) + { + OverrideValue = value; + return Self; + } + /// /// /// The field that contains the field to expand. @@ -300,6 +324,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } + if (OverrideValue.HasValue) + { + writer.WritePropertyName("override"); + writer.WriteBooleanValue(OverrideValue.Value); + } + if (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); @@ -332,6 +362,7 @@ public DotExpanderProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } + private bool? OverrideValue { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } @@ -446,6 +477,19 @@ public DotExpanderProcessorDescriptor OnFailure(params Action + /// + /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + /// When false, the processor will merge conflicts by combining the old and the new values into an array. + /// When true, the value from the expanded field will overwrite the existing value. + /// + /// + public DotExpanderProcessorDescriptor Override(bool? value = true) + { + OverrideValue = value; + return Self; + } + /// /// /// The field that contains the field to expand. @@ -524,6 +568,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } + if (OverrideValue.HasValue) + { + writer.WritePropertyName("override"); + writer.WriteBooleanValue(OverrideValue.Value); + } + if (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs new file mode 100644 index 00000000000..869d5a103e6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs @@ -0,0 +1,1010 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; + +public sealed partial class GeoGridProcessor +{ + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + [JsonInclude, JsonPropertyName("children_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? ChildrenField { get; set; } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// The field to interpret as a geo-tile.= + /// The field format is determined by the tile_type. + /// + /// + [JsonInclude, JsonPropertyName("field")] + public string Field { get; set; } + + /// + /// + /// Conditionally execute the processor. + /// + /// + [JsonInclude, JsonPropertyName("if")] + public string? If { get; set; } + + /// + /// + /// Ignore failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("ignore_failure")] + public bool? IgnoreFailure { get; set; } + + /// + /// + /// If true and field does not exist, the processor quietly exits without modifying the document. + /// + /// + [JsonInclude, JsonPropertyName("ignore_missing")] + public bool? IgnoreMissing { get; set; } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + [JsonInclude, JsonPropertyName("non_children_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? NonChildrenField { get; set; } + + /// + /// + /// Handle failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("on_failure")] + public ICollection? OnFailure { get; set; } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + [JsonInclude, JsonPropertyName("parent_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? ParentField { get; set; } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + [JsonInclude, JsonPropertyName("precision_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? PrecisionField { get; set; } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + [JsonInclude, JsonPropertyName("tag")] + public string? Tag { get; set; } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + [JsonInclude, JsonPropertyName("target_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } + + /// + /// + /// Which format to save the generated polygon in. + /// + /// + [JsonInclude, JsonPropertyName("target_format")] + public Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? TargetFormat { get; set; } + + /// + /// + /// Three tile formats are understood: geohash, geotile and geohex. + /// + /// + [JsonInclude, JsonPropertyName("tile_type")] + public Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType TileType { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(GeoGridProcessor geoGridProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.GeoGrid(geoGridProcessor); +} + +public sealed partial class GeoGridProcessorDescriptor : SerializableDescriptor> +{ + internal GeoGridProcessorDescriptor(Action> configure) => configure.Invoke(this); + + public GeoGridProcessorDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Field? ChildrenFieldValue { get; set; } + private string? DescriptionValue { get; set; } + private string FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? NonChildrenFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? ParentFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? PrecisionFieldValue { get; set; } + private string? TagValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? TargetFormatValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType TileTypeValue { get; set; } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public GeoGridProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to interpret as a geo-tile.= + /// The field format is determined by the tile_type. + /// + /// + public GeoGridProcessorDescriptor Field(string field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public GeoGridProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public GeoGridProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist, the processor quietly exits without modifying the document. + /// + /// + public GeoGridProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public GeoGridProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Elastic.Clients.Elasticsearch.Serverless.Field? parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Elastic.Clients.Elasticsearch.Serverless.Field? precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public GeoGridProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// Which format to save the generated polygon in. + /// + /// + public GeoGridProcessorDescriptor TargetFormat(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? targetFormat) + { + TargetFormatValue = targetFormat; + return Self; + } + + /// + /// + /// Three tile formats are understood: geohash, geotile and geohex. + /// + /// + public GeoGridProcessorDescriptor TileType(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType tileType) + { + TileTypeValue = tileType; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ChildrenFieldValue is not null) + { + writer.WritePropertyName("children_field"); + JsonSerializer.Serialize(writer, ChildrenFieldValue, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + writer.WriteStringValue(FieldValue); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (NonChildrenFieldValue is not null) + { + writer.WritePropertyName("non_children_field"); + JsonSerializer.Serialize(writer, NonChildrenFieldValue, options); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (ParentFieldValue is not null) + { + writer.WritePropertyName("parent_field"); + JsonSerializer.Serialize(writer, ParentFieldValue, options); + } + + if (PrecisionFieldValue is not null) + { + writer.WritePropertyName("precision_field"); + JsonSerializer.Serialize(writer, PrecisionFieldValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + if (TargetFieldValue is not null) + { + writer.WritePropertyName("target_field"); + JsonSerializer.Serialize(writer, TargetFieldValue, options); + } + + if (TargetFormatValue is not null) + { + writer.WritePropertyName("target_format"); + JsonSerializer.Serialize(writer, TargetFormatValue, options); + } + + writer.WritePropertyName("tile_type"); + JsonSerializer.Serialize(writer, TileTypeValue, options); + writer.WriteEndObject(); + } +} + +public sealed partial class GeoGridProcessorDescriptor : SerializableDescriptor +{ + internal GeoGridProcessorDescriptor(Action configure) => configure.Invoke(this); + + public GeoGridProcessorDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Field? ChildrenFieldValue { get; set; } + private string? DescriptionValue { get; set; } + private string FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? NonChildrenFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? ParentFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? PrecisionFieldValue { get; set; } + private string? TagValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? TargetFormatValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType TileTypeValue { get; set; } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public GeoGridProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to interpret as a geo-tile.= + /// The field format is determined by the tile_type. + /// + /// + public GeoGridProcessorDescriptor Field(string field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public GeoGridProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public GeoGridProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist, the processor quietly exits without modifying the document. + /// + /// + public GeoGridProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public GeoGridProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Elastic.Clients.Elasticsearch.Serverless.Field? parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Elastic.Clients.Elasticsearch.Serverless.Field? precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public GeoGridProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// Which format to save the generated polygon in. + /// + /// + public GeoGridProcessorDescriptor TargetFormat(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? targetFormat) + { + TargetFormatValue = targetFormat; + return Self; + } + + /// + /// + /// Three tile formats are understood: geohash, geotile and geohex. + /// + /// + public GeoGridProcessorDescriptor TileType(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType tileType) + { + TileTypeValue = tileType; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ChildrenFieldValue is not null) + { + writer.WritePropertyName("children_field"); + JsonSerializer.Serialize(writer, ChildrenFieldValue, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + writer.WriteStringValue(FieldValue); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (NonChildrenFieldValue is not null) + { + writer.WritePropertyName("non_children_field"); + JsonSerializer.Serialize(writer, NonChildrenFieldValue, options); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (ParentFieldValue is not null) + { + writer.WritePropertyName("parent_field"); + JsonSerializer.Serialize(writer, ParentFieldValue, options); + } + + if (PrecisionFieldValue is not null) + { + writer.WritePropertyName("precision_field"); + JsonSerializer.Serialize(writer, PrecisionFieldValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + if (TargetFieldValue is not null) + { + writer.WritePropertyName("target_field"); + JsonSerializer.Serialize(writer, TargetFieldValue, options); + } + + if (TargetFormatValue is not null) + { + writer.WritePropertyName("target_format"); + JsonSerializer.Serialize(writer, TargetFormatValue, options); + } + + writer.WritePropertyName("tile_type"); + JsonSerializer.Serialize(writer, TileTypeValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs index 0a7368724f1..7cb501b0299 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs @@ -46,6 +46,15 @@ public sealed partial class GeoIpProcessor [JsonInclude, JsonPropertyName("description")] public string? Description { get; set; } + /// + /// + /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. + /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. + /// + /// + [JsonInclude, JsonPropertyName("download_database_on_pipeline_creation")] + public bool? DownloadDatabaseOnPipelineCreation { get; set; } + /// /// /// The field to get the ip address from for the geographical lookup. @@ -132,6 +141,7 @@ public GeoIpProcessorDescriptor() : base() private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } + private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private bool? FirstOnlyValue { get; set; } private string? IfValue { get; set; } @@ -168,6 +178,18 @@ public GeoIpProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. + /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. + /// + /// + public GeoIpProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) + { + DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; + return Self; + } + /// /// /// The field to get the ip address from for the geographical lookup. @@ -357,6 +379,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (DownloadDatabaseOnPipelineCreationValue.HasValue) + { + writer.WritePropertyName("download_database_on_pipeline_creation"); + writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (FirstOnlyValue.HasValue) @@ -446,6 +474,7 @@ public GeoIpProcessorDescriptor() : base() private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } + private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private bool? FirstOnlyValue { get; set; } private string? IfValue { get; set; } @@ -482,6 +511,18 @@ public GeoIpProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. + /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. + /// + /// + public GeoIpProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) + { + DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; + return Self; + } + /// /// /// The field to get the ip address from for the geographical lookup. @@ -671,6 +712,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (DownloadDatabaseOnPipelineCreationValue.HasValue) + { + writer.WritePropertyName("download_database_on_pipeline_creation"); + writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (FirstOnlyValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs index 617925202ea..7cbfd0a3e85 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs @@ -29,6 +29,15 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; public sealed partial class Pipeline { + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + /// /// /// Description of the ingest pipeline. @@ -79,6 +88,7 @@ public PipelineDescriptor() : base() { } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -91,6 +101,18 @@ public PipelineDescriptor() : base() private Action>[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PipelineDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -210,6 +232,12 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -302,6 +330,7 @@ public PipelineDescriptor() : base() { } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -314,6 +343,18 @@ public PipelineDescriptor() : base() private Action[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PipelineDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -433,6 +474,12 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs index 2480b2f8bca..e55af2cc02a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs @@ -60,6 +60,7 @@ internal Processor(string variantName, object variant) public static Processor Enrich(Elastic.Clients.Elasticsearch.Serverless.Ingest.EnrichProcessor enrichProcessor) => new Processor("enrich", enrichProcessor); public static Processor Fail(Elastic.Clients.Elasticsearch.Serverless.Ingest.FailProcessor failProcessor) => new Processor("fail", failProcessor); public static Processor Foreach(Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor foreachProcessor) => new Processor("foreach", foreachProcessor); + public static Processor GeoGrid(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor geoGridProcessor) => new Processor("geo_grid", geoGridProcessor); public static Processor Geoip(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor geoIpProcessor) => new Processor("geoip", geoIpProcessor); public static Processor Grok(Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor grokProcessor) => new Processor("grok", grokProcessor); public static Processor Gsub(Elastic.Clients.Elasticsearch.Serverless.Ingest.GsubProcessor gsubProcessor) => new Processor("gsub", gsubProcessor); @@ -70,6 +71,7 @@ internal Processor(string variantName, object variant) public static Processor Kv(Elastic.Clients.Elasticsearch.Serverless.Ingest.KeyValueProcessor keyValueProcessor) => new Processor("kv", keyValueProcessor); public static Processor Lowercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.LowercaseProcessor lowercaseProcessor) => new Processor("lowercase", lowercaseProcessor); public static Processor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => new Processor("pipeline", pipelineProcessor); + public static Processor Redact(Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor redactProcessor) => new Processor("redact", redactProcessor); public static Processor Remove(Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor removeProcessor) => new Processor("remove", removeProcessor); public static Processor Rename(Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor renameProcessor) => new Processor("rename", renameProcessor); public static Processor Reroute(Elastic.Clients.Elasticsearch.Serverless.Ingest.RerouteProcessor rerouteProcessor) => new Processor("reroute", rerouteProcessor); @@ -220,6 +222,13 @@ public override Processor Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } + if (propertyName == "geo_grid") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "geoip") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -290,6 +299,13 @@ public override Processor Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } + if (propertyName == "redact") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "remove") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -438,6 +454,9 @@ public override void Write(Utf8JsonWriter writer, Processor value, JsonSerialize case "foreach": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor)value.Variant, options); break; + case "geo_grid": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor)value.Variant, options); + break; case "geoip": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor)value.Variant, options); break; @@ -468,6 +487,9 @@ public override void Write(Utf8JsonWriter writer, Processor value, JsonSerialize case "pipeline": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor)value.Variant, options); break; + case "redact": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor)value.Variant, options); + break; case "remove": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor)value.Variant, options); break; @@ -573,6 +595,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Fail(Action> configure) => Set(configure, "fail"); public ProcessorDescriptor Foreach(Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor foreachProcessor) => Set(foreachProcessor, "foreach"); public ProcessorDescriptor Foreach(Action> configure) => Set(configure, "foreach"); + public ProcessorDescriptor GeoGrid(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor geoGridProcessor) => Set(geoGridProcessor, "geo_grid"); + public ProcessorDescriptor GeoGrid(Action> configure) => Set(configure, "geo_grid"); public ProcessorDescriptor Geoip(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor geoIpProcessor) => Set(geoIpProcessor, "geoip"); public ProcessorDescriptor Geoip(Action> configure) => Set(configure, "geoip"); public ProcessorDescriptor Grok(Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor grokProcessor) => Set(grokProcessor, "grok"); @@ -593,6 +617,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Lowercase(Action> configure) => Set(configure, "lowercase"); public ProcessorDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => Set(pipelineProcessor, "pipeline"); public ProcessorDescriptor Pipeline(Action> configure) => Set(configure, "pipeline"); + public ProcessorDescriptor Redact(Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor redactProcessor) => Set(redactProcessor, "redact"); + public ProcessorDescriptor Redact(Action> configure) => Set(configure, "redact"); public ProcessorDescriptor Remove(Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor removeProcessor) => Set(removeProcessor, "remove"); public ProcessorDescriptor Remove(Action> configure) => Set(configure, "remove"); public ProcessorDescriptor Rename(Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); @@ -699,6 +725,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Fail(Action configure) => Set(configure, "fail"); public ProcessorDescriptor Foreach(Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor foreachProcessor) => Set(foreachProcessor, "foreach"); public ProcessorDescriptor Foreach(Action configure) => Set(configure, "foreach"); + public ProcessorDescriptor GeoGrid(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor geoGridProcessor) => Set(geoGridProcessor, "geo_grid"); + public ProcessorDescriptor GeoGrid(Action configure) => Set(configure, "geo_grid"); public ProcessorDescriptor Geoip(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor geoIpProcessor) => Set(geoIpProcessor, "geoip"); public ProcessorDescriptor Geoip(Action configure) => Set(configure, "geoip"); public ProcessorDescriptor Grok(Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor grokProcessor) => Set(grokProcessor, "grok"); @@ -719,6 +747,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Lowercase(Action configure) => Set(configure, "lowercase"); public ProcessorDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => Set(pipelineProcessor, "pipeline"); public ProcessorDescriptor Pipeline(Action configure) => Set(configure, "pipeline"); + public ProcessorDescriptor Redact(Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor redactProcessor) => Set(redactProcessor, "redact"); + public ProcessorDescriptor Redact(Action configure) => Set(configure, "redact"); public ProcessorDescriptor Remove(Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor removeProcessor) => Set(removeProcessor, "remove"); public ProcessorDescriptor Remove(Action configure) => Set(configure, "remove"); public ProcessorDescriptor Rename(Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs new file mode 100644 index 00000000000..34389a4e009 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs @@ -0,0 +1,727 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; + +public sealed partial class RedactProcessor +{ + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// The field to be redacted + /// + /// + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } + + /// + /// + /// Conditionally execute the processor. + /// + /// + [JsonInclude, JsonPropertyName("if")] + public string? If { get; set; } + + /// + /// + /// Ignore failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("ignore_failure")] + public bool? IgnoreFailure { get; set; } + + /// + /// + /// If true and field does not exist or is null, the processor quietly exits without modifying the document. + /// + /// + [JsonInclude, JsonPropertyName("ignore_missing")] + public bool? IgnoreMissing { get; set; } + + /// + /// + /// Handle failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("on_failure")] + public ICollection? OnFailure { get; set; } + [JsonInclude, JsonPropertyName("pattern_definitions")] + public IDictionary? PatternDefinitions { get; set; } + + /// + /// + /// A list of grok expressions to match and redact named captures with + /// + /// + [JsonInclude, JsonPropertyName("patterns")] + public ICollection Patterns { get; set; } + + /// + /// + /// Start a redacted section with this token + /// + /// + [JsonInclude, JsonPropertyName("prefix")] + public string? Prefix { get; set; } + + /// + /// + /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document + /// + /// + [JsonInclude, JsonPropertyName("skip_if_unlicensed")] + public bool? SkipIfUnlicensed { get; set; } + + /// + /// + /// End a redacted section with this token + /// + /// + [JsonInclude, JsonPropertyName("suffix")] + public string? Suffix { get; set; } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + [JsonInclude, JsonPropertyName("tag")] + public string? Tag { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(RedactProcessor redactProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Redact(redactProcessor); +} + +public sealed partial class RedactProcessorDescriptor : SerializableDescriptor> +{ + internal RedactProcessorDescriptor(Action> configure) => configure.Invoke(this); + + public RedactProcessorDescriptor() : base() + { + } + + private string? DescriptionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } + private IDictionary? PatternDefinitionsValue { get; set; } + private ICollection PatternsValue { get; set; } + private string? PrefixValue { get; set; } + private bool? SkipIfUnlicensedValue { get; set; } + private string? SuffixValue { get; set; } + private string? TagValue { get; set; } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public RedactProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public RedactProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public RedactProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist or is null, the processor quietly exits without modifying the document. + /// + /// + public RedactProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public RedactProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RedactProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) + { + PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// A list of grok expressions to match and redact named captures with + /// + /// + public RedactProcessorDescriptor Patterns(ICollection patterns) + { + PatternsValue = patterns; + return Self; + } + + /// + /// + /// Start a redacted section with this token + /// + /// + public RedactProcessorDescriptor Prefix(string? prefix) + { + PrefixValue = prefix; + return Self; + } + + /// + /// + /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document + /// + /// + public RedactProcessorDescriptor SkipIfUnlicensed(bool? skipIfUnlicensed = true) + { + SkipIfUnlicensedValue = skipIfUnlicensed; + return Self; + } + + /// + /// + /// End a redacted section with this token + /// + /// + public RedactProcessorDescriptor Suffix(string? suffix) + { + SuffixValue = suffix; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public RedactProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (PatternDefinitionsValue is not null) + { + writer.WritePropertyName("pattern_definitions"); + JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); + } + + writer.WritePropertyName("patterns"); + JsonSerializer.Serialize(writer, PatternsValue, options); + if (!string.IsNullOrEmpty(PrefixValue)) + { + writer.WritePropertyName("prefix"); + writer.WriteStringValue(PrefixValue); + } + + if (SkipIfUnlicensedValue.HasValue) + { + writer.WritePropertyName("skip_if_unlicensed"); + writer.WriteBooleanValue(SkipIfUnlicensedValue.Value); + } + + if (!string.IsNullOrEmpty(SuffixValue)) + { + writer.WritePropertyName("suffix"); + writer.WriteStringValue(SuffixValue); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class RedactProcessorDescriptor : SerializableDescriptor +{ + internal RedactProcessorDescriptor(Action configure) => configure.Invoke(this); + + public RedactProcessorDescriptor() : base() + { + } + + private string? DescriptionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } + private IDictionary? PatternDefinitionsValue { get; set; } + private ICollection PatternsValue { get; set; } + private string? PrefixValue { get; set; } + private bool? SkipIfUnlicensedValue { get; set; } + private string? SuffixValue { get; set; } + private string? TagValue { get; set; } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public RedactProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public RedactProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public RedactProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist or is null, the processor quietly exits without modifying the document. + /// + /// + public RedactProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public RedactProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RedactProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) + { + PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// A list of grok expressions to match and redact named captures with + /// + /// + public RedactProcessorDescriptor Patterns(ICollection patterns) + { + PatternsValue = patterns; + return Self; + } + + /// + /// + /// Start a redacted section with this token + /// + /// + public RedactProcessorDescriptor Prefix(string? prefix) + { + PrefixValue = prefix; + return Self; + } + + /// + /// + /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document + /// + /// + public RedactProcessorDescriptor SkipIfUnlicensed(bool? skipIfUnlicensed = true) + { + SkipIfUnlicensedValue = skipIfUnlicensed; + return Self; + } + + /// + /// + /// End a redacted section with this token + /// + /// + public RedactProcessorDescriptor Suffix(string? suffix) + { + SuffixValue = suffix; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public RedactProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (PatternDefinitionsValue is not null) + { + writer.WritePropertyName("pattern_definitions"); + JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); + } + + writer.WritePropertyName("patterns"); + JsonSerializer.Serialize(writer, PatternsValue, options); + if (!string.IsNullOrEmpty(PrefixValue)) + { + writer.WritePropertyName("prefix"); + writer.WriteStringValue(PrefixValue); + } + + if (SkipIfUnlicensedValue.HasValue) + { + writer.WritePropertyName("skip_if_unlicensed"); + writer.WriteBooleanValue(SkipIfUnlicensedValue.Value); + } + + if (!string.IsNullOrEmpty(SuffixValue)) + { + writer.WritePropertyName("suffix"); + writer.WriteStringValue(SuffixValue); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs index de8974bf964..d3686cd1ac9 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs @@ -38,6 +38,14 @@ public sealed partial class UserAgentProcessor [JsonInclude, JsonPropertyName("description")] public string? Description { get; set; } + /// + /// + /// Extracts device type from the user agent string on a best-effort basis. + /// + /// + [JsonInclude, JsonPropertyName("extract_device_type")] + public bool? ExtractDeviceType { get; set; } + /// /// /// The field containing the user agent string. @@ -77,8 +85,14 @@ public sealed partial class UserAgentProcessor /// [JsonInclude, JsonPropertyName("on_failure")] public ICollection? OnFailure { get; set; } - [JsonInclude, JsonPropertyName("options")] - public ICollection? Options { get; set; } + + /// + /// + /// Controls what properties are added to target_field. + /// + /// + [JsonInclude, JsonPropertyName("properties")] + public ICollection? Properties { get; set; } /// /// @@ -117,6 +131,7 @@ public UserAgentProcessorDescriptor() : base() } private string? DescriptionValue { get; set; } + private bool? ExtractDeviceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } @@ -125,7 +140,7 @@ public UserAgentProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? OptionsValue { get; set; } + private ICollection? PropertiesValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } @@ -142,6 +157,17 @@ public UserAgentProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// Extracts device type from the user agent string on a best-effort basis. + /// + /// + public UserAgentProcessorDescriptor ExtractDeviceType(bool? extractDeviceType = true) + { + ExtractDeviceTypeValue = extractDeviceType; + return Self; + } + /// /// /// The field containing the user agent string. @@ -249,9 +275,14 @@ public UserAgentProcessorDescriptor OnFailure(params Action Options(ICollection? options) + /// + /// + /// Controls what properties are added to target_field. + /// + /// + public UserAgentProcessorDescriptor Properties(ICollection? properties) { - OptionsValue = options; + PropertiesValue = properties; return Self; } @@ -320,6 +351,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (ExtractDeviceTypeValue.HasValue) + { + writer.WritePropertyName("extract_device_type"); + writer.WriteBooleanValue(ExtractDeviceTypeValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(IfValue)) @@ -371,10 +408,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (OptionsValue is not null) + if (PropertiesValue is not null) { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); } if (!string.IsNullOrEmpty(RegexFileValue)) @@ -408,6 +445,7 @@ public UserAgentProcessorDescriptor() : base() } private string? DescriptionValue { get; set; } + private bool? ExtractDeviceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } @@ -416,7 +454,7 @@ public UserAgentProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? OptionsValue { get; set; } + private ICollection? PropertiesValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } @@ -433,6 +471,17 @@ public UserAgentProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// Extracts device type from the user agent string on a best-effort basis. + /// + /// + public UserAgentProcessorDescriptor ExtractDeviceType(bool? extractDeviceType = true) + { + ExtractDeviceTypeValue = extractDeviceType; + return Self; + } + /// /// /// The field containing the user agent string. @@ -540,9 +589,14 @@ public UserAgentProcessorDescriptor OnFailure(params Action? options) + /// + /// + /// Controls what properties are added to target_field. + /// + /// + public UserAgentProcessorDescriptor Properties(ICollection? properties) { - OptionsValue = options; + PropertiesValue = properties; return Self; } @@ -611,6 +665,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (ExtractDeviceTypeValue.HasValue) + { + writer.WritePropertyName("extract_device_type"); + writer.WriteBooleanValue(ExtractDeviceTypeValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(IfValue)) @@ -662,10 +722,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (OptionsValue is not null) + if (PropertiesValue is not null) { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); } if (!string.IsNullOrEmpty(RegexFileValue)) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs index 8b324a0c0c8..1adb1897de4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs @@ -55,6 +55,30 @@ public sealed partial class CalendarEvent [JsonInclude, JsonPropertyName("event_id")] public Elastic.Clients.Elasticsearch.Serverless.Id? EventId { get; set; } + /// + /// + /// Shift time by this many seconds. For example adjust time for daylight savings changes + /// + /// + [JsonInclude, JsonPropertyName("force_time_shift")] + public int? ForceTimeShift { get; set; } + + /// + /// + /// When true the model will not be updated for this calendar period. + /// + /// + [JsonInclude, JsonPropertyName("skip_model_update")] + public bool? SkipModelUpdate { get; set; } + + /// + /// + /// When true the model will not create results for this calendar period. + /// + /// + [JsonInclude, JsonPropertyName("skip_result")] + public bool? SkipResult { get; set; } + /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -76,6 +100,9 @@ public CalendarEventDescriptor() : base() private string DescriptionValue { get; set; } private DateTimeOffset EndTimeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id? EventIdValue { get; set; } + private int? ForceTimeShiftValue { get; set; } + private bool? SkipModelUpdateValue { get; set; } + private bool? SkipResultValue { get; set; } private DateTimeOffset StartTimeValue { get; set; } /// @@ -117,6 +144,39 @@ public CalendarEventDescriptor EventId(Elastic.Clients.Elasticsearch.Serverless. return Self; } + /// + /// + /// Shift time by this many seconds. For example adjust time for daylight savings changes + /// + /// + public CalendarEventDescriptor ForceTimeShift(int? forceTimeShift) + { + ForceTimeShiftValue = forceTimeShift; + return Self; + } + + /// + /// + /// When true the model will not be updated for this calendar period. + /// + /// + public CalendarEventDescriptor SkipModelUpdate(bool? skipModelUpdate = true) + { + SkipModelUpdateValue = skipModelUpdate; + return Self; + } + + /// + /// + /// When true the model will not create results for this calendar period. + /// + /// + public CalendarEventDescriptor SkipResult(bool? skipResult = true) + { + SkipResultValue = skipResult; + return Self; + } + /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -147,6 +207,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, EventIdValue, options); } + if (ForceTimeShiftValue.HasValue) + { + writer.WritePropertyName("force_time_shift"); + writer.WriteNumberValue(ForceTimeShiftValue.Value); + } + + if (SkipModelUpdateValue.HasValue) + { + writer.WritePropertyName("skip_model_update"); + writer.WriteBooleanValue(SkipModelUpdateValue.Value); + } + + if (SkipResultValue.HasValue) + { + writer.WritePropertyName("skip_result"); + writer.WriteBooleanValue(SkipResultValue.Value); + } + writer.WritePropertyName("start_time"); JsonSerializer.Serialize(writer, StartTimeValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs index d9f682addf5..571b619d95b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs @@ -130,7 +130,7 @@ public sealed partial class TrainedModelDeploymentStats /// /// [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentState State { get; init; } + public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAssignmentState State { get; init; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs index c3ded8fb693..b28e2cb4305 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs @@ -50,8 +50,6 @@ public sealed partial class BinaryProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -74,7 +72,6 @@ public BinaryPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -152,12 +149,6 @@ public BinaryPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public BinaryPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -209,12 +200,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -235,7 +220,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -255,7 +239,6 @@ public BinaryPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -333,12 +316,6 @@ public BinaryPropertyDescriptor Properties(Action? MetaValue { get; set; } private bool? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BooleanPropertyDescriptor Boost(double? boost) @@ -208,12 +205,6 @@ public BooleanPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public BooleanPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -299,12 +290,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -353,7 +338,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -379,7 +363,6 @@ public BooleanPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private bool? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BooleanPropertyDescriptor Boost(double? boost) @@ -499,12 +482,6 @@ public BooleanPropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ByteNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public ByteNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ByteNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public ByteNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ByteNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public ByteNumberPropertyDescriptor Script(Action Analyzer(string? analyzer) @@ -239,12 +236,6 @@ public CompletionPropertyDescriptor SearchAnalyzer(string? searchAnal return Self; } - public CompletionPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public CompletionPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -357,12 +348,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -413,7 +398,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o PreserveSeparators = PreserveSeparatorsValue, Properties = PropertiesValue, SearchAnalyzer = SearchAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -442,7 +426,6 @@ public CompletionPropertyDescriptor() : base() private bool? PreserveSeparatorsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } private string? SearchAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public CompletionPropertyDescriptor Analyzer(string? analyzer) @@ -586,12 +569,6 @@ public CompletionPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) return Self; } - public CompletionPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public CompletionPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -704,12 +681,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -760,7 +731,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o PreserveSeparators = PreserveSeparatorsValue, Properties = PropertiesValue, SearchAnalyzer = SearchAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs new file mode 100644 index 00000000000..a0d3725ffa7 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs @@ -0,0 +1,59 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; + +public sealed partial class CompositeSubField +{ + [JsonInclude, JsonPropertyName("type")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType Type { get; set; } +} + +public sealed partial class CompositeSubFieldDescriptor : SerializableDescriptor +{ + internal CompositeSubFieldDescriptor(Action configure) => configure.Invoke(this); + + public CompositeSubFieldDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType TypeValue { get; set; } + + public CompositeSubFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType type) + { + TypeValue = type; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + JsonSerializer.Serialize(writer, TypeValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs index c41e1563ea2..9cc89e12a5b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs @@ -62,8 +62,6 @@ public sealed partial class DateNanosProperty : IProperty public int? PrecisionStep { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -92,7 +90,6 @@ public DateNanosPropertyDescriptor() : base() private DateTimeOffset? NullValueValue { get; set; } private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateNanosPropertyDescriptor Boost(double? boost) @@ -206,12 +203,6 @@ public DateNanosPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DateNanosPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -299,12 +290,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -331,7 +316,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -357,7 +341,6 @@ public DateNanosPropertyDescriptor() : base() private DateTimeOffset? NullValueValue { get; set; } private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateNanosPropertyDescriptor Boost(double? boost) @@ -471,12 +454,6 @@ public DateNanosPropertyDescriptor Properties(Action Boost(double? boost) @@ -244,12 +241,6 @@ public DatePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DatePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -359,12 +350,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -417,7 +402,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -447,7 +431,6 @@ public DatePropertyDescriptor() : base() private DateTimeOffset? NullValueValue { get; set; } private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DatePropertyDescriptor Boost(double? boost) @@ -591,12 +574,6 @@ public DatePropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -86,7 +84,6 @@ public DateRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateRangePropertyDescriptor Boost(double? boost) @@ -188,12 +185,6 @@ public DateRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DateRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -269,12 +260,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -299,7 +284,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -323,7 +307,6 @@ public DateRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateRangePropertyDescriptor Boost(double? boost) @@ -425,12 +408,6 @@ public DateRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DoubleNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public DoubleNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DoubleNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public DoubleNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DoubleNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public DoubleNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public DoubleRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DoubleRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public DoubleRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DoubleRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public DoubleRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DoubleRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public DoubleRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } private string? SearchAnalyzerValue { get; set; } private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -378,12 +375,6 @@ public DynamicPropertyDescriptor SearchQuoteAnalyzer(string? searchQu return Self; } - public DynamicPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DynamicPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -587,12 +578,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchQuoteAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -693,7 +678,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Script = BuildScript(), SearchAnalyzer = SearchAnalyzerValue, SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue, TermVector = TermVectorValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -739,7 +723,6 @@ public DynamicPropertyDescriptor() : base() private Action ScriptDescriptorAction { get; set; } private string? SearchAnalyzerValue { get; set; } private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -975,12 +958,6 @@ public DynamicPropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer return Self; } - public DynamicPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DynamicPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -1184,12 +1161,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchQuoteAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -1290,7 +1261,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Script = BuildScript(), SearchAnalyzer = SearchAnalyzerValue, SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue, TermVector = TermVectorValue, TimeSeriesMetric = TimeSeriesMetricValue diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs index 680f6acc55b..209758f348f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -64,8 +64,6 @@ public sealed partial class FloatNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -97,7 +95,6 @@ public FloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public FloatNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public FloatNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public FloatNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public FloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public FloatNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public FloatNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public FloatRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public FloatRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public FloatRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public FloatRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public FloatRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public FloatRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public FloatRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -226,12 +223,6 @@ public GeoPointPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public GeoPointPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -329,12 +320,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -385,7 +370,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -413,7 +397,6 @@ public GeoPointPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -545,12 +528,6 @@ public GeoPointPropertyDescriptor Script(Action? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? StrategyValue { get; set; } @@ -205,12 +202,6 @@ public GeoShapePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public GeoShapePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -292,12 +283,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -328,7 +313,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Orientation = OrientationValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue, Strategy = StrategyValue }; @@ -360,7 +344,6 @@ public GeoShapePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? StrategyValue { get; set; } @@ -463,12 +446,6 @@ public GeoShapePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public HalfFloatNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public HalfFloatNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public HalfFloatNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public HalfFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public HalfFloatNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public HalfFloatNumberPropertyDescriptor Script(Action Rules(string? rules) return Self; } - public IcuCollationPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IcuCollationPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -454,12 +445,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(RulesValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -511,7 +496,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Numeric = NumericValue, Properties = PropertiesValue, Rules = RulesValue, - Similarity = SimilarityValue, Store = StoreValue, Strength = StrengthValue, VariableTop = VariableTopValue, @@ -547,7 +531,6 @@ public IcuCollationPropertyDescriptor() : base() private bool? NumericValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } private string? RulesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } private string? VariableTopValue { get; set; } @@ -716,12 +699,6 @@ public IcuCollationPropertyDescriptor Rules(string? rules) return Self; } - public IcuCollationPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IcuCollationPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -869,12 +846,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(RulesValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -926,7 +897,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Numeric = NumericValue, Properties = PropertiesValue, Rules = RulesValue, - Similarity = SimilarityValue, Store = StoreValue, Strength = StrengthValue, VariableTop = VariableTopValue, diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs index 079db51b6fd..508c776da51 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -64,8 +64,6 @@ public sealed partial class IntegerNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -97,7 +95,6 @@ public IntegerNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IntegerNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public IntegerNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IntegerNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public IntegerNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IntegerNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public IntegerNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public IntegerRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IntegerRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public IntegerRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IntegerRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public IntegerRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IntegerRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public IntegerRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IpPropertyDescriptor Boost(double? boost) @@ -226,12 +223,6 @@ public IpPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IpPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -329,12 +320,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -385,7 +370,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -413,7 +397,6 @@ public IpPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IpPropertyDescriptor Boost(double? boost) @@ -545,12 +528,6 @@ public IpPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public IpRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IpRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public IpRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IpRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public IpRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IpRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public IpRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public LongNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public LongNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public LongNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public LongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public LongNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public LongNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public LongRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public LongRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public LongRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public LongRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public LongRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public LongRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public LongRangePropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -74,7 +72,6 @@ public Murmur3HashPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -152,12 +149,6 @@ public Murmur3HashPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public Murmur3HashPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -209,12 +200,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -235,7 +220,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -255,7 +239,6 @@ public Murmur3HashPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -333,12 +316,6 @@ public Murmur3HashPropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -80,7 +78,6 @@ public NestedPropertyDescriptor() : base() private bool? IncludeInRootValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -170,12 +167,6 @@ public NestedPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public NestedPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -239,12 +230,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -267,7 +252,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IncludeInRoot = IncludeInRootValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -289,7 +273,6 @@ public NestedPropertyDescriptor() : base() private bool? IncludeInRootValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -379,12 +362,6 @@ public NestedPropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } [JsonInclude, JsonPropertyName("subobjects")] @@ -76,7 +74,6 @@ public ObjectPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? SubobjectsValue { get; set; } @@ -155,12 +152,6 @@ public ObjectPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ObjectPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -218,12 +209,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -250,7 +235,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue, Subobjects = SubobjectsValue }; @@ -271,7 +255,6 @@ public ObjectPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? SubobjectsValue { get; set; } @@ -350,12 +333,6 @@ public ObjectPropertyDescriptor Properties(Action? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -179,12 +176,6 @@ public PointPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public PointPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public PointPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -402,12 +385,6 @@ public PointPropertyDescriptor Properties(Action? FetchFields { get; set; } + /// + /// + /// For type composite + /// + /// + [JsonInclude, JsonPropertyName("fields")] + public IDictionary? Fields { get; set; } + /// /// /// A custom format for date type runtime fields. @@ -98,6 +106,7 @@ public RuntimeFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor FetchFieldsDescriptor { get; set; } private Action> FetchFieldsDescriptorAction { get; set; } private Action>[] FetchFieldsDescriptorActions { get; set; } + private IDictionary FieldsValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? InputFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } @@ -148,6 +157,17 @@ public RuntimeFieldDescriptor FetchFields(params Action + /// + /// For type composite + /// + /// + public RuntimeFieldDescriptor Fields(Func, FluentDescriptorDictionary> selector) + { + FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + /// /// /// A custom format for date type runtime fields. @@ -310,6 +330,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FetchFieldsValue, options); } + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -368,6 +394,7 @@ public RuntimeFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor FetchFieldsDescriptor { get; set; } private Action FetchFieldsDescriptorAction { get; set; } private Action[] FetchFieldsDescriptorActions { get; set; } + private IDictionary FieldsValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? InputFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } @@ -418,6 +445,17 @@ public RuntimeFieldDescriptor FetchFields(params Action + /// + /// For type composite + /// + /// + public RuntimeFieldDescriptor Fields(Func, FluentDescriptorDictionary> selector) + { + FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + /// /// /// A custom format for date type runtime fields. @@ -580,6 +618,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FetchFieldsValue, options); } + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs index 343a9aaa7fd..2f3f8288c6f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs @@ -66,8 +66,6 @@ public sealed partial class ScaledFloatNumberProperty : IProperty public double? ScalingFactor { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -100,7 +98,6 @@ public ScaledFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ScaledFloatNumberPropertyDescriptor Boost(double? boost) @@ -244,12 +241,6 @@ public ScaledFloatNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ScaledFloatNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -359,12 +350,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -417,7 +402,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, ScalingFactor = ScalingFactorValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -447,7 +431,6 @@ public ScaledFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ScaledFloatNumberPropertyDescriptor Boost(double? boost) @@ -591,12 +574,6 @@ public ScaledFloatNumberPropertyDescriptor Script(Action? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ShapePropertyDescriptor Coerce(bool? coerce = true) @@ -202,12 +199,6 @@ public ShapePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ShapePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -283,12 +274,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -313,7 +298,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Orientation = OrientationValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -344,7 +328,6 @@ public ShapePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ShapePropertyDescriptor Coerce(bool? coerce = true) @@ -446,12 +429,6 @@ public ShapePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ShortNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public ShortNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ShortNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public ShortNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ShortNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public ShortNumberPropertyDescriptor Script(Action? MetaValue { get; set; } private double? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public TokenCountPropertyDescriptor Analyzer(string? analyzer) @@ -197,12 +194,6 @@ public TokenCountPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public TokenCountPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -284,12 +275,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -315,7 +300,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -340,7 +324,6 @@ public TokenCountPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public TokenCountPropertyDescriptor Analyzer(string? analyzer) @@ -448,12 +431,6 @@ public TokenCountPropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public UnsignedLongNumberPropertyDescriptor Boost(double? boost) @@ -235,12 +232,6 @@ public UnsignedLongNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public UnsignedLongNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -344,12 +335,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -401,7 +386,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -430,7 +414,6 @@ public UnsignedLongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public UnsignedLongNumberPropertyDescriptor Boost(double? boost) @@ -568,12 +551,6 @@ public UnsignedLongNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -74,7 +72,6 @@ public VersionPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -152,12 +149,6 @@ public VersionPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public VersionPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -209,12 +200,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -235,7 +220,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -255,7 +239,6 @@ public VersionPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -333,12 +316,6 @@ public VersionPropertyDescriptor Properties(Action? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -161,12 +158,6 @@ public WildcardPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public WildcardPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -224,12 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -251,7 +236,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -272,7 +256,6 @@ public WildcardPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) @@ -356,12 +339,6 @@ public WildcardPropertyDescriptor Properties(Action /// [JsonInclude, JsonPropertyName("pipelines")] - public IReadOnlyDictionary? Pipelines { get; init; } + public IReadOnlyDictionary? Pipelines { get; init; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs new file mode 100644 index 00000000000..14f02675ad2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs @@ -0,0 +1,92 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; + +public sealed partial class IngestStats +{ + /// + /// + /// Total number of documents ingested during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + + /// + /// + /// Total number of documents currently being ingested. + /// + /// + [JsonInclude, JsonPropertyName("current")] + public long Current { get; init; } + + /// + /// + /// Total number of failed ingest operations during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("failed")] + public long Failed { get; init; } + + /// + /// + /// Total number of bytes of all documents ingested by the pipeline. + /// This field is only present on pipelines which are the first to process a document. + /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. + /// + /// + [JsonInclude, JsonPropertyName("ingested_as_first_pipeline_in_bytes")] + public long IngestedAsFirstPipelineInBytes { get; init; } + + /// + /// + /// Total number of ingest processors. + /// + /// + [JsonInclude, JsonPropertyName("processors")] + public IReadOnlyCollection> Processors { get; init; } + + /// + /// + /// Total number of bytes of all documents produced by the pipeline. + /// This field is only present on pipelines which are the first to process a document. + /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. + /// In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run. + /// + /// + [JsonInclude, JsonPropertyName("produced_as_first_pipeline_in_bytes")] + public long ProducedAsFirstPipelineInBytes { get; init; } + + /// + /// + /// Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("time_in_millis")] + public long TimeInMillis { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs index 28969d1c701..353d8167d58 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs @@ -35,7 +35,7 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } + public long Count { get; init; } /// /// @@ -43,7 +43,7 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("current")] - public long? Current { get; init; } + public long Current { get; init; } /// /// @@ -51,15 +51,7 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("failed")] - public long? Failed { get; init; } - - /// - /// - /// Total number of ingest processors. - /// - /// - [JsonInclude, JsonPropertyName("processors")] - public IReadOnlyCollection>? Processors { get; init; } + public long Failed { get; init; } /// /// @@ -67,5 +59,5 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("time_in_millis")] - public long? TimeInMillis { get; init; } + public long TimeInMillis { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs index 64d06eaff47..8da1d26d0e4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -48,6 +48,12 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "minimum_should_match") + { + variant.MinimumShouldMatch = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "minimum_should_match_field") { variant.MinimumShouldMatchField = JsonSerializer.Deserialize(ref reader, options); @@ -68,7 +74,7 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "terms") { - variant.Terms = JsonSerializer.Deserialize>(ref reader, options); + variant.Terms = JsonSerializer.Deserialize>(ref reader, options); continue; } } @@ -93,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSeria writer.WriteNumberValue(value.Boost.Value); } + if (value.MinimumShouldMatch is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, value.MinimumShouldMatch, options); + } + if (value.MinimumShouldMatchField is not null) { writer.WritePropertyName("minimum_should_match_field"); @@ -139,6 +151,13 @@ public TermsSetQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) public float? Boost { get; set; } public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } + /// + /// + /// Specification describing number of matching terms required to return a document. + /// + /// + public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } + /// /// /// Numeric field containing the number of matching terms required to return a document. @@ -159,7 +178,7 @@ public TermsSetQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) /// Array of terms you wish to find in the provided field. /// /// - public ICollection Terms { get; set; } + public ICollection Terms { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(TermsSetQuery termsSetQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.TermsSet(termsSetQuery); } @@ -174,12 +193,13 @@ public TermsSetQueryDescriptor() : base() private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } private Action MinimumShouldMatchScriptDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } + private ICollection TermsValue { get; set; } /// /// @@ -213,6 +233,17 @@ public TermsSetQueryDescriptor Field(Expression + /// + /// Specification describing number of matching terms required to return a document. + /// + /// + public TermsSetQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// /// Numeric field containing the number of matching terms required to return a document. @@ -286,7 +317,7 @@ public TermsSetQueryDescriptor QueryName(string? queryName) /// Array of terms you wish to find in the provided field. /// /// - public TermsSetQueryDescriptor Terms(ICollection terms) + public TermsSetQueryDescriptor Terms(ICollection terms) { TermsValue = terms; return Self; @@ -305,6 +336,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(BoostValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinimumShouldMatchFieldValue is not null) { writer.WritePropertyName("minimum_should_match_field"); @@ -350,12 +387,13 @@ public TermsSetQueryDescriptor() : base() private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } private Action MinimumShouldMatchScriptDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } + private ICollection TermsValue { get; set; } /// /// @@ -389,6 +427,17 @@ public TermsSetQueryDescriptor Field(Expression + /// + /// Specification describing number of matching terms required to return a document. + /// + /// + public TermsSetQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// /// Numeric field containing the number of matching terms required to return a document. @@ -462,7 +511,7 @@ public TermsSetQueryDescriptor QueryName(string? queryName) /// Array of terms you wish to find in the provided field. /// /// - public TermsSetQueryDescriptor Terms(ICollection terms) + public TermsSetQueryDescriptor Terms(ICollection terms) { TermsValue = terms; return Self; @@ -481,6 +530,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(BoostValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinimumShouldMatchFieldValue is not null) { writer.WritePropertyName("minimum_should_match_field"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Rank.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Rank.g.cs deleted file mode 100644 index 1fa0ea7e982..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Rank.g.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -[JsonConverter(typeof(RankConverter))] -public sealed partial class Rank -{ - internal Rank(string variantName, object variant) - { - if (variantName is null) - throw new ArgumentNullException(nameof(variantName)); - if (variant is null) - throw new ArgumentNullException(nameof(variant)); - if (string.IsNullOrWhiteSpace(variantName)) - throw new ArgumentException("Variant name must not be empty or whitespace."); - VariantName = variantName; - Variant = variant; - } - - internal object Variant { get; } - internal string VariantName { get; } - - public static Rank Rrf(Elastic.Clients.Elasticsearch.Serverless.RrfRank rrfRank) => new Rank("rrf", rrfRank); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class RankConverter : JsonConverter -{ - public override Rank Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - { - throw new JsonException("Expected start token."); - } - - object? variantValue = default; - string? variantNameValue = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType != JsonTokenType.PropertyName) - { - throw new JsonException("Expected a property name token."); - } - - if (reader.TokenType != JsonTokenType.PropertyName) - { - throw new JsonException("Expected a property name token representing the name of an Elasticsearch field."); - } - - var propertyName = reader.GetString(); - reader.Read(); - if (propertyName == "rrf") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Rank' from the response."); - } - - var result = new Rank(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Rank value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "rrf": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.RrfRank)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RankDescriptor : SerializableDescriptor> -{ - internal RankDescriptor(Action> configure) => configure.Invoke(this); - - public RankDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RankDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RankDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RankDescriptor Rrf(Elastic.Clients.Elasticsearch.Serverless.RrfRank rrfRank) => Set(rrfRank, "rrf"); - public RankDescriptor Rrf(Action configure) => Set(configure, "rrf"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RankDescriptor : SerializableDescriptor -{ - internal RankDescriptor(Action configure) => configure.Invoke(this); - - public RankDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RankDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RankDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RankDescriptor Rrf(Elastic.Clients.Elasticsearch.Serverless.RrfRank rrfRank) => Set(rrfRank, "rrf"); - public RankDescriptor Rrf(Action configure) => Set(configure, "rrf"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs index 0071b40bb4f..4c2effd0b43 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs @@ -31,6 +31,8 @@ public sealed partial class SnapshotShardFailure { [JsonInclude, JsonPropertyName("index")] public string Index { get; init; } + [JsonInclude, JsonPropertyName("index_uuid")] + public string IndexUuid { get; init; } [JsonInclude, JsonPropertyName("node_id")] public string? NodeId { get; init; } [JsonInclude, JsonPropertyName("reason")] diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Client/ElasticsearchClient.Esql.cs b/src/Elastic.Clients.Elasticsearch.Shared/Client/ElasticsearchClient.Esql.cs index 14c8d7ac845..76740e3fc05 100644 --- a/src/Elastic.Clients.Elasticsearch.Shared/Client/ElasticsearchClient.Esql.cs +++ b/src/Elastic.Clients.Elasticsearch.Shared/Client/ElasticsearchClient.Esql.cs @@ -65,7 +65,7 @@ public virtual async Task> QueryAsObjectsAsync void Configure(EsqlQueryRequestDescriptor descriptor) { configureRequest(descriptor); - descriptor.Format("JSON"); + descriptor.Format(EsqlFormat.Json); descriptor.Columnar(false); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs index abfc1200a0f..e3fca0ec657 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs @@ -145,6 +145,14 @@ public sealed partial class HealthResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("timed_out")] public bool TimedOut { get; init; } + /// + /// + /// The number of primary shards that are not allocated. + /// + /// + [JsonInclude, JsonPropertyName("unassigned_primary_shards")] + public int UnassignedPrimaryShards { get; init; } + /// /// /// The number of shards that are not allocated. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs index a4500abf0e0..625dac5748f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -51,7 +51,7 @@ public sealed partial class EsqlQueryRequestParameters : RequestParameters /// A short version of the Accept header, e.g. json, yaml. /// /// - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } } /// @@ -92,7 +92,7 @@ public sealed partial class EsqlQueryRequest : PlainRequest /// [JsonIgnore] - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } /// /// @@ -163,7 +163,7 @@ public EsqlQueryRequestDescriptor() public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns); - public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format); + public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? format) => Qs("format", format); private bool? ColumnarValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } @@ -328,7 +328,7 @@ public EsqlQueryRequestDescriptor() public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns); - public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format); + public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? format) => Qs("format", format); private bool? ColumnarValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs index 6401716d076..1ee0173f080 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs @@ -52,6 +52,13 @@ public sealed partial class GetDataStreamRequestParameters : RequestParameters /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Whether the maximum timestamp for each data stream should be calculated and returned. + /// + /// + public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } } /// @@ -102,6 +109,14 @@ public GetDataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamNames? name) /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Whether the maximum timestamp for each data stream should be calculated and returned. + /// + /// + [JsonIgnore] + public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } } /// @@ -133,6 +148,7 @@ public GetDataStreamRequestDescriptor() public GetDataStreamRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetDataStreamRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public GetDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public GetDataStreamRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); public GetDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.DataStreamNames? name) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs index 7e23ca3f0b8..e52b4679345 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs @@ -31,6 +31,15 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class ResolveIndexRequestParameters : RequestParameters { + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + /// + /// + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + /// /// /// Type of index that wildcard patterns can match. @@ -40,6 +49,13 @@ public sealed partial class ResolveIndexRequestParameters : RequestParameters /// /// public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } } /// @@ -62,6 +78,16 @@ public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Names name) : base(r => internal override string OperationName => "indices.resolve_index"; + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + /// + /// + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + /// /// /// Type of index that wildcard patterns can match. @@ -72,6 +98,14 @@ public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Names name) : base(r => /// [JsonIgnore] public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } } /// @@ -96,7 +130,9 @@ public ResolveIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Names name) : internal override string OperationName => "indices.resolve_index"; + public ResolveIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ResolveIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public ResolveIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public ResolveIndexRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names name) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs index acbda2c17ac..16eb12f2675 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -97,6 +97,15 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req [JsonIgnore] public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + /// /// /// Description of the ingest pipeline. @@ -170,6 +179,7 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. return Self; } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -182,6 +192,18 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. private Action>[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -300,6 +322,12 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -416,6 +444,7 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) return Self; } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -428,6 +457,18 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) private Action[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -546,6 +587,12 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs index 70c7fbf99c4..0c5914a5c35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs @@ -90,7 +90,7 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "open_point_in_time"; @@ -136,6 +136,14 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + + /// + /// + /// Allows to filter indices if the provided query rewrites to match_none on every shard. + /// + /// + [JsonInclude, JsonPropertyName("index_filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilter { get; set; } } /// @@ -164,7 +172,7 @@ public OpenPointInTimeRequestDescriptor() : this(typeof(TDocument)) protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "open_point_in_time"; @@ -180,8 +188,59 @@ public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elast return Self; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } + private Action> IndexFilterDescriptorAction { get; set; } + + /// + /// + /// Allows to filter indices if the provided query rewrites to match_none on every shard. + /// + /// + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Action> configure) + { + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterValue, options); + } + + writer.WriteEndObject(); } } @@ -207,7 +266,7 @@ public OpenPointInTimeRequestDescriptor(Elastic.Clients.Elasticsearch.Indices in protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "open_point_in_time"; @@ -223,7 +282,58 @@ public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.In return Self; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } + private Action IndexFilterDescriptorAction { get; set; } + + /// + /// + /// Allows to filter indices if the provided query rewrites to match_none on every shard. + /// + /// + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public OpenPointInTimeRequestDescriptor IndexFilter(Action configure) + { + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterValue, options); + } + + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs index cc2ea924c79..1dd4dd1105d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs @@ -30,4 +30,12 @@ public sealed partial class OpenPointInTimeResponse : ElasticsearchResponse { [JsonInclude, JsonPropertyName("id")] public string Id { get; init; } + + /// + /// + /// Shards used to create the PIT + /// + /// + [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/Api/SearchApplication/DeleteBehavioralAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteBehavioralAnalyticsRequest.g.cs index 393dc6f1772..bb1dd14ba0a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteBehavioralAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteBehavioralAnalyticsRequest.g.cs @@ -36,6 +36,7 @@ public sealed partial class DeleteBehavioralAnalyticsRequestParameters : Request /// /// /// Delete a behavioral analytics collection. +/// The associated data stream is also deleted. /// /// public sealed partial class DeleteBehavioralAnalyticsRequest : PlainRequest @@ -56,6 +57,7 @@ public DeleteBehavioralAnalyticsRequest(Elastic.Clients.Elasticsearch.Name name) /// /// /// Delete a behavioral analytics collection. +/// The associated data stream is also deleted. /// /// public sealed partial class DeleteBehavioralAnalyticsRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteSearchApplicationRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteSearchApplicationRequest.g.cs index 6eb2ed9f167..568ee9f3b60 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteSearchApplicationRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/DeleteSearchApplicationRequest.g.cs @@ -35,7 +35,8 @@ public sealed partial class DeleteSearchApplicationRequestParameters : RequestPa /// /// -/// Deletes a search application. +/// Delete a search application. +/// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// public sealed partial class DeleteSearchApplicationRequest : PlainRequest @@ -55,7 +56,8 @@ public DeleteSearchApplicationRequest(Elastic.Clients.Elasticsearch.Name name) : /// /// -/// Deletes a search application. +/// Delete a search application. +/// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// public sealed partial class DeleteSearchApplicationRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsRequest.g.cs index a4916064d61..313dbe3f12f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsRequest.g.cs @@ -35,7 +35,7 @@ public sealed partial class GetBehavioralAnalyticsRequestParameters : RequestPar /// /// -/// Returns the existing behavioral analytics collections. +/// Get behavioral analytics collections. /// /// public sealed partial class GetBehavioralAnalyticsRequest : PlainRequest @@ -59,7 +59,7 @@ public GetBehavioralAnalyticsRequest(IReadOnlyCollection /// -/// Returns the existing behavioral analytics collections. +/// Get behavioral analytics collections. /// /// public sealed partial class GetBehavioralAnalyticsRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationRequest.g.cs index aa25bd1fe0d..28c41602d1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationRequest.g.cs @@ -35,7 +35,7 @@ public sealed partial class GetSearchApplicationRequestParameters : RequestParam /// /// -/// Returns the details about a search application +/// Get search application details. /// /// public sealed partial class GetSearchApplicationRequest : PlainRequest @@ -55,7 +55,7 @@ public GetSearchApplicationRequest(Elastic.Clients.Elasticsearch.Name name) : ba /// /// -/// Returns the details about a search application +/// Get search application details. /// /// public sealed partial class GetSearchApplicationRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutBehavioralAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutBehavioralAnalyticsRequest.g.cs index 32f48d14234..185a22a7f3f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutBehavioralAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutBehavioralAnalyticsRequest.g.cs @@ -35,7 +35,7 @@ public sealed partial class PutBehavioralAnalyticsRequestParameters : RequestPar /// /// -/// Creates a behavioral analytics collection. +/// Create a behavioral analytics collection. /// /// public sealed partial class PutBehavioralAnalyticsRequest : PlainRequest @@ -55,7 +55,7 @@ public PutBehavioralAnalyticsRequest(Elastic.Clients.Elasticsearch.Name name) : /// /// -/// Creates a behavioral analytics collection. +/// Create a behavioral analytics collection. /// /// public sealed partial class PutBehavioralAnalyticsRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs index 44d43d407b8..743674f4b71 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs @@ -41,7 +41,7 @@ public sealed partial class PutSearchApplicationRequestParameters : RequestParam /// /// -/// Creates or updates a search application. +/// Create or update a search application. /// /// public sealed partial class PutSearchApplicationRequest : PlainRequest, ISelfSerializable @@ -76,7 +76,7 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op /// /// -/// Creates or updates a search application. +/// Create or update a search application. /// /// public sealed partial class PutSearchApplicationRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchRequest.g.cs index 239437b7290..28a5738d283 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchRequest.g.cs @@ -41,7 +41,9 @@ public sealed partial class SearchApplicationSearchRequestParameters : RequestPa /// /// -/// Perform a search against a search application. +/// Run a search application search. +/// Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. +/// Unspecified template parameters are assigned their default values if applicable. /// /// public sealed partial class SearchApplicationSearchRequest : PlainRequest @@ -77,7 +79,9 @@ public SearchApplicationSearchRequest(Elastic.Clients.Elasticsearch.Name name) : /// /// -/// Perform a search against a search application. +/// Run a search application search. +/// Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. +/// Unspecified template parameters are assigned their default values if applicable. /// /// public sealed partial class SearchApplicationSearchRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs index ef95b045455..2914a6a88f7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs @@ -32,7 +32,7 @@ public sealed partial class SearchShardsResponse : ElasticsearchResponse [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Core.SearchShards.ShardStoreIndex))] public IReadOnlyDictionary Indices { get; init; } [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } + public IReadOnlyDictionary Nodes { get; init; } [JsonInclude, JsonPropertyName("shards")] public IReadOnlyCollection> Shards { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs index ac3f5420753..d16082dbc34 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs @@ -115,6 +115,14 @@ public PutRoleRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Req [JsonInclude, JsonPropertyName("metadata")] public IDictionary? Metadata { get; set; } + /// + /// + /// A list of remote indices permissions entries. + /// + /// + [JsonInclude, JsonPropertyName("remote_indices")] + public ICollection? RemoteIndices { get; set; } + /// /// /// A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. @@ -174,6 +182,10 @@ public PutRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Na private Action> IndicesDescriptorAction { get; set; } private Action>[] IndicesDescriptorActions { get; set; } private IDictionary? MetadataValue { get; set; } + private ICollection? RemoteIndicesValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor RemoteIndicesDescriptor { get; set; } + private Action> RemoteIndicesDescriptorAction { get; set; } + private Action>[] RemoteIndicesDescriptorActions { get; set; } private ICollection? RunAsValue { get; set; } private IDictionary? TransientMetadataValue { get; set; } @@ -303,6 +315,47 @@ public PutRoleRequestDescriptor Metadata(Func + /// + /// A list of remote indices permissions entries. + /// + /// + public PutRoleRequestDescriptor RemoteIndices(ICollection? remoteIndices) + { + RemoteIndicesDescriptor = null; + RemoteIndicesDescriptorAction = null; + RemoteIndicesDescriptorActions = null; + RemoteIndicesValue = remoteIndices; + return Self; + } + + public PutRoleRequestDescriptor RemoteIndices(Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor descriptor) + { + RemoteIndicesValue = null; + RemoteIndicesDescriptorAction = null; + RemoteIndicesDescriptorActions = null; + RemoteIndicesDescriptor = descriptor; + return Self; + } + + public PutRoleRequestDescriptor RemoteIndices(Action> configure) + { + RemoteIndicesValue = null; + RemoteIndicesDescriptor = null; + RemoteIndicesDescriptorActions = null; + RemoteIndicesDescriptorAction = configure; + return Self; + } + + public PutRoleRequestDescriptor RemoteIndices(params Action>[] configure) + { + RemoteIndicesValue = null; + RemoteIndicesDescriptor = null; + RemoteIndicesDescriptorAction = null; + RemoteIndicesDescriptorActions = configure; + return Self; + } + /// /// /// A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. @@ -414,6 +467,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetadataValue, options); } + if (RemoteIndicesDescriptor is not null) + { + writer.WritePropertyName("remote_indices"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, RemoteIndicesDescriptor, options); + writer.WriteEndArray(); + } + else if (RemoteIndicesDescriptorAction is not null) + { + writer.WritePropertyName("remote_indices"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor(RemoteIndicesDescriptorAction), options); + writer.WriteEndArray(); + } + else if (RemoteIndicesDescriptorActions is not null) + { + writer.WritePropertyName("remote_indices"); + writer.WriteStartArray(); + foreach (var action in RemoteIndicesDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (RemoteIndicesValue is not null) + { + writer.WritePropertyName("remote_indices"); + JsonSerializer.Serialize(writer, RemoteIndicesValue, options); + } + if (RunAsValue is not null) { writer.WritePropertyName("run_as"); @@ -472,6 +556,10 @@ public PutRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) private Action IndicesDescriptorAction { get; set; } private Action[] IndicesDescriptorActions { get; set; } private IDictionary? MetadataValue { get; set; } + private ICollection? RemoteIndicesValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor RemoteIndicesDescriptor { get; set; } + private Action RemoteIndicesDescriptorAction { get; set; } + private Action[] RemoteIndicesDescriptorActions { get; set; } private ICollection? RunAsValue { get; set; } private IDictionary? TransientMetadataValue { get; set; } @@ -601,6 +689,47 @@ public PutRoleRequestDescriptor Metadata(Func, return Self; } + /// + /// + /// A list of remote indices permissions entries. + /// + /// + public PutRoleRequestDescriptor RemoteIndices(ICollection? remoteIndices) + { + RemoteIndicesDescriptor = null; + RemoteIndicesDescriptorAction = null; + RemoteIndicesDescriptorActions = null; + RemoteIndicesValue = remoteIndices; + return Self; + } + + public PutRoleRequestDescriptor RemoteIndices(Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor descriptor) + { + RemoteIndicesValue = null; + RemoteIndicesDescriptorAction = null; + RemoteIndicesDescriptorActions = null; + RemoteIndicesDescriptor = descriptor; + return Self; + } + + public PutRoleRequestDescriptor RemoteIndices(Action configure) + { + RemoteIndicesValue = null; + RemoteIndicesDescriptor = null; + RemoteIndicesDescriptorActions = null; + RemoteIndicesDescriptorAction = configure; + return Self; + } + + public PutRoleRequestDescriptor RemoteIndices(params Action[] configure) + { + RemoteIndicesValue = null; + RemoteIndicesDescriptor = null; + RemoteIndicesDescriptorAction = null; + RemoteIndicesDescriptorActions = configure; + return Self; + } + /// /// /// A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. @@ -712,6 +841,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetadataValue, options); } + if (RemoteIndicesDescriptor is not null) + { + writer.WritePropertyName("remote_indices"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, RemoteIndicesDescriptor, options); + writer.WriteEndArray(); + } + else if (RemoteIndicesDescriptorAction is not null) + { + writer.WritePropertyName("remote_indices"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor(RemoteIndicesDescriptorAction), options); + writer.WriteEndArray(); + } + else if (RemoteIndicesDescriptorActions is not null) + { + writer.WritePropertyName("remote_indices"); + writer.WriteStartArray(); + foreach (var action in RemoteIndicesDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivilegesDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (RemoteIndicesValue is not null) + { + writer.WritePropertyName("remote_indices"); + JsonSerializer.Serialize(writer, RemoteIndicesValue, options); + } + if (RunAsValue is not null) { writer.WritePropertyName("run_as"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs index 3b9898c96f6..7da01d16fc0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -36,7 +36,7 @@ public sealed partial class QueryRequestParameters : RequestParameters /// Format for the response. /// /// - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } } /// @@ -60,7 +60,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// [JsonIgnore] - public string? Format { get => Q("format"); set => Q("format", value); } + public Elastic.Clients.Elasticsearch.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } /// /// @@ -215,7 +215,7 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - public QueryRequestDescriptor Format(string? format) => Qs("format", format); + public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Sql.SqlFormat? format) => Qs("format", format); private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } @@ -567,7 +567,7 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - public QueryRequestDescriptor Format(string? format) => Qs("format", format); + public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Sql.SqlFormat? format) => Qs("format", format); private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs index 651d7111d85..5bb229233bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs @@ -43,7 +43,7 @@ public sealed partial class XpackInfoRequestParameters : RequestParameters /// A comma-separated list of the information categories to include in the response. For example, build,license,features. /// /// - public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } + public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } } /// @@ -75,7 +75,7 @@ public sealed partial class XpackInfoRequest : PlainRequest /// [JsonIgnore] - public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } + public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } } /// @@ -100,7 +100,7 @@ public XpackInfoRequestDescriptor() internal override string OperationName => "xpack.info"; public XpackInfoRequestDescriptor AcceptEnterprise(bool? acceptEnterprise = true) => Qs("accept_enterprise", acceptEnterprise); - public XpackInfoRequestDescriptor Categories(ICollection? categories) => Qs("categories", categories); + public XpackInfoRequestDescriptor Categories(ICollection? categories) => Qs("categories", categories); protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ingest.g.cs index d150269be2c..c9102687c74 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ingest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ingest.g.cs @@ -43,7 +43,7 @@ internal IngestNamespacedClient(ElasticsearchClient client) : base(client) /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(DeleteGeoipDatabaseRequest request) @@ -56,7 +56,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(DeleteGeoipDataba /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequest request, CancellationToken cancellationToken = default) { @@ -68,7 +68,7 @@ public virtual Task DeleteGeoipDatabaseAsync(Delete /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(DeleteGeoipDatabaseRequestDescriptor descriptor) @@ -81,7 +81,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Delete /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elastic.Clients.Elasticsearch.Ids id) @@ -95,7 +95,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elasti /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elastic.Clients.Elasticsearch.Ids id, Action> configureRequest) @@ -110,7 +110,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elasti /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(DeleteGeoipDatabaseRequestDescriptor descriptor) @@ -123,7 +123,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(DeleteGeoipDataba /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elastic.Clients.Elasticsearch.Ids id) @@ -137,7 +137,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elastic.Clients.E /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elastic.Clients.Elasticsearch.Ids id, Action configureRequest) @@ -152,7 +152,7 @@ public virtual DeleteGeoipDatabaseResponse DeleteGeoipDatabase(Elastic.Clients.E /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -164,7 +164,7 @@ public virtual Task DeleteGeoipDatabaseAsync /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids id, CancellationToken cancellationToken = default) { @@ -177,7 +177,7 @@ public virtual Task DeleteGeoipDatabaseAsync /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -191,7 +191,7 @@ public virtual Task DeleteGeoipDatabaseAsync /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -203,7 +203,7 @@ public virtual Task DeleteGeoipDatabaseAsync(Delete /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids id, CancellationToken cancellationToken = default) { @@ -216,7 +216,7 @@ public virtual Task DeleteGeoipDatabaseAsync(Elasti /// /// Deletes a geoip database configuration. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -523,7 +523,7 @@ public virtual Task GeoIpStatsAsync(Action /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(GetGeoipDatabaseRequest request) @@ -536,7 +536,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(GetGeoipDatabaseRequest /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequest request, CancellationToken cancellationToken = default) { @@ -548,7 +548,7 @@ public virtual Task GetGeoipDatabaseAsync(GetGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(GetGeoipDatabaseRequestDescriptor descriptor) @@ -561,7 +561,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(GetGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clients.Elasticsearch.Ids? id) @@ -575,7 +575,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clients.Elasticsearch.Ids? id, Action> configureRequest) @@ -590,7 +590,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase() @@ -604,7 +604,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase() /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Action> configureRequest) @@ -619,7 +619,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Action /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(GetGeoipDatabaseRequestDescriptor descriptor) @@ -632,7 +632,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(GetGeoipDatabaseRequest /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clients.Elasticsearch.Ids? id) @@ -646,7 +646,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clients.Elastic /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clients.Elasticsearch.Ids? id, Action configureRequest) @@ -661,7 +661,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Elastic.Clients.Elastic /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase() @@ -675,7 +675,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase() /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Action configureRequest) @@ -690,7 +690,7 @@ public virtual GetGeoipDatabaseResponse GetGeoipDatabase(Action /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -702,7 +702,7 @@ public virtual Task GetGeoipDatabaseAsync(G /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids? id, CancellationToken cancellationToken = default) { @@ -715,7 +715,7 @@ public virtual Task GetGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids? id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -729,7 +729,7 @@ public virtual Task GetGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(CancellationToken cancellationToken = default) { @@ -742,7 +742,7 @@ public virtual Task GetGeoipDatabaseAsync(C /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -756,7 +756,7 @@ public virtual Task GetGeoipDatabaseAsync(A /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -768,7 +768,7 @@ public virtual Task GetGeoipDatabaseAsync(GetGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids? id, CancellationToken cancellationToken = default) { @@ -781,7 +781,7 @@ public virtual Task GetGeoipDatabaseAsync(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Ids? id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -795,7 +795,7 @@ public virtual Task GetGeoipDatabaseAsync(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(CancellationToken cancellationToken = default) { @@ -808,7 +808,7 @@ public virtual Task GetGeoipDatabaseAsync(Cancellation /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetGeoipDatabaseAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -1265,7 +1265,7 @@ public virtual Task ProcessorGrokAsync(Action /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(PutGeoipDatabaseRequest request) @@ -1278,7 +1278,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(PutGeoipDatabaseRequest /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequest request, CancellationToken cancellationToken = default) { @@ -1290,7 +1290,7 @@ public virtual Task PutGeoipDatabaseAsync(PutGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(PutGeoipDatabaseRequestDescriptor descriptor) @@ -1303,7 +1303,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(PutGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clients.Elasticsearch.Id id) @@ -1317,7 +1317,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -1332,7 +1332,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(PutGeoipDatabaseRequestDescriptor descriptor) @@ -1345,7 +1345,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(PutGeoipDatabaseRequest /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clients.Elasticsearch.Id id) @@ -1359,7 +1359,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clients.Elastic /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -1374,7 +1374,7 @@ public virtual PutGeoipDatabaseResponse PutGeoipDatabase(Elastic.Clients.Elastic /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1386,7 +1386,7 @@ public virtual Task PutGeoipDatabaseAsync(P /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -1399,7 +1399,7 @@ public virtual Task PutGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -1413,7 +1413,7 @@ public virtual Task PutGeoipDatabaseAsync(E /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1425,7 +1425,7 @@ public virtual Task PutGeoipDatabaseAsync(PutGeoipData /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -1438,7 +1438,7 @@ public virtual Task PutGeoipDatabaseAsync(Elastic.Clie /// /// Returns information about one or more geoip database configurations. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs index 559e5cdd430..fc2498eaccd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs @@ -41,7 +41,8 @@ internal SearchApplicationNamespacedClient(ElasticsearchClient client) : base(cl /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -54,7 +55,8 @@ public virtual DeleteSearchApplicationResponse Delete(DeleteSearchApplicationReq /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -66,7 +68,8 @@ public virtual Task DeleteAsync(DeleteSearchApp /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -79,7 +82,8 @@ public virtual DeleteSearchApplicationResponse Delete(DeleteSearchApplicationReq /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -93,7 +97,8 @@ public virtual DeleteSearchApplicationResponse Delete(Elastic.Clients.Elasticsea /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -108,7 +113,8 @@ public virtual DeleteSearchApplicationResponse Delete(Elastic.Clients.Elasticsea /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -120,7 +126,8 @@ public virtual Task DeleteAsync(DeleteSearchApp /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -133,7 +140,8 @@ public virtual Task DeleteAsync(Elastic.Clients /// /// - /// Deletes a search application. + /// Delete a search application. + /// Remove a search application and its associated alias. Indices attached to the search application are not removed. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -148,6 +156,7 @@ public virtual Task DeleteAsync(Elastic.Clients /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -161,6 +170,7 @@ public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Delet /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -173,6 +183,7 @@ public virtual Task DeleteBehavioralAnalytics /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -186,6 +197,7 @@ public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Delet /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -200,6 +212,7 @@ public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Elast /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -215,6 +228,7 @@ public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Elast /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -227,6 +241,7 @@ public virtual Task DeleteBehavioralAnalytics /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -240,6 +255,7 @@ public virtual Task DeleteBehavioralAnalytics /// /// /// Delete a behavioral analytics collection. + /// The associated data stream is also deleted. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -253,7 +269,7 @@ public virtual Task DeleteBehavioralAnalytics /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -266,7 +282,7 @@ public virtual GetSearchApplicationResponse Get(GetSearchApplicationRequest requ /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -278,7 +294,7 @@ public virtual Task GetAsync(GetSearchApplicationR /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -291,7 +307,7 @@ public virtual GetSearchApplicationResponse Get(GetSearchApplicationRequestDescr /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -305,7 +321,7 @@ public virtual GetSearchApplicationResponse Get(Elastic.Clients.Elasticsearch.Na /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -320,7 +336,7 @@ public virtual GetSearchApplicationResponse Get(Elastic.Clients.Elasticsearch.Na /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -332,7 +348,7 @@ public virtual Task GetAsync(GetSearchApplicationR /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -345,7 +361,7 @@ public virtual Task GetAsync(Elastic.Clients.Elast /// /// - /// Returns the details about a search application + /// Get search application details. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -359,7 +375,7 @@ public virtual Task GetAsync(Elastic.Clients.Elast /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -372,7 +388,7 @@ public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(GetBehavior /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -384,7 +400,7 @@ public virtual Task GetBehavioralAnalyticsAsync( /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -397,7 +413,7 @@ public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(GetBehavior /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -411,7 +427,7 @@ public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(IReadOnlyCo /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -426,7 +442,7 @@ public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(IReadOnlyCo /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -440,7 +456,7 @@ public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics() /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -455,7 +471,7 @@ public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(Action /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -467,7 +483,7 @@ public virtual Task GetBehavioralAnalyticsAsync( /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -480,7 +496,7 @@ public virtual Task GetBehavioralAnalyticsAsync( /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -494,7 +510,7 @@ public virtual Task GetBehavioralAnalyticsAsync( /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -507,7 +523,7 @@ public virtual Task GetBehavioralAnalyticsAsync( /// /// - /// Returns the existing behavioral analytics collections. + /// Get behavioral analytics collections. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -627,7 +643,7 @@ public virtual Task ListAsync(Action config /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -640,7 +656,7 @@ public virtual PutSearchApplicationResponse Put(PutSearchApplicationRequest requ /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -652,7 +668,7 @@ public virtual Task PutAsync(PutSearchApplicationR /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -665,7 +681,7 @@ public virtual PutSearchApplicationResponse Put(PutSearchApplicationRequestDescr /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -679,7 +695,7 @@ public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.Se /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -694,7 +710,7 @@ public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.Se /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -706,7 +722,7 @@ public virtual Task PutAsync(PutSearchApplicationR /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -719,7 +735,7 @@ public virtual Task PutAsync(Elastic.Clients.Elast /// /// - /// Creates or updates a search application. + /// Create or update a search application. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -733,7 +749,7 @@ public virtual Task PutAsync(Elastic.Clients.Elast /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -746,7 +762,7 @@ public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(PutBehavior /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -758,7 +774,7 @@ public virtual Task PutBehavioralAnalyticsAsync( /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -771,7 +787,7 @@ public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(PutBehavior /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -785,7 +801,7 @@ public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(Elastic.Cli /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -800,7 +816,7 @@ public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(Elastic.Cli /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -812,7 +828,7 @@ public virtual Task PutBehavioralAnalyticsAsync( /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -825,7 +841,7 @@ public virtual Task PutBehavioralAnalyticsAsync( /// /// - /// Creates a behavioral analytics collection. + /// Create a behavioral analytics collection. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -839,7 +855,9 @@ public virtual Task PutBehavioralAnalyticsAsync( /// /// - /// Perform a search against a search application. + /// Run a search application search. + /// Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. + /// Unspecified template parameters are assigned their default values if applicable. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -852,7 +870,9 @@ public virtual SearchApplicationSearchResponse Search(Sear /// /// - /// Perform a search against a search application. + /// Run a search application search. + /// Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. + /// Unspecified template parameters are assigned their default values if applicable. /// /// Learn more about this API in the Elasticsearch documentation. /// 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 890af04b65c..6198ae808d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -101,6 +101,7 @@ public AggregateDictionary(IReadOnlyDictionary backingDictio public Elastic.Clients.Elasticsearch.Aggregations.SumAggregate? GetSum(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate? GetTDigestPercentileRanks(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate? GetTDigestPercentiles(string key) => TryGet(key); + public Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregate? GetTimeSeries(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregate? GetTopHits(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregate? GetTopMetrics(string key) => TryGet(key); public Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate? GetTTest(string key) => TryGet(key); @@ -559,6 +560,13 @@ public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions opt break; } + case "time_series": + { + var item = JsonSerializer.Deserialize(ref reader, options); + dictionary.Add(nameParts[1], item); + break; + } + case "top_hits": { var item = JsonSerializer.Deserialize(ref reader, options); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs index e6aae808b89..3ce7c7ac1d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs @@ -100,6 +100,7 @@ internal Aggregation(string variantName, object variant) public static Aggregation PercentileRanks(Elastic.Clients.Elasticsearch.Aggregations.PercentileRanksAggregation percentileRanksAggregation) => new Aggregation("percentile_ranks", percentileRanksAggregation); public static Aggregation Percentiles(Elastic.Clients.Elasticsearch.Aggregations.PercentilesAggregation percentilesAggregation) => new Aggregation("percentiles", percentilesAggregation); public static Aggregation PercentilesBucket(Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregation percentilesBucketAggregation) => new Aggregation("percentiles_bucket", percentilesBucketAggregation); + public static Aggregation RandomSampler(Elastic.Clients.Elasticsearch.Aggregations.RandomSamplerAggregation randomSamplerAggregation) => new Aggregation("random_sampler", randomSamplerAggregation); public static Aggregation Range(Elastic.Clients.Elasticsearch.Aggregations.RangeAggregation rangeAggregation) => new Aggregation("range", rangeAggregation); public static Aggregation RareTerms(Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation rareTermsAggregation) => new Aggregation("rare_terms", rareTermsAggregation); public static Aggregation Rate(Elastic.Clients.Elasticsearch.Aggregations.RateAggregation rateAggregation) => new Aggregation("rate", rateAggregation); @@ -115,6 +116,7 @@ internal Aggregation(string variantName, object variant) public static Aggregation Sum(Elastic.Clients.Elasticsearch.Aggregations.SumAggregation sumAggregation) => new Aggregation("sum", sumAggregation); public static Aggregation SumBucket(Elastic.Clients.Elasticsearch.Aggregations.SumBucketAggregation sumBucketAggregation) => new Aggregation("sum_bucket", sumBucketAggregation); public static Aggregation Terms(Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation termsAggregation) => new Aggregation("terms", termsAggregation); + public static Aggregation TimeSeries(Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation timeSeriesAggregation) => new Aggregation("time_series", timeSeriesAggregation); public static Aggregation TopHits(Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation topHitsAggregation) => new Aggregation("top_hits", topHitsAggregation); public static Aggregation TopMetrics(Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregation topMetricsAggregation) => new Aggregation("top_metrics", topMetricsAggregation); public static Aggregation TTest(Elastic.Clients.Elasticsearch.Aggregations.TTestAggregation tTestAggregation) => new Aggregation("t_test", tTestAggregation); @@ -563,6 +565,13 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, continue; } + if (propertyName == "random_sampler") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "range") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -668,6 +677,13 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, continue; } + if (propertyName == "time_series") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "top_hits") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -901,6 +917,9 @@ public override void Write(Utf8JsonWriter writer, Aggregation value, JsonSeriali case "percentiles_bucket": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregation)value.Variant, options); break; + case "random_sampler": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Aggregations.RandomSamplerAggregation)value.Variant, options); + break; case "range": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Aggregations.RangeAggregation)value.Variant, options); break; @@ -946,6 +965,9 @@ public override void Write(Utf8JsonWriter writer, Aggregation value, JsonSeriali case "terms": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation)value.Variant, options); break; + case "time_series": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation)value.Variant, options); + break; case "top_hits": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation)value.Variant, options); break; @@ -1131,6 +1153,8 @@ public AggregationDescriptor Meta(Func Percentiles(Action> configure) => Set(configure, "percentiles"); public AggregationDescriptor PercentilesBucket(Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregation percentilesBucketAggregation) => Set(percentilesBucketAggregation, "percentiles_bucket"); public AggregationDescriptor PercentilesBucket(Action configure) => Set(configure, "percentiles_bucket"); + public AggregationDescriptor RandomSampler(Elastic.Clients.Elasticsearch.Aggregations.RandomSamplerAggregation randomSamplerAggregation) => Set(randomSamplerAggregation, "random_sampler"); + public AggregationDescriptor RandomSampler(Action configure) => Set(configure, "random_sampler"); public AggregationDescriptor Range(Elastic.Clients.Elasticsearch.Aggregations.RangeAggregation rangeAggregation) => Set(rangeAggregation, "range"); public AggregationDescriptor Range(Action> configure) => Set(configure, "range"); public AggregationDescriptor RareTerms(Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation rareTermsAggregation) => Set(rareTermsAggregation, "rare_terms"); @@ -1161,6 +1185,8 @@ public AggregationDescriptor Meta(Func SumBucket(Action configure) => Set(configure, "sum_bucket"); public AggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); public AggregationDescriptor Terms(Action> configure) => Set(configure, "terms"); + public AggregationDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation timeSeriesAggregation) => Set(timeSeriesAggregation, "time_series"); + public AggregationDescriptor TimeSeries(Action configure) => Set(configure, "time_series"); public AggregationDescriptor TopHits(Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation topHitsAggregation) => Set(topHitsAggregation, "top_hits"); public AggregationDescriptor TopHits(Action> configure) => Set(configure, "top_hits"); public AggregationDescriptor TopMetrics(Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregation topMetricsAggregation) => Set(topMetricsAggregation, "top_metrics"); @@ -1366,6 +1392,8 @@ public AggregationDescriptor Meta(Func, FluentD public AggregationDescriptor Percentiles(Action configure) => Set(configure, "percentiles"); public AggregationDescriptor PercentilesBucket(Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregation percentilesBucketAggregation) => Set(percentilesBucketAggregation, "percentiles_bucket"); public AggregationDescriptor PercentilesBucket(Action configure) => Set(configure, "percentiles_bucket"); + public AggregationDescriptor RandomSampler(Elastic.Clients.Elasticsearch.Aggregations.RandomSamplerAggregation randomSamplerAggregation) => Set(randomSamplerAggregation, "random_sampler"); + public AggregationDescriptor RandomSampler(Action configure) => Set(configure, "random_sampler"); public AggregationDescriptor Range(Elastic.Clients.Elasticsearch.Aggregations.RangeAggregation rangeAggregation) => Set(rangeAggregation, "range"); public AggregationDescriptor Range(Action configure) => Set(configure, "range"); public AggregationDescriptor RareTerms(Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation rareTermsAggregation) => Set(rareTermsAggregation, "rare_terms"); @@ -1396,6 +1424,8 @@ public AggregationDescriptor Meta(Func, FluentD public AggregationDescriptor SumBucket(Action configure) => Set(configure, "sum_bucket"); public AggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); public AggregationDescriptor Terms(Action configure) => Set(configure, "terms"); + public AggregationDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation timeSeriesAggregation) => Set(timeSeriesAggregation, "time_series"); + public AggregationDescriptor TimeSeries(Action configure) => Set(configure, "time_series"); public AggregationDescriptor TopHits(Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation topHitsAggregation) => Set(topHitsAggregation, "top_hits"); public AggregationDescriptor TopHits(Action configure) => Set(configure, "top_hits"); public AggregationDescriptor TopMetrics(Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregation topMetricsAggregation) => Set(topMetricsAggregation, "top_metrics"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs new file mode 100644 index 00000000000..520b9aca721 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs @@ -0,0 +1,129 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Aggregations; + +public sealed partial class RandomSamplerAggregation +{ + /// + /// + /// The probability that a document will be included in the aggregated data. + /// Must be greater than 0, less than 0.5, or exactly 1. + /// The lower the probability, the fewer documents are matched. + /// + /// + [JsonInclude, JsonPropertyName("probability")] + public double Probability { get; set; } + + /// + /// + /// The seed to generate the random sampling of documents. + /// When a seed is provided, the random subset of documents is the same between calls. + /// + /// + [JsonInclude, JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// + /// When combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same. + /// + /// + [JsonInclude, JsonPropertyName("shard_seed")] + public int? ShardSeed { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(RandomSamplerAggregation randomSamplerAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.RandomSampler(randomSamplerAggregation); +} + +public sealed partial class RandomSamplerAggregationDescriptor : SerializableDescriptor +{ + internal RandomSamplerAggregationDescriptor(Action configure) => configure.Invoke(this); + + public RandomSamplerAggregationDescriptor() : base() + { + } + + private double ProbabilityValue { get; set; } + private int? SeedValue { get; set; } + private int? ShardSeedValue { get; set; } + + /// + /// + /// The probability that a document will be included in the aggregated data. + /// Must be greater than 0, less than 0.5, or exactly 1. + /// The lower the probability, the fewer documents are matched. + /// + /// + public RandomSamplerAggregationDescriptor Probability(double probability) + { + ProbabilityValue = probability; + return Self; + } + + /// + /// + /// The seed to generate the random sampling of documents. + /// When a seed is provided, the random subset of documents is the same between calls. + /// + /// + public RandomSamplerAggregationDescriptor Seed(int? seed) + { + SeedValue = seed; + return Self; + } + + /// + /// + /// When combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same. + /// + /// + public RandomSamplerAggregationDescriptor ShardSeed(int? shardSeed) + { + ShardSeedValue = shardSeed; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("probability"); + writer.WriteNumberValue(ProbabilityValue); + if (SeedValue.HasValue) + { + writer.WritePropertyName("seed"); + writer.WriteNumberValue(SeedValue.Value); + } + + if (ShardSeedValue.HasValue) + { + writer.WritePropertyName("shard_seed"); + writer.WriteNumberValue(ShardSeedValue.Value); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs new file mode 100644 index 00000000000..bd927b7576c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregate.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. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Aggregations; + +public sealed partial class TimeSeriesAggregate : IAggregate +{ + [JsonInclude, JsonPropertyName("buckets")] + public IReadOnlyCollection Buckets { get; init; } + [JsonInclude, JsonPropertyName("meta")] + public IReadOnlyDictionary? Meta { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RrfRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs similarity index 51% rename from src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RrfRank.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs index 63c54e86444..9e17f41186b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RrfRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs @@ -17,83 +17,83 @@ #nullable restore -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.Clients.Elasticsearch.Serverless; +namespace Elastic.Clients.Elasticsearch.Aggregations; -public sealed partial class RrfRank +public sealed partial class TimeSeriesAggregation { /// /// - /// How much influence documents in individual result sets per query have over the final ranked result set + /// Set to true to associate a unique string key with each bucket and returns the ranges as a hash rather than an array. /// /// - [JsonInclude, JsonPropertyName("rank_constant")] - public long? RankConstant { get; set; } + [JsonInclude, JsonPropertyName("keyed")] + public bool? Keyed { get; set; } /// /// - /// Size of the individual result sets per query + /// The maximum number of results to return. /// /// - [JsonInclude, JsonPropertyName("rank_window_size")] - public long? RankWindowSize { get; set; } + [JsonInclude, JsonPropertyName("size")] + public int? Size { get; set; } - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Rank(RrfRank rrfRank) => Elastic.Clients.Elasticsearch.Serverless.Rank.Rrf(rrfRank); + public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(TimeSeriesAggregation timeSeriesAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.TimeSeries(timeSeriesAggregation); } -public sealed partial class RrfRankDescriptor : SerializableDescriptor +public sealed partial class TimeSeriesAggregationDescriptor : SerializableDescriptor { - internal RrfRankDescriptor(Action configure) => configure.Invoke(this); + internal TimeSeriesAggregationDescriptor(Action configure) => configure.Invoke(this); - public RrfRankDescriptor() : base() + public TimeSeriesAggregationDescriptor() : base() { } - private long? RankConstantValue { get; set; } - private long? RankWindowSizeValue { get; set; } + private bool? KeyedValue { get; set; } + private int? SizeValue { get; set; } /// /// - /// How much influence documents in individual result sets per query have over the final ranked result set + /// Set to true to associate a unique string key with each bucket and returns the ranges as a hash rather than an array. /// /// - public RrfRankDescriptor RankConstant(long? rankConstant) + public TimeSeriesAggregationDescriptor Keyed(bool? keyed = true) { - RankConstantValue = rankConstant; + KeyedValue = keyed; return Self; } /// /// - /// Size of the individual result sets per query + /// The maximum number of results to return. /// /// - public RrfRankDescriptor RankWindowSize(long? rankWindowSize) + public TimeSeriesAggregationDescriptor Size(int? size) { - RankWindowSizeValue = rankWindowSize; + SizeValue = size; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (RankConstantValue.HasValue) + if (KeyedValue.HasValue) { - writer.WritePropertyName("rank_constant"); - writer.WriteNumberValue(RankConstantValue.Value); + writer.WritePropertyName("keyed"); + writer.WriteBooleanValue(KeyedValue.Value); } - if (RankWindowSizeValue.HasValue) + if (SizeValue.HasValue) { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); } writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs new file mode 100644 index 00000000000..3b391a5494c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Aggregations; + +internal sealed partial class TimeSeriesBucketConverter : JsonConverter +{ + public override TimeSeriesBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException("Unexpected JSON detected."); + long docCount = default; + IReadOnlyDictionary key = default; + Dictionary additionalProperties = null; + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + if (reader.TokenType == JsonTokenType.PropertyName) + { + var property = reader.GetString(); + if (property == "doc_count") + { + docCount = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "key") + { + key = JsonSerializer.Deserialize>(ref reader, options); + continue; + } + + if (property.Contains("#")) + { + additionalProperties ??= new Dictionary(); + AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); + continue; + } + + throw new JsonException("Unknown property read from JSON."); + } + } + + return new TimeSeriesBucket { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; + } + + public override void Write(Utf8JsonWriter writer, TimeSeriesBucket value, JsonSerializerOptions options) + { + throw new NotImplementedException("'TimeSeriesBucket' is a readonly type, used only on responses and does not support being written to JSON."); + } +} + +[JsonConverter(typeof(TimeSeriesBucketConverter))] +public sealed partial class TimeSeriesBucket +{ + /// + /// + /// Nested aggregations + /// + /// + public Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary Aggregations { get; init; } + public long DocCount { get; init; } + public IReadOnlyDictionary Key { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs new file mode 100644 index 00000000000..769294fda99 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs @@ -0,0 +1,90 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Analysis; + +public sealed partial class ClassicTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("max_token_length")] + public int? MaxTokenLength { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "classic"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class ClassicTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal ClassicTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public ClassicTokenizerDescriptor() : base() + { + } + + private int? MaxTokenLengthValue { get; set; } + private string? VersionValue { get; set; } + + public ClassicTokenizerDescriptor MaxTokenLength(int? maxTokenLength) + { + MaxTokenLengthValue = maxTokenLength; + return Self; + } + + public ClassicTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (MaxTokenLengthValue.HasValue) + { + writer.WritePropertyName("max_token_length"); + writer.WriteNumberValue(MaxTokenLengthValue.Value); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("classic"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + ClassicTokenizer IBuildableDescriptor.Build() => new() + { + MaxTokenLength = MaxTokenLengthValue, + Version = VersionValue + }; +} \ No newline at end of file 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 4141e89b468..110960e049d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs @@ -36,7 +36,7 @@ public sealed partial class EdgeNGramTokenizer : ITokenizer [JsonInclude, JsonPropertyName("min_gram")] public int MinGram { get; set; } [JsonInclude, JsonPropertyName("token_chars")] - public ICollection TokenChars { get; set; } + public ICollection? TokenChars { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "edge_ngram"; @@ -56,7 +56,7 @@ public EdgeNGramTokenizerDescriptor() : base() private string? CustomTokenCharsValue { get; set; } private int MaxGramValue { get; set; } private int MinGramValue { get; set; } - private ICollection TokenCharsValue { get; set; } + private ICollection? TokenCharsValue { get; set; } private string? VersionValue { get; set; } public EdgeNGramTokenizerDescriptor CustomTokenChars(string? customTokenChars) @@ -77,7 +77,7 @@ public EdgeNGramTokenizerDescriptor MinGram(int minGram) return Self; } - public EdgeNGramTokenizerDescriptor TokenChars(ICollection tokenChars) + public EdgeNGramTokenizerDescriptor TokenChars(ICollection? tokenChars) { TokenCharsValue = tokenChars; return Self; @@ -102,8 +102,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxGramValue); writer.WritePropertyName("min_gram"); writer.WriteNumberValue(MinGramValue); - writer.WritePropertyName("token_chars"); - JsonSerializer.Serialize(writer, TokenCharsValue, options); + if (TokenCharsValue is not null) + { + writer.WritePropertyName("token_chars"); + JsonSerializer.Serialize(writer, TokenCharsValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("edge_ngram"); if (!string.IsNullOrEmpty(VersionValue)) 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 3fd2f033907..91a70863b7f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs @@ -32,6 +32,7 @@ public sealed partial class KeywordMarkerTokenFilter : ITokenFilter [JsonInclude, JsonPropertyName("ignore_case")] public bool? IgnoreCase { get; set; } [JsonInclude, JsonPropertyName("keywords")] + [SingleOrManyCollectionConverter(typeof(string))] public ICollection? Keywords { get; set; } [JsonInclude, JsonPropertyName("keywords_path")] public string? KeywordsPath { get; set; } @@ -101,7 +102,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o if (KeywordsValue is not null) { writer.WritePropertyName("keywords"); - JsonSerializer.Serialize(writer, KeywordsValue, options); + SingleOrManySerializationHelper.Serialize(KeywordsValue, writer, options); } if (!string.IsNullOrEmpty(KeywordsPathValue)) 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 aee020454b0..23daf00166f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.Analysis; public sealed partial class KeywordTokenizer : ITokenizer { [JsonInclude, JsonPropertyName("buffer_size")] - public int BufferSize { get; set; } + public int? BufferSize { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "keyword"; @@ -47,10 +47,10 @@ public KeywordTokenizerDescriptor() : base() { } - private int BufferSizeValue { get; set; } + private int? BufferSizeValue { get; set; } private string? VersionValue { get; set; } - public KeywordTokenizerDescriptor BufferSize(int bufferSize) + public KeywordTokenizerDescriptor BufferSize(int? bufferSize) { BufferSizeValue = bufferSize; return Self; @@ -65,8 +65,12 @@ public KeywordTokenizerDescriptor Version(string? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("buffer_size"); - writer.WriteNumberValue(BufferSizeValue); + if (BufferSizeValue.HasValue) + { + writer.WritePropertyName("buffer_size"); + writer.WriteNumberValue(BufferSizeValue.Value); + } + writer.WritePropertyName("type"); writer.WriteStringValue("keyword"); if (!string.IsNullOrEmpty(VersionValue)) 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 18208b70675..a68be22a2cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs @@ -36,7 +36,7 @@ public sealed partial class NGramTokenizer : ITokenizer [JsonInclude, JsonPropertyName("min_gram")] public int MinGram { get; set; } [JsonInclude, JsonPropertyName("token_chars")] - public ICollection TokenChars { get; set; } + public ICollection? TokenChars { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "ngram"; @@ -56,7 +56,7 @@ public NGramTokenizerDescriptor() : base() private string? CustomTokenCharsValue { get; set; } private int MaxGramValue { get; set; } private int MinGramValue { get; set; } - private ICollection TokenCharsValue { get; set; } + private ICollection? TokenCharsValue { get; set; } private string? VersionValue { get; set; } public NGramTokenizerDescriptor CustomTokenChars(string? customTokenChars) @@ -77,7 +77,7 @@ public NGramTokenizerDescriptor MinGram(int minGram) return Self; } - public NGramTokenizerDescriptor TokenChars(ICollection tokenChars) + public NGramTokenizerDescriptor TokenChars(ICollection? tokenChars) { TokenCharsValue = tokenChars; return Self; @@ -102,8 +102,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxGramValue); writer.WritePropertyName("min_gram"); writer.WriteNumberValue(MinGramValue); - writer.WritePropertyName("token_chars"); - JsonSerializer.Serialize(writer, TokenCharsValue, options); + if (TokenCharsValue is not null) + { + writer.WritePropertyName("token_chars"); + JsonSerializer.Serialize(writer, TokenCharsValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("ngram"); if (!string.IsNullOrEmpty(VersionValue)) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs new file mode 100644 index 00000000000..efb69c647af --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs @@ -0,0 +1,90 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Analysis; + +public sealed partial class SimplePatternSplitTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("pattern")] + public string? Pattern { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "simple_pattern_split"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class SimplePatternSplitTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SimplePatternSplitTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public SimplePatternSplitTokenizerDescriptor() : base() + { + } + + private string? PatternValue { get; set; } + private string? VersionValue { get; set; } + + public SimplePatternSplitTokenizerDescriptor Pattern(string? pattern) + { + PatternValue = pattern; + return Self; + } + + public SimplePatternSplitTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(PatternValue)) + { + writer.WritePropertyName("pattern"); + writer.WriteStringValue(PatternValue); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("simple_pattern_split"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + SimplePatternSplitTokenizer IBuildableDescriptor.Build() => new() + { + Pattern = PatternValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs new file mode 100644 index 00000000000..164e4c4ffe3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs @@ -0,0 +1,90 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Analysis; + +public sealed partial class SimplePatternTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("pattern")] + public string? Pattern { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "simple_pattern"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class SimplePatternTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SimplePatternTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public SimplePatternTokenizerDescriptor() : base() + { + } + + private string? PatternValue { get; set; } + private string? VersionValue { get; set; } + + public SimplePatternTokenizerDescriptor Pattern(string? pattern) + { + PatternValue = pattern; + return Self; + } + + public SimplePatternTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(PatternValue)) + { + writer.WritePropertyName("pattern"); + writer.WriteStringValue(PatternValue); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("simple_pattern"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + SimplePatternTokenizer IBuildableDescriptor.Build() => new() + { + Pattern = PatternValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ThaiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ThaiTokenizer.g.cs new file mode 100644 index 00000000000..5ed31691456 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ThaiTokenizer.g.cs @@ -0,0 +1,73 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Analysis; + +public sealed partial class ThaiTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("type")] + public string Type => "thai"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class ThaiTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal ThaiTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public ThaiTokenizerDescriptor() : base() + { + } + + private string? VersionValue { get; set; } + + public ThaiTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue("thai"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + ThaiTokenizer IBuildableDescriptor.Build() => new() + { + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizers.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizers.g.cs index 8ea8d16b137..54f24ae2bab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizers.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Tokenizers.g.cs @@ -69,6 +69,9 @@ public TokenizersDescriptor() : base(new Tokenizers()) public TokenizersDescriptor CharGroup(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor CharGroup(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor CharGroup(string tokenizerName, CharGroupTokenizer charGroupTokenizer) => AssignVariant(tokenizerName, charGroupTokenizer); + public TokenizersDescriptor Classic(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor Classic(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor Classic(string tokenizerName, ClassicTokenizer classicTokenizer) => AssignVariant(tokenizerName, classicTokenizer); public TokenizersDescriptor EdgeNGram(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor EdgeNGram(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor EdgeNGram(string tokenizerName, EdgeNGramTokenizer edgeNGramTokenizer) => AssignVariant(tokenizerName, edgeNGramTokenizer); @@ -99,9 +102,18 @@ public TokenizersDescriptor() : base(new Tokenizers()) public TokenizersDescriptor Pattern(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor Pattern(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor Pattern(string tokenizerName, PatternTokenizer patternTokenizer) => AssignVariant(tokenizerName, patternTokenizer); + public TokenizersDescriptor SimplePatternSplit(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor SimplePatternSplit(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor SimplePatternSplit(string tokenizerName, SimplePatternSplitTokenizer simplePatternSplitTokenizer) => AssignVariant(tokenizerName, simplePatternSplitTokenizer); + public TokenizersDescriptor SimplePattern(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor SimplePattern(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor SimplePattern(string tokenizerName, SimplePatternTokenizer simplePatternTokenizer) => AssignVariant(tokenizerName, simplePatternTokenizer); public TokenizersDescriptor Standard(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor Standard(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor Standard(string tokenizerName, StandardTokenizer standardTokenizer) => AssignVariant(tokenizerName, standardTokenizer); + public TokenizersDescriptor Thai(string tokenizerName) => AssignVariant(tokenizerName, null); + public TokenizersDescriptor Thai(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); + public TokenizersDescriptor Thai(string tokenizerName, ThaiTokenizer thaiTokenizer) => AssignVariant(tokenizerName, thaiTokenizer); public TokenizersDescriptor UaxEmailUrl(string tokenizerName) => AssignVariant(tokenizerName, null); public TokenizersDescriptor UaxEmailUrl(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); public TokenizersDescriptor UaxEmailUrl(string tokenizerName, UaxEmailUrlTokenizer uaxEmailUrlTokenizer) => AssignVariant(tokenizerName, uaxEmailUrlTokenizer); @@ -126,6 +138,8 @@ public override ITokenizer Read(ref Utf8JsonReader reader, Type typeToConvert, J { case "char_group": return JsonSerializer.Deserialize(ref reader, options); + case "classic": + return JsonSerializer.Deserialize(ref reader, options); case "edge_ngram": return JsonSerializer.Deserialize(ref reader, options); case "icu_tokenizer": @@ -146,8 +160,14 @@ public override ITokenizer Read(ref Utf8JsonReader reader, Type typeToConvert, J return JsonSerializer.Deserialize(ref reader, options); case "pattern": return JsonSerializer.Deserialize(ref reader, options); + case "simple_pattern_split": + return JsonSerializer.Deserialize(ref reader, options); + case "simple_pattern": + return JsonSerializer.Deserialize(ref reader, options); case "standard": return JsonSerializer.Deserialize(ref reader, options); + case "thai": + return JsonSerializer.Deserialize(ref reader, options); case "uax_url_email": return JsonSerializer.Deserialize(ref reader, options); case "whitespace": @@ -171,6 +191,9 @@ public override void Write(Utf8JsonWriter writer, ITokenizer value, JsonSerializ case "char_group": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer), options); return; + case "classic": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer), options); + return; case "edge_ngram": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizer), options); return; @@ -201,9 +224,18 @@ public override void Write(Utf8JsonWriter writer, ITokenizer value, JsonSerializ case "pattern": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.PatternTokenizer), options); return; + case "simple_pattern_split": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.SimplePatternSplitTokenizer), options); + return; + case "simple_pattern": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.SimplePatternTokenizer), options); + return; case "standard": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer), options); return; + case "thai": + JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.ThaiTokenizer), options); + return; case "uax_url_email": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer), options); return; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CurrentNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CurrentNode.g.cs index 55c1a5db8bf..8943689f868 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CurrentNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CurrentNode.g.cs @@ -35,6 +35,8 @@ public sealed partial class CurrentNode public string Id { get; init; } [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } + [JsonInclude, JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } [JsonInclude, JsonPropertyName("transport_address")] public string TransportAddress { get; init; } [JsonInclude, JsonPropertyName("weight_ranking")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs index 6d4369248d8..a978568c8ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexHealthStats.g.cs @@ -45,6 +45,8 @@ public sealed partial class IndexHealthStats public IReadOnlyDictionary? Shards { get; init; } [JsonInclude, JsonPropertyName("status")] public Elastic.Clients.Elasticsearch.HealthStatus Status { get; init; } + [JsonInclude, JsonPropertyName("unassigned_primary_shards")] + public int UnassignedPrimaryShards { get; init; } [JsonInclude, JsonPropertyName("unassigned_shards")] public int UnassignedShards { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs index a124d639779..29ecfdb8296 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs @@ -39,6 +39,8 @@ public sealed partial class NodeAllocationExplanation public string NodeId { get; init; } [JsonInclude, JsonPropertyName("node_name")] public string NodeName { get; init; } + [JsonInclude, JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } [JsonInclude, JsonPropertyName("store")] public Elastic.Clients.Elasticsearch.Cluster.AllocationStore? Store { get; init; } [JsonInclude, JsonPropertyName("transport_address")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ShardHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ShardHealthStats.g.cs index 62534fff30d..9f29e457ded 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ShardHealthStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ShardHealthStats.g.cs @@ -39,6 +39,8 @@ public sealed partial class ShardHealthStats public int RelocatingShards { get; init; } [JsonInclude, JsonPropertyName("status")] public Elastic.Clients.Elasticsearch.HealthStatus Status { get; init; } + [JsonInclude, JsonPropertyName("unassigned_primary_shards")] + public int UnassignedPrimaryShards { get; init; } [JsonInclude, JsonPropertyName("unassigned_shards")] public int UnassignedShards { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs index 4fecff97322..8fa399791e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs @@ -29,6 +29,8 @@ namespace Elastic.Clients.Elasticsearch.Core.Search; public sealed partial class AggregationProfileDebug { + [JsonInclude, JsonPropertyName("brute_force_used")] + public int? BruteForceUsed { get; init; } [JsonInclude, JsonPropertyName("built_buckets")] public int? BuiltBuckets { get; init; } [JsonInclude, JsonPropertyName("chars_fetched")] @@ -45,6 +47,10 @@ public sealed partial class AggregationProfileDebug public string? Delegate { get; init; } [JsonInclude, JsonPropertyName("delegate_debug")] public Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebug? DelegateDebug { get; init; } + [JsonInclude, JsonPropertyName("dynamic_pruning_attempted")] + public int? DynamicPruningAttempted { get; init; } + [JsonInclude, JsonPropertyName("dynamic_pruning_used")] + public int? DynamicPruningUsed { get; init; } [JsonInclude, JsonPropertyName("empty_collectors_used")] public int? EmptyCollectorsUsed { get; init; } [JsonInclude, JsonPropertyName("extract_count")] @@ -77,6 +83,8 @@ public sealed partial class AggregationProfileDebug public int? SegmentsWithMultiValuedOrds { get; init; } [JsonInclude, JsonPropertyName("segments_with_single_valued_ords")] public int? SegmentsWithSingleValuedOrds { get; init; } + [JsonInclude, JsonPropertyName("skipped_due_to_no_data")] + public int? SkippedDueToNoData { get; init; } [JsonInclude, JsonPropertyName("string_hashing_collectors_used")] public int? StringHashingCollectorsUsed { get; init; } [JsonInclude, JsonPropertyName("surviving_buckets")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs new file mode 100644 index 00000000000..17aa732b4ba --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs @@ -0,0 +1,40 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class DfsKnnProfile +{ + [JsonInclude, JsonPropertyName("collector")] + public IReadOnlyCollection Collector { get; init; } + [JsonInclude, JsonPropertyName("query")] + public IReadOnlyCollection Query { get; init; } + [JsonInclude, JsonPropertyName("rewrite_time")] + public long RewriteTime { get; init; } + [JsonInclude, JsonPropertyName("vector_operations_count")] + public long? VectorOperationsCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsProfile.g.cs new file mode 100644 index 00000000000..6daaadcb967 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsProfile.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. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class DfsProfile +{ + [JsonInclude, JsonPropertyName("knn")] + public IReadOnlyCollection? Knn { get; init; } + [JsonInclude, JsonPropertyName("statistics")] + public Elastic.Clients.Elasticsearch.Core.Search.DfsStatisticsProfile? Statistics { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs new file mode 100644 index 00000000000..2f335c297e1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs @@ -0,0 +1,48 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class DfsStatisticsBreakdown +{ + [JsonInclude, JsonPropertyName("collection_statistics")] + public long CollectionStatistics { get; init; } + [JsonInclude, JsonPropertyName("collection_statistics_count")] + public long CollectionStatisticsCount { get; init; } + [JsonInclude, JsonPropertyName("create_weight")] + public long CreateWeight { get; init; } + [JsonInclude, JsonPropertyName("create_weight_count")] + public long CreateWeightCount { get; init; } + [JsonInclude, JsonPropertyName("rewrite")] + public long Rewrite { get; init; } + [JsonInclude, JsonPropertyName("rewrite_count")] + public long RewriteCount { get; init; } + [JsonInclude, JsonPropertyName("term_statistics")] + public long TermStatistics { get; init; } + [JsonInclude, JsonPropertyName("term_statistics_count")] + public long TermStatisticsCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs new file mode 100644 index 00000000000..cabdc2faca5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs @@ -0,0 +1,46 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class DfsStatisticsProfile +{ + [JsonInclude, JsonPropertyName("breakdown")] + public Elastic.Clients.Elasticsearch.Core.Search.DfsStatisticsBreakdown Breakdown { get; init; } + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("debug")] + public IReadOnlyDictionary? Debug { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string Description { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { 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/Core/Search/Hit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs index 938ccad0fe5..bddd3f292b6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs @@ -40,7 +40,7 @@ public sealed partial class Hit [JsonInclude, JsonPropertyName("_ignored")] public IReadOnlyCollection? Ignored { get; init; } [JsonInclude, JsonPropertyName("ignored_field_values")] - public IReadOnlyDictionary>? IgnoredFieldValues { get; init; } + public IReadOnlyDictionary>? IgnoredFieldValues { get; init; } [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("inner_hits")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnCollectorResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnCollectorResult.g.cs new file mode 100644 index 00000000000..aaec4e00032 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnCollectorResult.g.cs @@ -0,0 +1,42 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class KnnCollectorResult +{ + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + [JsonInclude, JsonPropertyName("reason")] + public string Reason { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs new file mode 100644 index 00000000000..fa1f6814a4c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs @@ -0,0 +1,72 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class KnnQueryProfileBreakdown +{ + [JsonInclude, JsonPropertyName("advance")] + public long Advance { get; init; } + [JsonInclude, JsonPropertyName("advance_count")] + public long AdvanceCount { get; init; } + [JsonInclude, JsonPropertyName("build_scorer")] + public long BuildScorer { get; init; } + [JsonInclude, JsonPropertyName("build_scorer_count")] + public long BuildScorerCount { get; init; } + [JsonInclude, JsonPropertyName("compute_max_score")] + public long ComputeMaxScore { get; init; } + [JsonInclude, JsonPropertyName("compute_max_score_count")] + public long ComputeMaxScoreCount { get; init; } + [JsonInclude, JsonPropertyName("count_weight")] + public long CountWeight { get; init; } + [JsonInclude, JsonPropertyName("count_weight_count")] + public long CountWeightCount { get; init; } + [JsonInclude, JsonPropertyName("create_weight")] + public long CreateWeight { get; init; } + [JsonInclude, JsonPropertyName("create_weight_count")] + public long CreateWeightCount { get; init; } + [JsonInclude, JsonPropertyName("match")] + public long Match { get; init; } + [JsonInclude, JsonPropertyName("match_count")] + public long MatchCount { get; init; } + [JsonInclude, JsonPropertyName("next_doc")] + public long NextDoc { get; init; } + [JsonInclude, JsonPropertyName("next_doc_count")] + public long NextDocCount { get; init; } + [JsonInclude, JsonPropertyName("score")] + public long Score { get; init; } + [JsonInclude, JsonPropertyName("score_count")] + public long ScoreCount { get; init; } + [JsonInclude, JsonPropertyName("set_min_competitive_score")] + public long SetMinCompetitiveScore { get; init; } + [JsonInclude, JsonPropertyName("set_min_competitive_score_count")] + public long SetMinCompetitiveScoreCount { get; init; } + [JsonInclude, JsonPropertyName("shallow_advance")] + public long ShallowAdvance { get; init; } + [JsonInclude, JsonPropertyName("shallow_advance_count")] + public long ShallowAdvanceCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs new file mode 100644 index 00000000000..7482c065065 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs @@ -0,0 +1,46 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class KnnQueryProfileResult +{ + [JsonInclude, JsonPropertyName("breakdown")] + public Elastic.Clients.Elasticsearch.Core.Search.KnnQueryProfileBreakdown Breakdown { get; init; } + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("debug")] + public IReadOnlyDictionary? Debug { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string Description { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { 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/Core/Search/QueryBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/QueryBreakdown.g.cs index 822a7c758e9..d89976f2084 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/QueryBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/QueryBreakdown.g.cs @@ -41,6 +41,10 @@ public sealed partial class QueryBreakdown public long ComputeMaxScore { get; init; } [JsonInclude, JsonPropertyName("compute_max_score_count")] public long ComputeMaxScoreCount { get; init; } + [JsonInclude, JsonPropertyName("count_weight")] + public long CountWeight { get; init; } + [JsonInclude, JsonPropertyName("count_weight_count")] + public long CountWeightCount { get; init; } [JsonInclude, JsonPropertyName("create_weight")] public long CreateWeight { get; init; } [JsonInclude, JsonPropertyName("create_weight_count")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ShardProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ShardProfile.g.cs index d7f4b76f217..20cfb6d97b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ShardProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ShardProfile.g.cs @@ -31,10 +31,20 @@ public sealed partial class ShardProfile { [JsonInclude, JsonPropertyName("aggregations")] public IReadOnlyCollection Aggregations { get; init; } + [JsonInclude, JsonPropertyName("cluster")] + public string Cluster { get; init; } + [JsonInclude, JsonPropertyName("dfs")] + public Elastic.Clients.Elasticsearch.Core.Search.DfsProfile? Dfs { get; init; } [JsonInclude, JsonPropertyName("fetch")] public Elastic.Clients.Elasticsearch.Core.Search.FetchProfile? Fetch { get; init; } [JsonInclude, JsonPropertyName("id")] public string Id { get; init; } + [JsonInclude, JsonPropertyName("index")] + public string Index { get; init; } + [JsonInclude, JsonPropertyName("node_id")] + public string NodeId { get; init; } [JsonInclude, JsonPropertyName("searches")] public IReadOnlyCollection Searches { get; init; } + [JsonInclude, JsonPropertyName("shard_id")] + public long ShardId { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchShards/SearchShardsNodeAttributes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchShards/SearchShardsNodeAttributes.g.cs new file mode 100644 index 00000000000..33fe1cb1b9f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchShards/SearchShardsNodeAttributes.g.cs @@ -0,0 +1,73 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.SearchShards; + +public sealed partial class SearchShardsNodeAttributes +{ + /// + /// + /// Lists node attributes. + /// + /// + [JsonInclude, JsonPropertyName("attributes")] + public IReadOnlyDictionary Attributes { get; init; } + + /// + /// + /// The ephemeral ID of the node. + /// + /// + [JsonInclude, JsonPropertyName("ephemeral_id")] + public string EphemeralId { get; init; } + [JsonInclude, JsonPropertyName("external_id")] + public string ExternalId { get; init; } + [JsonInclude, JsonPropertyName("max_index_version")] + public int MaxIndexVersion { get; init; } + [JsonInclude, JsonPropertyName("min_index_version")] + public int MinIndexVersion { get; init; } + + /// + /// + /// The human-readable identifier of the node. + /// + /// + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + [JsonInclude, JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } + + /// + /// + /// The host and port where transport HTTP connections are accepted. + /// + /// + [JsonInclude, JsonPropertyName("transport_address")] + public string TransportAddress { get; init; } + [JsonInclude, JsonPropertyName("version")] + public string Version { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enrich/CacheStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enrich/CacheStats.g.cs index ddbe347dbeb..b884acb0e98 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enrich/CacheStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enrich/CacheStats.g.cs @@ -35,8 +35,14 @@ public sealed partial class CacheStats public int Evictions { get; init; } [JsonInclude, JsonPropertyName("hits")] public int Hits { get; init; } + [JsonInclude, JsonPropertyName("hits_time_in_millis")] + public long HitsTimeInMillis { get; init; } [JsonInclude, JsonPropertyName("misses")] public int Misses { get; init; } + [JsonInclude, JsonPropertyName("misses_time_in_millis")] + public long MissesTimeInMillis { get; init; } [JsonInclude, JsonPropertyName("node_id")] public string NodeId { get; init; } + [JsonInclude, JsonPropertyName("size_in_bytes")] + public long SizeInBytes { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Esql.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Esql.g.cs new file mode 100644 index 00000000000..88f73b46228 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Esql.g.cs @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Core; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Esql; + +[JsonConverter(typeof(EsqlFormatConverter))] +public enum EsqlFormat +{ + [EnumMember(Value = "yaml")] + Yaml, + [EnumMember(Value = "txt")] + Txt, + [EnumMember(Value = "tsv")] + Tsv, + [EnumMember(Value = "smile")] + Smile, + [EnumMember(Value = "json")] + Json, + [EnumMember(Value = "csv")] + Csv, + [EnumMember(Value = "cbor")] + Cbor, + [EnumMember(Value = "arrow")] + Arrow +} + +internal sealed class EsqlFormatConverter : JsonConverter +{ + public override EsqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yaml": + return EsqlFormat.Yaml; + case "txt": + return EsqlFormat.Txt; + case "tsv": + return EsqlFormat.Tsv; + case "smile": + return EsqlFormat.Smile; + case "json": + return EsqlFormat.Json; + case "csv": + return EsqlFormat.Csv; + case "cbor": + return EsqlFormat.Cbor; + case "arrow": + return EsqlFormat.Arrow; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, EsqlFormat value, JsonSerializerOptions options) + { + switch (value) + { + case EsqlFormat.Yaml: + writer.WriteStringValue("yaml"); + return; + case EsqlFormat.Txt: + writer.WriteStringValue("txt"); + return; + case EsqlFormat.Tsv: + writer.WriteStringValue("tsv"); + return; + case EsqlFormat.Smile: + writer.WriteStringValue("smile"); + return; + case EsqlFormat.Json: + writer.WriteStringValue("json"); + return; + case EsqlFormat.Csv: + writer.WriteStringValue("csv"); + return; + case EsqlFormat.Cbor: + writer.WriteStringValue("cbor"); + return; + case EsqlFormat.Arrow: + writer.WriteStringValue("arrow"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Ingest.g.cs index 5dc8701708d..c930a3155e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Ingest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Ingest.g.cs @@ -105,6 +105,97 @@ public override void Write(Utf8JsonWriter writer, ConvertType value, JsonSeriali } } +[JsonConverter(typeof(GeoGridTargetFormatConverter))] +public enum GeoGridTargetFormat +{ + [EnumMember(Value = "wkt")] + Wkt, + [EnumMember(Value = "geojson")] + Geojson +} + +internal sealed class GeoGridTargetFormatConverter : JsonConverter +{ + public override GeoGridTargetFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "wkt": + return GeoGridTargetFormat.Wkt; + case "geojson": + return GeoGridTargetFormat.Geojson; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, GeoGridTargetFormat value, JsonSerializerOptions options) + { + switch (value) + { + case GeoGridTargetFormat.Wkt: + writer.WriteStringValue("wkt"); + return; + case GeoGridTargetFormat.Geojson: + writer.WriteStringValue("geojson"); + return; + } + + writer.WriteNullValue(); + } +} + +[JsonConverter(typeof(GeoGridTileTypeConverter))] +public enum GeoGridTileType +{ + [EnumMember(Value = "geotile")] + Geotile, + [EnumMember(Value = "geohex")] + Geohex, + [EnumMember(Value = "geohash")] + Geohash +} + +internal sealed class GeoGridTileTypeConverter : JsonConverter +{ + public override GeoGridTileType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "geotile": + return GeoGridTileType.Geotile; + case "geohex": + return GeoGridTileType.Geohex; + case "geohash": + return GeoGridTileType.Geohash; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, GeoGridTileType value, JsonSerializerOptions options) + { + switch (value) + { + case GeoGridTileType.Geotile: + writer.WriteStringValue("geotile"); + return; + case GeoGridTileType.Geohex: + writer.WriteStringValue("geohex"); + return; + case GeoGridTileType.Geohash: + writer.WriteStringValue("geohash"); + return; + } + + writer.WriteNullValue(); + } +} + [JsonConverter(typeof(JsonProcessorConflictStrategyConverter))] public enum JsonProcessorConflictStrategy { @@ -202,26 +293,16 @@ public override void Write(Utf8JsonWriter writer, ShapeType value, JsonSerialize [JsonConverter(typeof(UserAgentPropertyConverter))] public enum UserAgentProperty { - [EnumMember(Value = "PATCH")] - Patch, - [EnumMember(Value = "OS_NAME")] - OsName, - [EnumMember(Value = "OS_MINOR")] - OsMinor, - [EnumMember(Value = "OS_MAJOR")] - OsMajor, - [EnumMember(Value = "OS")] + [EnumMember(Value = "version")] + Version, + [EnumMember(Value = "os")] Os, - [EnumMember(Value = "NAME")] + [EnumMember(Value = "original")] + Original, + [EnumMember(Value = "name")] Name, - [EnumMember(Value = "MINOR")] - Minor, - [EnumMember(Value = "MAJOR")] - Major, - [EnumMember(Value = "DEVICE")] - Device, - [EnumMember(Value = "BUILD")] - Build + [EnumMember(Value = "device")] + Device } internal sealed class UserAgentPropertyConverter : JsonConverter @@ -231,26 +312,16 @@ public override UserAgentProperty Read(ref Utf8JsonReader reader, Type typeToCon var enumString = reader.GetString(); switch (enumString) { - case "PATCH": - return UserAgentProperty.Patch; - case "OS_NAME": - return UserAgentProperty.OsName; - case "OS_MINOR": - return UserAgentProperty.OsMinor; - case "OS_MAJOR": - return UserAgentProperty.OsMajor; - case "OS": + case "version": + return UserAgentProperty.Version; + case "os": return UserAgentProperty.Os; - case "NAME": + case "original": + return UserAgentProperty.Original; + case "name": return UserAgentProperty.Name; - case "MINOR": - return UserAgentProperty.Minor; - case "MAJOR": - return UserAgentProperty.Major; - case "DEVICE": + case "device": return UserAgentProperty.Device; - case "BUILD": - return UserAgentProperty.Build; } ThrowHelper.ThrowJsonException(); @@ -261,35 +332,20 @@ public override void Write(Utf8JsonWriter writer, UserAgentProperty value, JsonS { switch (value) { - case UserAgentProperty.Patch: - writer.WriteStringValue("PATCH"); - return; - case UserAgentProperty.OsName: - writer.WriteStringValue("OS_NAME"); - return; - case UserAgentProperty.OsMinor: - writer.WriteStringValue("OS_MINOR"); - return; - case UserAgentProperty.OsMajor: - writer.WriteStringValue("OS_MAJOR"); + case UserAgentProperty.Version: + writer.WriteStringValue("version"); return; case UserAgentProperty.Os: - writer.WriteStringValue("OS"); + writer.WriteStringValue("os"); return; - case UserAgentProperty.Name: - writer.WriteStringValue("NAME"); + case UserAgentProperty.Original: + writer.WriteStringValue("original"); return; - case UserAgentProperty.Minor: - writer.WriteStringValue("MINOR"); - return; - case UserAgentProperty.Major: - writer.WriteStringValue("MAJOR"); + case UserAgentProperty.Name: + writer.WriteStringValue("name"); return; case UserAgentProperty.Device: - writer.WriteStringValue("DEVICE"); - return; - case UserAgentProperty.Build: - writer.WriteStringValue("BUILD"); + writer.WriteStringValue("device"); return; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.MachineLearning.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.MachineLearning.g.cs index 5b046096bd0..a9f89e68101 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.MachineLearning.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.MachineLearning.g.cs @@ -417,12 +417,32 @@ public override void Write(Utf8JsonWriter writer, DeploymentAllocationState valu [JsonConverter(typeof(DeploymentAssignmentStateConverter))] public enum DeploymentAssignmentState { + /// + /// + /// The deployment is preparing to stop and deallocate the model from the relevant nodes. + /// + /// [EnumMember(Value = "stopping")] Stopping, + /// + /// + /// The deployment has recently started but is not yet usable; the model is not allocated on any nodes. + /// + /// [EnumMember(Value = "starting")] Starting, + /// + /// + /// The deployment is usable; at least one node has the model allocated. + /// + /// [EnumMember(Value = "started")] Started, + /// + /// + /// The deployment is on a failed state and must be re-deployed. + /// + /// [EnumMember(Value = "failed")] Failed } @@ -470,70 +490,6 @@ public override void Write(Utf8JsonWriter writer, DeploymentAssignmentState valu } } -[JsonConverter(typeof(DeploymentStateConverter))] -public enum DeploymentState -{ - /// - /// - /// The deployment is preparing to stop and deallocate the model from the relevant nodes. - /// - /// - [EnumMember(Value = "stopping")] - Stopping, - /// - /// - /// The deployment has recently started but is not yet usable; the model is not allocated on any nodes. - /// - /// - [EnumMember(Value = "starting")] - Starting, - /// - /// - /// The deployment is usable; at least one node has the model allocated. - /// - /// - [EnumMember(Value = "started")] - Started -} - -internal sealed class DeploymentStateConverter : JsonConverter -{ - public override DeploymentState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopping": - return DeploymentState.Stopping; - case "starting": - return DeploymentState.Starting; - case "started": - return DeploymentState.Started; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DeploymentState value, JsonSerializerOptions options) - { - switch (value) - { - case DeploymentState.Stopping: - writer.WriteStringValue("stopping"); - return; - case DeploymentState.Starting: - writer.WriteStringValue("starting"); - return; - case DeploymentState.Started: - writer.WriteStringValue("started"); - return; - } - - writer.WriteNullValue(); - } -} - [JsonConverter(typeof(ExcludeFrequentConverter))] public enum ExcludeFrequent { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Sql.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Sql.g.cs new file mode 100644 index 00000000000..5b2210e7a2a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Sql.g.cs @@ -0,0 +1,106 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Core; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Sql; + +[JsonConverter(typeof(SqlFormatConverter))] +public enum SqlFormat +{ + [EnumMember(Value = "yaml")] + Yaml, + [EnumMember(Value = "txt")] + Txt, + [EnumMember(Value = "tsv")] + Tsv, + [EnumMember(Value = "smile")] + Smile, + [EnumMember(Value = "json")] + Json, + [EnumMember(Value = "csv")] + Csv, + [EnumMember(Value = "cbor")] + Cbor +} + +internal sealed class SqlFormatConverter : JsonConverter +{ + public override SqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yaml": + return SqlFormat.Yaml; + case "txt": + return SqlFormat.Txt; + case "tsv": + return SqlFormat.Tsv; + case "smile": + return SqlFormat.Smile; + case "json": + return SqlFormat.Json; + case "csv": + return SqlFormat.Csv; + case "cbor": + return SqlFormat.Cbor; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, SqlFormat value, JsonSerializerOptions options) + { + switch (value) + { + case SqlFormat.Yaml: + writer.WriteStringValue("yaml"); + return; + case SqlFormat.Txt: + writer.WriteStringValue("txt"); + return; + case SqlFormat.Tsv: + writer.WriteStringValue("tsv"); + return; + case SqlFormat.Smile: + writer.WriteStringValue("smile"); + return; + case SqlFormat.Json: + writer.WriteStringValue("json"); + return; + case SqlFormat.Csv: + writer.WriteStringValue("csv"); + return; + case SqlFormat.Cbor: + writer.WriteStringValue("cbor"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Xpack.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Xpack.g.cs new file mode 100644 index 00000000000..36d2bdbd1e9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Xpack.g.cs @@ -0,0 +1,78 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Core; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Xpack; + +[JsonConverter(typeof(XPackCategoryConverter))] +public enum XPackCategory +{ + [EnumMember(Value = "license")] + License, + [EnumMember(Value = "features")] + Features, + [EnumMember(Value = "build")] + Build +} + +internal sealed class XPackCategoryConverter : JsonConverter +{ + public override XPackCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "license": + return XPackCategory.License; + case "features": + return XPackCategory.Features; + case "build": + return XPackCategory.Build; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, XPackCategory value, JsonSerializerOptions options) + { + switch (value) + { + case XPackCategory.License: + writer.WriteStringValue("license"); + return; + case XPackCategory.Features: + writer.WriteStringValue("features"); + return; + case XPackCategory.Build: + writer.WriteStringValue("build"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs index d89839c4c0b..b609af8460c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -94,6 +94,7 @@ public sealed partial class AppendProcessor /// /// [JsonInclude, JsonPropertyName("value")] + [SingleOrManyCollectionConverter(typeof(object))] public ICollection Value { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Ingest.Processor(AppendProcessor appendProcessor) => Elastic.Clients.Elasticsearch.Ingest.Processor.Append(appendProcessor); @@ -331,7 +332,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); + SingleOrManySerializationHelper.Serialize(ValueValue, writer, options); writer.WriteEndObject(); } } @@ -568,7 +569,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); + SingleOrManySerializationHelper.Serialize(ValueValue, writer, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs index 43b03668fd3..0140218155e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs @@ -71,6 +71,16 @@ public sealed partial class DotExpanderProcessor [JsonInclude, JsonPropertyName("on_failure")] public ICollection? OnFailure { get; set; } + /// + /// + /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + /// When false, the processor will merge conflicts by combining the old and the new values into an array. + /// When true, the value from the expanded field will overwrite the existing value. + /// + /// + [JsonInclude, JsonPropertyName("override")] + public bool? Override { get; set; } + /// /// /// The field that contains the field to expand. @@ -108,6 +118,7 @@ public DotExpanderProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } + private bool? OverrideValue { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } @@ -222,6 +233,19 @@ public DotExpanderProcessorDescriptor OnFailure(params Action + /// + /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + /// When false, the processor will merge conflicts by combining the old and the new values into an array. + /// When true, the value from the expanded field will overwrite the existing value. + /// + /// + public DotExpanderProcessorDescriptor Override(bool? value = true) + { + OverrideValue = value; + return Self; + } + /// /// /// The field that contains the field to expand. @@ -300,6 +324,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } + if (OverrideValue.HasValue) + { + writer.WritePropertyName("override"); + writer.WriteBooleanValue(OverrideValue.Value); + } + if (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); @@ -332,6 +362,7 @@ public DotExpanderProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } + private bool? OverrideValue { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } @@ -446,6 +477,19 @@ public DotExpanderProcessorDescriptor OnFailure(params Action + /// + /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + /// When false, the processor will merge conflicts by combining the old and the new values into an array. + /// When true, the value from the expanded field will overwrite the existing value. + /// + /// + public DotExpanderProcessorDescriptor Override(bool? value = true) + { + OverrideValue = value; + return Self; + } + /// /// /// The field that contains the field to expand. @@ -524,6 +568,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } + if (OverrideValue.HasValue) + { + writer.WritePropertyName("override"); + writer.WriteBooleanValue(OverrideValue.Value); + } + if (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs new file mode 100644 index 00000000000..a0b61667ffe --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs @@ -0,0 +1,1010 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Ingest; + +public sealed partial class GeoGridProcessor +{ + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + [JsonInclude, JsonPropertyName("children_field")] + public Elastic.Clients.Elasticsearch.Field? ChildrenField { get; set; } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// The field to interpret as a geo-tile.= + /// The field format is determined by the tile_type. + /// + /// + [JsonInclude, JsonPropertyName("field")] + public string Field { get; set; } + + /// + /// + /// Conditionally execute the processor. + /// + /// + [JsonInclude, JsonPropertyName("if")] + public string? If { get; set; } + + /// + /// + /// Ignore failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("ignore_failure")] + public bool? IgnoreFailure { get; set; } + + /// + /// + /// If true and field does not exist, the processor quietly exits without modifying the document. + /// + /// + [JsonInclude, JsonPropertyName("ignore_missing")] + public bool? IgnoreMissing { get; set; } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + [JsonInclude, JsonPropertyName("non_children_field")] + public Elastic.Clients.Elasticsearch.Field? NonChildrenField { get; set; } + + /// + /// + /// Handle failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("on_failure")] + public ICollection? OnFailure { get; set; } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + [JsonInclude, JsonPropertyName("parent_field")] + public Elastic.Clients.Elasticsearch.Field? ParentField { get; set; } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + [JsonInclude, JsonPropertyName("precision_field")] + public Elastic.Clients.Elasticsearch.Field? PrecisionField { get; set; } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + [JsonInclude, JsonPropertyName("tag")] + public string? Tag { get; set; } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + [JsonInclude, JsonPropertyName("target_field")] + public Elastic.Clients.Elasticsearch.Field? TargetField { get; set; } + + /// + /// + /// Which format to save the generated polygon in. + /// + /// + [JsonInclude, JsonPropertyName("target_format")] + public Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? TargetFormat { get; set; } + + /// + /// + /// Three tile formats are understood: geohash, geotile and geohex. + /// + /// + [JsonInclude, JsonPropertyName("tile_type")] + public Elastic.Clients.Elasticsearch.Ingest.GeoGridTileType TileType { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Ingest.Processor(GeoGridProcessor geoGridProcessor) => Elastic.Clients.Elasticsearch.Ingest.Processor.GeoGrid(geoGridProcessor); +} + +public sealed partial class GeoGridProcessorDescriptor : SerializableDescriptor> +{ + internal GeoGridProcessorDescriptor(Action> configure) => configure.Invoke(this); + + public GeoGridProcessorDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Field? ChildrenFieldValue { get; set; } + private string? DescriptionValue { get; set; } + private string FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? NonChildrenFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Field? ParentFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? PrecisionFieldValue { get; set; } + private string? TagValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? TargetFormatValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.GeoGridTileType TileTypeValue { get; set; } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Elastic.Clients.Elasticsearch.Field? childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public GeoGridProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to interpret as a geo-tile.= + /// The field format is determined by the tile_type. + /// + /// + public GeoGridProcessorDescriptor Field(string field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public GeoGridProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public GeoGridProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist, the processor quietly exits without modifying the document. + /// + /// + public GeoGridProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Elastic.Clients.Elasticsearch.Field? nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public GeoGridProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Elastic.Clients.Elasticsearch.Field? parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Elastic.Clients.Elasticsearch.Field? precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public GeoGridProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Field? targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// Which format to save the generated polygon in. + /// + /// + public GeoGridProcessorDescriptor TargetFormat(Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? targetFormat) + { + TargetFormatValue = targetFormat; + return Self; + } + + /// + /// + /// Three tile formats are understood: geohash, geotile and geohex. + /// + /// + public GeoGridProcessorDescriptor TileType(Elastic.Clients.Elasticsearch.Ingest.GeoGridTileType tileType) + { + TileTypeValue = tileType; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ChildrenFieldValue is not null) + { + writer.WritePropertyName("children_field"); + JsonSerializer.Serialize(writer, ChildrenFieldValue, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + writer.WriteStringValue(FieldValue); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (NonChildrenFieldValue is not null) + { + writer.WritePropertyName("non_children_field"); + JsonSerializer.Serialize(writer, NonChildrenFieldValue, options); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (ParentFieldValue is not null) + { + writer.WritePropertyName("parent_field"); + JsonSerializer.Serialize(writer, ParentFieldValue, options); + } + + if (PrecisionFieldValue is not null) + { + writer.WritePropertyName("precision_field"); + JsonSerializer.Serialize(writer, PrecisionFieldValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + if (TargetFieldValue is not null) + { + writer.WritePropertyName("target_field"); + JsonSerializer.Serialize(writer, TargetFieldValue, options); + } + + if (TargetFormatValue is not null) + { + writer.WritePropertyName("target_format"); + JsonSerializer.Serialize(writer, TargetFormatValue, options); + } + + writer.WritePropertyName("tile_type"); + JsonSerializer.Serialize(writer, TileTypeValue, options); + writer.WriteEndObject(); + } +} + +public sealed partial class GeoGridProcessorDescriptor : SerializableDescriptor +{ + internal GeoGridProcessorDescriptor(Action configure) => configure.Invoke(this); + + public GeoGridProcessorDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Field? ChildrenFieldValue { get; set; } + private string? DescriptionValue { get; set; } + private string FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? NonChildrenFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Field? ParentFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? PrecisionFieldValue { get; set; } + private string? TagValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? TargetFormatValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.GeoGridTileType TileTypeValue { get; set; } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Elastic.Clients.Elasticsearch.Field? childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) + { + ChildrenFieldValue = childrenField; + return Self; + } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public GeoGridProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to interpret as a geo-tile.= + /// The field format is determined by the tile_type. + /// + /// + public GeoGridProcessorDescriptor Field(string field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public GeoGridProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public GeoGridProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist, the processor quietly exits without modifying the document. + /// + /// + public GeoGridProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Elastic.Clients.Elasticsearch.Field? nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. + /// + /// + public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) + { + NonChildrenFieldValue = nonChildrenField; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public GeoGridProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoGridProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Elastic.Clients.Elasticsearch.Field? parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified and a parent tile exists, save that tile address to this field. + /// + /// + public GeoGridProcessorDescriptor ParentField(Expression> parentField) + { + ParentFieldValue = parentField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Elastic.Clients.Elasticsearch.Field? precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// If specified, save the tile precision (zoom) as an integer to this field. + /// + /// + public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) + { + PrecisionFieldValue = precisionField; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public GeoGridProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Field? targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// The field to assign the polygon shape to, by default, the field is updated in-place. + /// + /// + public GeoGridProcessorDescriptor TargetField(Expression> targetField) + { + TargetFieldValue = targetField; + return Self; + } + + /// + /// + /// Which format to save the generated polygon in. + /// + /// + public GeoGridProcessorDescriptor TargetFormat(Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? targetFormat) + { + TargetFormatValue = targetFormat; + return Self; + } + + /// + /// + /// Three tile formats are understood: geohash, geotile and geohex. + /// + /// + public GeoGridProcessorDescriptor TileType(Elastic.Clients.Elasticsearch.Ingest.GeoGridTileType tileType) + { + TileTypeValue = tileType; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ChildrenFieldValue is not null) + { + writer.WritePropertyName("children_field"); + JsonSerializer.Serialize(writer, ChildrenFieldValue, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + writer.WriteStringValue(FieldValue); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (NonChildrenFieldValue is not null) + { + writer.WritePropertyName("non_children_field"); + JsonSerializer.Serialize(writer, NonChildrenFieldValue, options); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (ParentFieldValue is not null) + { + writer.WritePropertyName("parent_field"); + JsonSerializer.Serialize(writer, ParentFieldValue, options); + } + + if (PrecisionFieldValue is not null) + { + writer.WritePropertyName("precision_field"); + JsonSerializer.Serialize(writer, PrecisionFieldValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + if (TargetFieldValue is not null) + { + writer.WritePropertyName("target_field"); + JsonSerializer.Serialize(writer, TargetFieldValue, options); + } + + if (TargetFormatValue is not null) + { + writer.WritePropertyName("target_format"); + JsonSerializer.Serialize(writer, TargetFormatValue, options); + } + + writer.WritePropertyName("tile_type"); + JsonSerializer.Serialize(writer, TileTypeValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs index dcb30a270f1..db9452f8ded 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs @@ -46,6 +46,15 @@ public sealed partial class GeoIpProcessor [JsonInclude, JsonPropertyName("description")] public string? Description { get; set; } + /// + /// + /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. + /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. + /// + /// + [JsonInclude, JsonPropertyName("download_database_on_pipeline_creation")] + public bool? DownloadDatabaseOnPipelineCreation { get; set; } + /// /// /// The field to get the ip address from for the geographical lookup. @@ -132,6 +141,7 @@ public GeoIpProcessorDescriptor() : base() private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } + private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private bool? FirstOnlyValue { get; set; } private string? IfValue { get; set; } @@ -168,6 +178,18 @@ public GeoIpProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. + /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. + /// + /// + public GeoIpProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) + { + DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; + return Self; + } + /// /// /// The field to get the ip address from for the geographical lookup. @@ -357,6 +379,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (DownloadDatabaseOnPipelineCreationValue.HasValue) + { + writer.WritePropertyName("download_database_on_pipeline_creation"); + writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (FirstOnlyValue.HasValue) @@ -446,6 +474,7 @@ public GeoIpProcessorDescriptor() : base() private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } + private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private bool? FirstOnlyValue { get; set; } private string? IfValue { get; set; } @@ -482,6 +511,18 @@ public GeoIpProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. + /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. + /// + /// + public GeoIpProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) + { + DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; + return Self; + } + /// /// /// The field to get the ip address from for the geographical lookup. @@ -671,6 +712,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (DownloadDatabaseOnPipelineCreationValue.HasValue) + { + writer.WritePropertyName("download_database_on_pipeline_creation"); + writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (FirstOnlyValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs index 70279bc35bc..4d32454100b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs @@ -29,6 +29,15 @@ namespace Elastic.Clients.Elasticsearch.Ingest; public sealed partial class Pipeline { + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + /// /// /// Description of the ingest pipeline. @@ -79,6 +88,7 @@ public PipelineDescriptor() : base() { } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -91,6 +101,18 @@ public PipelineDescriptor() : base() private Action>[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PipelineDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -210,6 +232,12 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -302,6 +330,7 @@ public PipelineDescriptor() : base() { } + private bool? DeprecatedValue { get; set; } private string? DescriptionValue { get; set; } private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } @@ -314,6 +343,18 @@ public PipelineDescriptor() : base() private Action[] ProcessorsDescriptorActions { get; set; } private long? VersionValue { get; set; } + /// + /// + /// Marks this ingest pipeline as deprecated. + /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + /// + /// + public PipelineDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + /// /// /// Description of the ingest pipeline. @@ -433,6 +474,12 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Processor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Processor.g.cs index 5ee61318923..0df789b01d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Processor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Processor.g.cs @@ -60,6 +60,7 @@ internal Processor(string variantName, object variant) public static Processor Enrich(Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor enrichProcessor) => new Processor("enrich", enrichProcessor); public static Processor Fail(Elastic.Clients.Elasticsearch.Ingest.FailProcessor failProcessor) => new Processor("fail", failProcessor); public static Processor Foreach(Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor foreachProcessor) => new Processor("foreach", foreachProcessor); + public static Processor GeoGrid(Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor geoGridProcessor) => new Processor("geo_grid", geoGridProcessor); public static Processor Geoip(Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor geoIpProcessor) => new Processor("geoip", geoIpProcessor); public static Processor Grok(Elastic.Clients.Elasticsearch.Ingest.GrokProcessor grokProcessor) => new Processor("grok", grokProcessor); public static Processor Gsub(Elastic.Clients.Elasticsearch.Ingest.GsubProcessor gsubProcessor) => new Processor("gsub", gsubProcessor); @@ -70,6 +71,7 @@ internal Processor(string variantName, object variant) public static Processor Kv(Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessor keyValueProcessor) => new Processor("kv", keyValueProcessor); public static Processor Lowercase(Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessor lowercaseProcessor) => new Processor("lowercase", lowercaseProcessor); public static Processor Pipeline(Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor pipelineProcessor) => new Processor("pipeline", pipelineProcessor); + public static Processor Redact(Elastic.Clients.Elasticsearch.Ingest.RedactProcessor redactProcessor) => new Processor("redact", redactProcessor); public static Processor Remove(Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor removeProcessor) => new Processor("remove", removeProcessor); public static Processor Rename(Elastic.Clients.Elasticsearch.Ingest.RenameProcessor renameProcessor) => new Processor("rename", renameProcessor); public static Processor Reroute(Elastic.Clients.Elasticsearch.Ingest.RerouteProcessor rerouteProcessor) => new Processor("reroute", rerouteProcessor); @@ -220,6 +222,13 @@ public override Processor Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } + if (propertyName == "geo_grid") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "geoip") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -290,6 +299,13 @@ public override Processor Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } + if (propertyName == "redact") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "remove") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -438,6 +454,9 @@ public override void Write(Utf8JsonWriter writer, Processor value, JsonSerialize case "foreach": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor)value.Variant, options); break; + case "geo_grid": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor)value.Variant, options); + break; case "geoip": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor)value.Variant, options); break; @@ -468,6 +487,9 @@ public override void Write(Utf8JsonWriter writer, Processor value, JsonSerialize case "pipeline": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor)value.Variant, options); break; + case "redact": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.RedactProcessor)value.Variant, options); + break; case "remove": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor)value.Variant, options); break; @@ -573,6 +595,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Fail(Action> configure) => Set(configure, "fail"); public ProcessorDescriptor Foreach(Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor foreachProcessor) => Set(foreachProcessor, "foreach"); public ProcessorDescriptor Foreach(Action> configure) => Set(configure, "foreach"); + public ProcessorDescriptor GeoGrid(Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor geoGridProcessor) => Set(geoGridProcessor, "geo_grid"); + public ProcessorDescriptor GeoGrid(Action> configure) => Set(configure, "geo_grid"); public ProcessorDescriptor Geoip(Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor geoIpProcessor) => Set(geoIpProcessor, "geoip"); public ProcessorDescriptor Geoip(Action> configure) => Set(configure, "geoip"); public ProcessorDescriptor Grok(Elastic.Clients.Elasticsearch.Ingest.GrokProcessor grokProcessor) => Set(grokProcessor, "grok"); @@ -593,6 +617,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Lowercase(Action> configure) => Set(configure, "lowercase"); public ProcessorDescriptor Pipeline(Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor pipelineProcessor) => Set(pipelineProcessor, "pipeline"); public ProcessorDescriptor Pipeline(Action> configure) => Set(configure, "pipeline"); + public ProcessorDescriptor Redact(Elastic.Clients.Elasticsearch.Ingest.RedactProcessor redactProcessor) => Set(redactProcessor, "redact"); + public ProcessorDescriptor Redact(Action> configure) => Set(configure, "redact"); public ProcessorDescriptor Remove(Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor removeProcessor) => Set(removeProcessor, "remove"); public ProcessorDescriptor Remove(Action> configure) => Set(configure, "remove"); public ProcessorDescriptor Rename(Elastic.Clients.Elasticsearch.Ingest.RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); @@ -699,6 +725,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Fail(Action configure) => Set(configure, "fail"); public ProcessorDescriptor Foreach(Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor foreachProcessor) => Set(foreachProcessor, "foreach"); public ProcessorDescriptor Foreach(Action configure) => Set(configure, "foreach"); + public ProcessorDescriptor GeoGrid(Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor geoGridProcessor) => Set(geoGridProcessor, "geo_grid"); + public ProcessorDescriptor GeoGrid(Action configure) => Set(configure, "geo_grid"); public ProcessorDescriptor Geoip(Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor geoIpProcessor) => Set(geoIpProcessor, "geoip"); public ProcessorDescriptor Geoip(Action configure) => Set(configure, "geoip"); public ProcessorDescriptor Grok(Elastic.Clients.Elasticsearch.Ingest.GrokProcessor grokProcessor) => Set(grokProcessor, "grok"); @@ -719,6 +747,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Lowercase(Action configure) => Set(configure, "lowercase"); public ProcessorDescriptor Pipeline(Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor pipelineProcessor) => Set(pipelineProcessor, "pipeline"); public ProcessorDescriptor Pipeline(Action configure) => Set(configure, "pipeline"); + public ProcessorDescriptor Redact(Elastic.Clients.Elasticsearch.Ingest.RedactProcessor redactProcessor) => Set(redactProcessor, "redact"); + public ProcessorDescriptor Redact(Action configure) => Set(configure, "redact"); public ProcessorDescriptor Remove(Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor removeProcessor) => Set(removeProcessor, "remove"); public ProcessorDescriptor Remove(Action configure) => Set(configure, "remove"); public ProcessorDescriptor Rename(Elastic.Clients.Elasticsearch.Ingest.RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs new file mode 100644 index 00000000000..d5254f4b816 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs @@ -0,0 +1,727 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Ingest; + +public sealed partial class RedactProcessor +{ + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// The field to be redacted + /// + /// + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Field Field { get; set; } + + /// + /// + /// Conditionally execute the processor. + /// + /// + [JsonInclude, JsonPropertyName("if")] + public string? If { get; set; } + + /// + /// + /// Ignore failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("ignore_failure")] + public bool? IgnoreFailure { get; set; } + + /// + /// + /// If true and field does not exist or is null, the processor quietly exits without modifying the document. + /// + /// + [JsonInclude, JsonPropertyName("ignore_missing")] + public bool? IgnoreMissing { get; set; } + + /// + /// + /// Handle failures for the processor. + /// + /// + [JsonInclude, JsonPropertyName("on_failure")] + public ICollection? OnFailure { get; set; } + [JsonInclude, JsonPropertyName("pattern_definitions")] + public IDictionary? PatternDefinitions { get; set; } + + /// + /// + /// A list of grok expressions to match and redact named captures with + /// + /// + [JsonInclude, JsonPropertyName("patterns")] + public ICollection Patterns { get; set; } + + /// + /// + /// Start a redacted section with this token + /// + /// + [JsonInclude, JsonPropertyName("prefix")] + public string? Prefix { get; set; } + + /// + /// + /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document + /// + /// + [JsonInclude, JsonPropertyName("skip_if_unlicensed")] + public bool? SkipIfUnlicensed { get; set; } + + /// + /// + /// End a redacted section with this token + /// + /// + [JsonInclude, JsonPropertyName("suffix")] + public string? Suffix { get; set; } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + [JsonInclude, JsonPropertyName("tag")] + public string? Tag { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Ingest.Processor(RedactProcessor redactProcessor) => Elastic.Clients.Elasticsearch.Ingest.Processor.Redact(redactProcessor); +} + +public sealed partial class RedactProcessorDescriptor : SerializableDescriptor> +{ + internal RedactProcessorDescriptor(Action> configure) => configure.Invoke(this); + + public RedactProcessorDescriptor() : base() + { + } + + private string? DescriptionValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } + private IDictionary? PatternDefinitionsValue { get; set; } + private ICollection PatternsValue { get; set; } + private string? PrefixValue { get; set; } + private bool? SkipIfUnlicensedValue { get; set; } + private string? SuffixValue { get; set; } + private string? TagValue { get; set; } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public RedactProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public RedactProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public RedactProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist or is null, the processor quietly exits without modifying the document. + /// + /// + public RedactProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public RedactProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RedactProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) + { + PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// A list of grok expressions to match and redact named captures with + /// + /// + public RedactProcessorDescriptor Patterns(ICollection patterns) + { + PatternsValue = patterns; + return Self; + } + + /// + /// + /// Start a redacted section with this token + /// + /// + public RedactProcessorDescriptor Prefix(string? prefix) + { + PrefixValue = prefix; + return Self; + } + + /// + /// + /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document + /// + /// + public RedactProcessorDescriptor SkipIfUnlicensed(bool? skipIfUnlicensed = true) + { + SkipIfUnlicensedValue = skipIfUnlicensed; + return Self; + } + + /// + /// + /// End a redacted section with this token + /// + /// + public RedactProcessorDescriptor Suffix(string? suffix) + { + SuffixValue = suffix; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public RedactProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (PatternDefinitionsValue is not null) + { + writer.WritePropertyName("pattern_definitions"); + JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); + } + + writer.WritePropertyName("patterns"); + JsonSerializer.Serialize(writer, PatternsValue, options); + if (!string.IsNullOrEmpty(PrefixValue)) + { + writer.WritePropertyName("prefix"); + writer.WriteStringValue(PrefixValue); + } + + if (SkipIfUnlicensedValue.HasValue) + { + writer.WritePropertyName("skip_if_unlicensed"); + writer.WriteBooleanValue(SkipIfUnlicensedValue.Value); + } + + if (!string.IsNullOrEmpty(SuffixValue)) + { + writer.WritePropertyName("suffix"); + writer.WriteStringValue(SuffixValue); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class RedactProcessorDescriptor : SerializableDescriptor +{ + internal RedactProcessorDescriptor(Action configure) => configure.Invoke(this); + + public RedactProcessorDescriptor() : base() + { + } + + private string? DescriptionValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } + private IDictionary? PatternDefinitionsValue { get; set; } + private ICollection PatternsValue { get; set; } + private string? PrefixValue { get; set; } + private bool? SkipIfUnlicensedValue { get; set; } + private string? SuffixValue { get; set; } + private string? TagValue { get; set; } + + /// + /// + /// Description of the processor. + /// Useful for describing the purpose of the processor or its configuration. + /// + /// + public RedactProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// The field to be redacted + /// + /// + public RedactProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Conditionally execute the processor. + /// + /// + public RedactProcessorDescriptor If(string? value) + { + IfValue = value; + return Self; + } + + /// + /// + /// Ignore failures for the processor. + /// + /// + public RedactProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// + /// If true and field does not exist or is null, the processor quietly exits without modifying the document. + /// + /// + public RedactProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + + /// + /// + /// Handle failures for the processor. + /// + /// + public RedactProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RedactProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RedactProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RedactProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) + { + PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// A list of grok expressions to match and redact named captures with + /// + /// + public RedactProcessorDescriptor Patterns(ICollection patterns) + { + PatternsValue = patterns; + return Self; + } + + /// + /// + /// Start a redacted section with this token + /// + /// + public RedactProcessorDescriptor Prefix(string? prefix) + { + PrefixValue = prefix; + return Self; + } + + /// + /// + /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document + /// + /// + public RedactProcessorDescriptor SkipIfUnlicensed(bool? skipIfUnlicensed = true) + { + SkipIfUnlicensedValue = skipIfUnlicensed; + return Self; + } + + /// + /// + /// End a redacted section with this token + /// + /// + public RedactProcessorDescriptor Suffix(string? suffix) + { + SuffixValue = suffix; + return Self; + } + + /// + /// + /// Identifier for the processor. + /// Useful for debugging and metrics. + /// + /// + public RedactProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingValue.HasValue) + { + writer.WritePropertyName("ignore_missing"); + writer.WriteBooleanValue(IgnoreMissingValue.Value); + } + + if (OnFailureDescriptor is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, OnFailureDescriptor, options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorAction is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); + writer.WriteEndArray(); + } + else if (OnFailureDescriptorActions is not null) + { + writer.WritePropertyName("on_failure"); + writer.WriteStartArray(); + foreach (var action in OnFailureDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (PatternDefinitionsValue is not null) + { + writer.WritePropertyName("pattern_definitions"); + JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); + } + + writer.WritePropertyName("patterns"); + JsonSerializer.Serialize(writer, PatternsValue, options); + if (!string.IsNullOrEmpty(PrefixValue)) + { + writer.WritePropertyName("prefix"); + writer.WriteStringValue(PrefixValue); + } + + if (SkipIfUnlicensedValue.HasValue) + { + writer.WritePropertyName("skip_if_unlicensed"); + writer.WriteBooleanValue(SkipIfUnlicensedValue.Value); + } + + if (!string.IsNullOrEmpty(SuffixValue)) + { + writer.WritePropertyName("suffix"); + writer.WriteStringValue(SuffixValue); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs index d1ea59a81d4..34a08b30431 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs @@ -38,6 +38,14 @@ public sealed partial class UserAgentProcessor [JsonInclude, JsonPropertyName("description")] public string? Description { get; set; } + /// + /// + /// Extracts device type from the user agent string on a best-effort basis. + /// + /// + [JsonInclude, JsonPropertyName("extract_device_type")] + public bool? ExtractDeviceType { get; set; } + /// /// /// The field containing the user agent string. @@ -77,8 +85,14 @@ public sealed partial class UserAgentProcessor /// [JsonInclude, JsonPropertyName("on_failure")] public ICollection? OnFailure { get; set; } - [JsonInclude, JsonPropertyName("options")] - public ICollection? Options { get; set; } + + /// + /// + /// Controls what properties are added to target_field. + /// + /// + [JsonInclude, JsonPropertyName("properties")] + public ICollection? Properties { get; set; } /// /// @@ -117,6 +131,7 @@ public UserAgentProcessorDescriptor() : base() } private string? DescriptionValue { get; set; } + private bool? ExtractDeviceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } @@ -125,7 +140,7 @@ public UserAgentProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? OptionsValue { get; set; } + private ICollection? PropertiesValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } @@ -142,6 +157,17 @@ public UserAgentProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// Extracts device type from the user agent string on a best-effort basis. + /// + /// + public UserAgentProcessorDescriptor ExtractDeviceType(bool? extractDeviceType = true) + { + ExtractDeviceTypeValue = extractDeviceType; + return Self; + } + /// /// /// The field containing the user agent string. @@ -249,9 +275,14 @@ public UserAgentProcessorDescriptor OnFailure(params Action Options(ICollection? options) + /// + /// + /// Controls what properties are added to target_field. + /// + /// + public UserAgentProcessorDescriptor Properties(ICollection? properties) { - OptionsValue = options; + PropertiesValue = properties; return Self; } @@ -320,6 +351,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (ExtractDeviceTypeValue.HasValue) + { + writer.WritePropertyName("extract_device_type"); + writer.WriteBooleanValue(ExtractDeviceTypeValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(IfValue)) @@ -371,10 +408,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (OptionsValue is not null) + if (PropertiesValue is not null) { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); } if (!string.IsNullOrEmpty(RegexFileValue)) @@ -408,6 +445,7 @@ public UserAgentProcessorDescriptor() : base() } private string? DescriptionValue { get; set; } + private bool? ExtractDeviceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } @@ -416,7 +454,7 @@ public UserAgentProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? OptionsValue { get; set; } + private ICollection? PropertiesValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } @@ -433,6 +471,17 @@ public UserAgentProcessorDescriptor Description(string? description) return Self; } + /// + /// + /// Extracts device type from the user agent string on a best-effort basis. + /// + /// + public UserAgentProcessorDescriptor ExtractDeviceType(bool? extractDeviceType = true) + { + ExtractDeviceTypeValue = extractDeviceType; + return Self; + } + /// /// /// The field containing the user agent string. @@ -540,9 +589,14 @@ public UserAgentProcessorDescriptor OnFailure(params Action? options) + /// + /// + /// Controls what properties are added to target_field. + /// + /// + public UserAgentProcessorDescriptor Properties(ICollection? properties) { - OptionsValue = options; + PropertiesValue = properties; return Self; } @@ -611,6 +665,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(DescriptionValue); } + if (ExtractDeviceTypeValue.HasValue) + { + writer.WritePropertyName("extract_device_type"); + writer.WriteBooleanValue(ExtractDeviceTypeValue.Value); + } + writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(IfValue)) @@ -662,10 +722,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (OptionsValue is not null) + if (PropertiesValue is not null) { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); } if (!string.IsNullOrEmpty(RegexFileValue)) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs index a0e178429e7..7bd01bd3b81 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs @@ -55,6 +55,30 @@ public sealed partial class CalendarEvent [JsonInclude, JsonPropertyName("event_id")] public Elastic.Clients.Elasticsearch.Id? EventId { get; set; } + /// + /// + /// Shift time by this many seconds. For example adjust time for daylight savings changes + /// + /// + [JsonInclude, JsonPropertyName("force_time_shift")] + public int? ForceTimeShift { get; set; } + + /// + /// + /// When true the model will not be updated for this calendar period. + /// + /// + [JsonInclude, JsonPropertyName("skip_model_update")] + public bool? SkipModelUpdate { get; set; } + + /// + /// + /// When true the model will not create results for this calendar period. + /// + /// + [JsonInclude, JsonPropertyName("skip_result")] + public bool? SkipResult { get; set; } + /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -76,6 +100,9 @@ public CalendarEventDescriptor() : base() private string DescriptionValue { get; set; } private DateTimeOffset EndTimeValue { get; set; } private Elastic.Clients.Elasticsearch.Id? EventIdValue { get; set; } + private int? ForceTimeShiftValue { get; set; } + private bool? SkipModelUpdateValue { get; set; } + private bool? SkipResultValue { get; set; } private DateTimeOffset StartTimeValue { get; set; } /// @@ -117,6 +144,39 @@ public CalendarEventDescriptor EventId(Elastic.Clients.Elasticsearch.Id? eventId return Self; } + /// + /// + /// Shift time by this many seconds. For example adjust time for daylight savings changes + /// + /// + public CalendarEventDescriptor ForceTimeShift(int? forceTimeShift) + { + ForceTimeShiftValue = forceTimeShift; + return Self; + } + + /// + /// + /// When true the model will not be updated for this calendar period. + /// + /// + public CalendarEventDescriptor SkipModelUpdate(bool? skipModelUpdate = true) + { + SkipModelUpdateValue = skipModelUpdate; + return Self; + } + + /// + /// + /// When true the model will not create results for this calendar period. + /// + /// + public CalendarEventDescriptor SkipResult(bool? skipResult = true) + { + SkipResultValue = skipResult; + return Self; + } + /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -147,6 +207,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, EventIdValue, options); } + if (ForceTimeShiftValue.HasValue) + { + writer.WritePropertyName("force_time_shift"); + writer.WriteNumberValue(ForceTimeShiftValue.Value); + } + + if (SkipModelUpdateValue.HasValue) + { + writer.WritePropertyName("skip_model_update"); + writer.WriteBooleanValue(SkipModelUpdateValue.Value); + } + + if (SkipResultValue.HasValue) + { + writer.WritePropertyName("skip_result"); + writer.WriteBooleanValue(SkipResultValue.Value); + } + writer.WritePropertyName("start_time"); JsonSerializer.Serialize(writer, StartTimeValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs index 574d5e31fc4..145030816b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs @@ -130,7 +130,7 @@ public sealed partial class TrainedModelDeploymentStats /// /// [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.MachineLearning.DeploymentState State { get; init; } + public Elastic.Clients.Elasticsearch.MachineLearning.DeploymentAssignmentState State { get; init; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs index 22981021119..a27bb3c9071 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs @@ -50,8 +50,6 @@ public sealed partial class BinaryProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -74,7 +72,6 @@ public BinaryPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -152,12 +149,6 @@ public BinaryPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public BinaryPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -209,12 +200,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -235,7 +220,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -255,7 +239,6 @@ public BinaryPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -333,12 +316,6 @@ public BinaryPropertyDescriptor Properties(Action? MetaValue { get; set; } private bool? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BooleanPropertyDescriptor Boost(double? boost) @@ -208,12 +205,6 @@ public BooleanPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public BooleanPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -299,12 +290,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -353,7 +338,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -379,7 +363,6 @@ public BooleanPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private bool? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public BooleanPropertyDescriptor Boost(double? boost) @@ -499,12 +482,6 @@ public BooleanPropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public ByteNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ByteNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public ByteNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public ByteNumberPropertyDescriptor Script(Action Analyzer(string? analyzer) @@ -239,12 +236,6 @@ public CompletionPropertyDescriptor SearchAnalyzer(string? searchAnal return Self; } - public CompletionPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public CompletionPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -357,12 +348,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -413,7 +398,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o PreserveSeparators = PreserveSeparatorsValue, Properties = PropertiesValue, SearchAnalyzer = SearchAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -442,7 +426,6 @@ public CompletionPropertyDescriptor() : base() private bool? PreserveSeparatorsValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SearchAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public CompletionPropertyDescriptor Analyzer(string? analyzer) @@ -586,12 +569,6 @@ public CompletionPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) return Self; } - public CompletionPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public CompletionPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -704,12 +681,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -760,7 +731,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o PreserveSeparators = PreserveSeparatorsValue, Properties = PropertiesValue, SearchAnalyzer = SearchAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompositeSubField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompositeSubField.g.cs new file mode 100644 index 00000000000..6d8b8077651 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompositeSubField.g.cs @@ -0,0 +1,59 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Mapping; + +public sealed partial class CompositeSubField +{ + [JsonInclude, JsonPropertyName("type")] + public Elastic.Clients.Elasticsearch.Mapping.RuntimeFieldType Type { get; set; } +} + +public sealed partial class CompositeSubFieldDescriptor : SerializableDescriptor +{ + internal CompositeSubFieldDescriptor(Action configure) => configure.Invoke(this); + + public CompositeSubFieldDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Mapping.RuntimeFieldType TypeValue { get; set; } + + public CompositeSubFieldDescriptor Type(Elastic.Clients.Elasticsearch.Mapping.RuntimeFieldType type) + { + TypeValue = type; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + JsonSerializer.Serialize(writer, TypeValue, options); + writer.WriteEndObject(); + } +} \ 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 index 8ee6c4ee1ce..fab89d7abb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs @@ -62,8 +62,6 @@ public sealed partial class DateNanosProperty : IProperty public int? PrecisionStep { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -92,7 +90,6 @@ public DateNanosPropertyDescriptor() : base() private DateTimeOffset? NullValueValue { get; set; } private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateNanosPropertyDescriptor Boost(double? boost) @@ -206,12 +203,6 @@ public DateNanosPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DateNanosPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -299,12 +290,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -331,7 +316,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -357,7 +341,6 @@ public DateNanosPropertyDescriptor() : base() private DateTimeOffset? NullValueValue { get; set; } private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateNanosPropertyDescriptor Boost(double? boost) @@ -471,12 +454,6 @@ public DateNanosPropertyDescriptor Properties(Action Boost(double? boost) @@ -244,12 +241,6 @@ public DatePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DatePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -359,12 +350,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -417,7 +402,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -447,7 +431,6 @@ public DatePropertyDescriptor() : base() private DateTimeOffset? NullValueValue { get; set; } private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DatePropertyDescriptor Boost(double? boost) @@ -591,12 +574,6 @@ public DatePropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -86,7 +84,6 @@ public DateRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateRangePropertyDescriptor Boost(double? boost) @@ -188,12 +185,6 @@ public DateRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DateRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -269,12 +260,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -299,7 +284,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -323,7 +307,6 @@ public DateRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DateRangePropertyDescriptor Boost(double? boost) @@ -425,12 +408,6 @@ public DateRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public DoubleNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DoubleNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public DoubleNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public DoubleNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public DoubleRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DoubleRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public DoubleRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DoubleRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public DoubleRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public DoubleRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public DoubleRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } private string? SearchAnalyzerValue { get; set; } private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -378,12 +375,6 @@ public DynamicPropertyDescriptor SearchQuoteAnalyzer(string? searchQu return Self; } - public DynamicPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DynamicPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -587,12 +578,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchQuoteAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -693,7 +678,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Script = BuildScript(), SearchAnalyzer = SearchAnalyzerValue, SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue, TermVector = TermVectorValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -739,7 +723,6 @@ public DynamicPropertyDescriptor() : base() private Action ScriptDescriptorAction { get; set; } private string? SearchAnalyzerValue { get; set; } private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -975,12 +958,6 @@ public DynamicPropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer return Self; } - public DynamicPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public DynamicPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -1184,12 +1161,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SearchQuoteAnalyzerValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -1290,7 +1261,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Script = BuildScript(), SearchAnalyzer = SearchAnalyzerValue, SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, Store = StoreValue, TermVector = TermVectorValue, TimeSeriesMetric = TimeSeriesMetricValue diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs index 36c1706ac20..78b51afb62b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -64,8 +64,6 @@ public sealed partial class FloatNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -113,7 +111,6 @@ public FloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public FloatNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public FloatNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public FloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public FloatNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public FloatRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public FloatRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public FloatRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public FloatRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public FloatRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public FloatRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public FloatRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -226,12 +223,6 @@ public GeoPointPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public GeoPointPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -329,12 +320,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -385,7 +370,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue }; } @@ -413,7 +397,6 @@ public GeoPointPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -545,12 +528,6 @@ public GeoPointPropertyDescriptor Script(Action? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? StrategyValue { get; set; } @@ -205,12 +202,6 @@ public GeoShapePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public GeoShapePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -292,12 +283,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -328,7 +313,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Orientation = OrientationValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue, Strategy = StrategyValue }; @@ -360,7 +344,6 @@ public GeoShapePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? StrategyValue { get; set; } @@ -463,12 +446,6 @@ public GeoShapePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public HalfFloatNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public HalfFloatNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public HalfFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public HalfFloatNumberPropertyDescriptor Script(Action Rules(string? rules) return Self; } - public IcuCollationPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IcuCollationPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -454,12 +445,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(RulesValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -511,7 +496,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Numeric = NumericValue, Properties = PropertiesValue, Rules = RulesValue, - Similarity = SimilarityValue, Store = StoreValue, Strength = StrengthValue, VariableTop = VariableTopValue, @@ -547,7 +531,6 @@ public IcuCollationPropertyDescriptor() : base() private bool? NumericValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? RulesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? StrengthValue { get; set; } private string? VariableTopValue { get; set; } @@ -716,12 +699,6 @@ public IcuCollationPropertyDescriptor Rules(string? rules) return Self; } - public IcuCollationPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IcuCollationPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -869,12 +846,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(RulesValue); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -926,7 +897,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Numeric = NumericValue, Properties = PropertiesValue, Rules = RulesValue, - Similarity = SimilarityValue, Store = StoreValue, Strength = StrengthValue, VariableTop = VariableTopValue, diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs index 6317c6dc0e6..8d2512bed63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -64,8 +64,6 @@ public sealed partial class IntegerNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -113,7 +111,6 @@ public IntegerNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public IntegerNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IntegerNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public IntegerNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public IntegerNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public IntegerRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IntegerRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public IntegerRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IntegerRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public IntegerRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IntegerRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public IntegerRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } @@ -235,12 +232,6 @@ public IpPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IpPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -349,12 +340,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -411,7 +396,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue }; @@ -440,7 +424,6 @@ public IpPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } @@ -573,12 +556,6 @@ public IpPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public IpRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IpRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public IpRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public IpRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public IpRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public IpRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public IpRangePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public LongNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public LongNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public LongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public LongNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -83,7 +81,6 @@ public LongRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public LongRangePropertyDescriptor Boost(double? boost) @@ -179,12 +176,6 @@ public LongRangePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public LongRangePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public LongRangePropertyDescriptor() : base() private bool? IndexValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public LongRangePropertyDescriptor Boost(double? boost) @@ -402,12 +385,6 @@ public LongRangePropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -74,7 +72,6 @@ public Murmur3HashPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -152,12 +149,6 @@ public Murmur3HashPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public Murmur3HashPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -209,12 +200,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -235,7 +220,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -255,7 +239,6 @@ public Murmur3HashPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -333,12 +316,6 @@ public Murmur3HashPropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -80,7 +78,6 @@ public NestedPropertyDescriptor() : base() private bool? IncludeInRootValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -170,12 +167,6 @@ public NestedPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public NestedPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -239,12 +230,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -267,7 +252,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IncludeInRoot = IncludeInRootValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -289,7 +273,6 @@ public NestedPropertyDescriptor() : base() private bool? IncludeInRootValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -379,12 +362,6 @@ public NestedPropertyDescriptor Properties(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } [JsonInclude, JsonPropertyName("subobjects")] @@ -76,7 +74,6 @@ public ObjectPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? SubobjectsValue { get; set; } @@ -155,12 +152,6 @@ public ObjectPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ObjectPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -218,12 +209,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -250,7 +235,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue, Subobjects = SubobjectsValue }; @@ -271,7 +255,6 @@ public ObjectPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? SubobjectsValue { get; set; } @@ -350,12 +333,6 @@ public ObjectPropertyDescriptor Properties(Action? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -179,12 +176,6 @@ public PointPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public PointPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -254,12 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -283,7 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -306,7 +290,6 @@ public PointPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -402,12 +385,6 @@ public PointPropertyDescriptor Properties(Action? FetchFields { get; set; } + /// + /// + /// For type composite + /// + /// + [JsonInclude, JsonPropertyName("fields")] + public IDictionary? Fields { get; set; } + /// /// /// A custom format for date type runtime fields. @@ -98,6 +106,7 @@ public RuntimeFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.RuntimeFieldFetchFieldsDescriptor FetchFieldsDescriptor { get; set; } private Action> FetchFieldsDescriptorAction { get; set; } private Action>[] FetchFieldsDescriptorActions { get; set; } + private IDictionary FieldsValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Field? InputFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -148,6 +157,17 @@ public RuntimeFieldDescriptor FetchFields(params Action + /// + /// For type composite + /// + /// + public RuntimeFieldDescriptor Fields(Func, FluentDescriptorDictionary> selector) + { + FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + /// /// /// A custom format for date type runtime fields. @@ -310,6 +330,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FetchFieldsValue, options); } + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -368,6 +394,7 @@ public RuntimeFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.RuntimeFieldFetchFieldsDescriptor FetchFieldsDescriptor { get; set; } private Action FetchFieldsDescriptorAction { get; set; } private Action[] FetchFieldsDescriptorActions { get; set; } + private IDictionary FieldsValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Field? InputFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -418,6 +445,17 @@ public RuntimeFieldDescriptor FetchFields(params Action + /// + /// For type composite + /// + /// + public RuntimeFieldDescriptor Fields(Func, FluentDescriptorDictionary> selector) + { + FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + /// /// /// A custom format for date type runtime fields. @@ -580,6 +618,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FetchFieldsValue, options); } + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs index c32c2f20aa6..af85a307d39 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs @@ -66,8 +66,6 @@ public sealed partial class ScaledFloatNumberProperty : IProperty public double? ScalingFactor { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -116,7 +114,6 @@ public ScaledFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -262,12 +259,6 @@ public ScaledFloatNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ScaledFloatNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -399,12 +390,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -469,7 +454,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, ScalingFactor = ScalingFactorValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -501,7 +485,6 @@ public ScaledFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -647,12 +630,6 @@ public ScaledFloatNumberPropertyDescriptor Script(Action? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ShapePropertyDescriptor Coerce(bool? coerce = true) @@ -202,12 +199,6 @@ public ShapePropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ShapePropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -283,12 +274,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -313,7 +298,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Orientation = OrientationValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -344,7 +328,6 @@ public ShapePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public ShapePropertyDescriptor Coerce(bool? coerce = true) @@ -446,12 +429,6 @@ public ShapePropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public ShortNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public ShortNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public ShortNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public ShortNumberPropertyDescriptor Script(Action? MetaValue { get; set; } private double? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public TokenCountPropertyDescriptor Analyzer(string? analyzer) @@ -197,12 +194,6 @@ public TokenCountPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public TokenCountPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -284,12 +275,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -315,7 +300,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -340,7 +324,6 @@ public TokenCountPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private double? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public TokenCountPropertyDescriptor Analyzer(string? analyzer) @@ -448,12 +431,6 @@ public TokenCountPropertyDescriptor Properties(Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -253,12 +250,6 @@ public UnsignedLongNumberPropertyDescriptor Script(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public UnsignedLongNumberPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -384,12 +375,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ScriptValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -453,7 +438,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Similarity = SimilarityValue, Store = StoreValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue @@ -484,7 +468,6 @@ public UnsignedLongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -624,12 +607,6 @@ public UnsignedLongNumberPropertyDescriptor Script(Action? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } @@ -74,7 +72,6 @@ public VersionPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -152,12 +149,6 @@ public VersionPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public VersionPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -209,12 +200,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -235,7 +220,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -255,7 +239,6 @@ public VersionPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -333,12 +316,6 @@ public VersionPropertyDescriptor Properties(Action? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -161,12 +158,6 @@ public WildcardPropertyDescriptor Properties(Action Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - public WildcardPropertyDescriptor Store(bool? store = true) { StoreValue = store; @@ -224,12 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - if (StoreValue.HasValue) { writer.WritePropertyName("store"); @@ -251,7 +236,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Similarity = SimilarityValue, Store = StoreValue }; } @@ -272,7 +256,6 @@ public WildcardPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) @@ -356,12 +339,6 @@ public WildcardPropertyDescriptor Properties(Action [JsonInclude, JsonPropertyName("ephemeral_id")] public string EphemeralId { get; init; } - [JsonInclude, JsonPropertyName("external_id")] - public string? ExternalId { get; init; } /// /// @@ -62,8 +60,6 @@ public sealed partial class NodeAttributes /// [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs index 26dad0d1a8f..987f8bd961b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs @@ -46,6 +46,14 @@ public sealed partial class Http [JsonInclude, JsonPropertyName("current_open")] public int? CurrentOpen { get; init; } + /// + /// + /// Detailed HTTP stats broken down by route + /// + /// + [JsonInclude, JsonPropertyName("routes")] + public IReadOnlyDictionary Routes { get; init; } + /// /// /// Total number of HTTP connections opened for the node. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRoute.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRoute.g.cs new file mode 100644 index 00000000000..5a7a73b0dbd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRoute.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. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Nodes; + +public sealed partial class HttpRoute +{ + [JsonInclude, JsonPropertyName("requests")] + public Elastic.Clients.Elasticsearch.Nodes.HttpRouteRequests Requests { get; init; } + [JsonInclude, JsonPropertyName("responses")] + public Elastic.Clients.Elasticsearch.Nodes.HttpRouteResponses Responses { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteRequests.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteRequests.g.cs new file mode 100644 index 00000000000..dc7a3eed1e9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteRequests.g.cs @@ -0,0 +1,38 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Nodes; + +public sealed partial class HttpRouteRequests +{ + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + [JsonInclude, JsonPropertyName("size_histogram")] + public IReadOnlyCollection SizeHistogram { get; init; } + [JsonInclude, JsonPropertyName("total_size_in_bytes")] + public long TotalSizeInBytes { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteResponses.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteResponses.g.cs new file mode 100644 index 00000000000..af52dc353ce --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/HttpRouteResponses.g.cs @@ -0,0 +1,40 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Nodes; + +public sealed partial class HttpRouteResponses +{ + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + [JsonInclude, JsonPropertyName("handling_time_histogram")] + public IReadOnlyCollection HandlingTimeHistogram { get; init; } + [JsonInclude, JsonPropertyName("size_histogram")] + public IReadOnlyCollection SizeHistogram { get; init; } + [JsonInclude, JsonPropertyName("total_size_in_bytes")] + public long TotalSizeInBytes { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Ingest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Ingest.g.cs index c006508a460..b313cac7a44 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Ingest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Ingest.g.cs @@ -35,7 +35,7 @@ public sealed partial class Ingest /// /// [JsonInclude, JsonPropertyName("pipelines")] - public IReadOnlyDictionary? Pipelines { get; init; } + public IReadOnlyDictionary? Pipelines { get; init; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestStats.g.cs new file mode 100644 index 00000000000..03ebdc03a38 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestStats.g.cs @@ -0,0 +1,92 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Nodes; + +public sealed partial class IngestStats +{ + /// + /// + /// Total number of documents ingested during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + + /// + /// + /// Total number of documents currently being ingested. + /// + /// + [JsonInclude, JsonPropertyName("current")] + public long Current { get; init; } + + /// + /// + /// Total number of failed ingest operations during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("failed")] + public long Failed { get; init; } + + /// + /// + /// Total number of bytes of all documents ingested by the pipeline. + /// This field is only present on pipelines which are the first to process a document. + /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. + /// + /// + [JsonInclude, JsonPropertyName("ingested_as_first_pipeline_in_bytes")] + public long IngestedAsFirstPipelineInBytes { get; init; } + + /// + /// + /// Total number of ingest processors. + /// + /// + [JsonInclude, JsonPropertyName("processors")] + public IReadOnlyCollection> Processors { get; init; } + + /// + /// + /// Total number of bytes of all documents produced by the pipeline. + /// This field is only present on pipelines which are the first to process a document. + /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. + /// In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run. + /// + /// + [JsonInclude, JsonPropertyName("produced_as_first_pipeline_in_bytes")] + public long ProducedAsFirstPipelineInBytes { get; init; } + + /// + /// + /// Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("time_in_millis")] + public long TimeInMillis { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestTotal.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestTotal.g.cs index 36be833970c..9984b1514d1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestTotal.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IngestTotal.g.cs @@ -35,7 +35,7 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } + public long Count { get; init; } /// /// @@ -43,7 +43,7 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("current")] - public long? Current { get; init; } + public long Current { get; init; } /// /// @@ -51,15 +51,7 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("failed")] - public long? Failed { get; init; } - - /// - /// - /// Total number of ingest processors. - /// - /// - [JsonInclude, JsonPropertyName("processors")] - public IReadOnlyCollection>? Processors { get; init; } + public long Failed { get; init; } /// /// @@ -67,5 +59,5 @@ public sealed partial class IngestTotal /// /// [JsonInclude, JsonPropertyName("time_in_millis")] - public long? TimeInMillis { get; init; } + public long TimeInMillis { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs new file mode 100644 index 00000000000..0014092d70b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs @@ -0,0 +1,38 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Nodes; + +public sealed partial class SizeHttpHistogram +{ + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + [JsonInclude, JsonPropertyName("ge_bytes")] + public long? GeBytes { get; init; } + [JsonInclude, JsonPropertyName("lt_bytes")] + public long? LtBytes { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs new file mode 100644 index 00000000000..71bc31a204f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs @@ -0,0 +1,38 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Nodes; + +public sealed partial class TimeHttpHistogram +{ + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + [JsonInclude, JsonPropertyName("ge_millis")] + public long? GeMillis { get; init; } + [JsonInclude, JsonPropertyName("lt_millis")] + public long? LtMillis { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs index 288028f159a..47cb8cf5415 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -48,6 +48,12 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "minimum_should_match") + { + variant.MinimumShouldMatch = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "minimum_should_match_field") { variant.MinimumShouldMatchField = JsonSerializer.Deserialize(ref reader, options); @@ -68,7 +74,7 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "terms") { - variant.Terms = JsonSerializer.Deserialize>(ref reader, options); + variant.Terms = JsonSerializer.Deserialize>(ref reader, options); continue; } } @@ -93,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSeria writer.WriteNumberValue(value.Boost.Value); } + if (value.MinimumShouldMatch is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, value.MinimumShouldMatch, options); + } + if (value.MinimumShouldMatchField is not null) { writer.WritePropertyName("minimum_should_match_field"); @@ -139,6 +151,13 @@ public TermsSetQuery(Elastic.Clients.Elasticsearch.Field field) public float? Boost { get; set; } public Elastic.Clients.Elasticsearch.Field Field { get; set; } + /// + /// + /// Specification describing number of matching terms required to return a document. + /// + /// + public Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatch { get; set; } + /// /// /// Numeric field containing the number of matching terms required to return a document. @@ -159,7 +178,7 @@ public TermsSetQuery(Elastic.Clients.Elasticsearch.Field field) /// Array of terms you wish to find in the provided field. /// /// - public ICollection Terms { get; set; } + public ICollection Terms { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Query(TermsSetQuery termsSetQuery) => Elastic.Clients.Elasticsearch.QueryDsl.Query.TermsSet(termsSetQuery); } @@ -174,12 +193,13 @@ public TermsSetQueryDescriptor() : base() private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? MinimumShouldMatchScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } private Action MinimumShouldMatchScriptDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } + private ICollection TermsValue { get; set; } /// /// @@ -213,6 +233,17 @@ public TermsSetQueryDescriptor Field(Expression + /// + /// Specification describing number of matching terms required to return a document. + /// + /// + public TermsSetQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// /// Numeric field containing the number of matching terms required to return a document. @@ -286,7 +317,7 @@ public TermsSetQueryDescriptor QueryName(string? queryName) /// Array of terms you wish to find in the provided field. /// /// - public TermsSetQueryDescriptor Terms(ICollection terms) + public TermsSetQueryDescriptor Terms(ICollection terms) { TermsValue = terms; return Self; @@ -305,6 +336,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(BoostValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinimumShouldMatchFieldValue is not null) { writer.WritePropertyName("minimum_should_match_field"); @@ -350,12 +387,13 @@ public TermsSetQueryDescriptor() : base() private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? MinimumShouldMatchScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } private Action MinimumShouldMatchScriptDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } + private ICollection TermsValue { get; set; } /// /// @@ -389,6 +427,17 @@ public TermsSetQueryDescriptor Field(Expression + /// + /// Specification describing number of matching terms required to return a document. + /// + /// + public TermsSetQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// /// Numeric field containing the number of matching terms required to return a document. @@ -462,7 +511,7 @@ public TermsSetQueryDescriptor QueryName(string? queryName) /// Array of terms you wish to find in the provided field. /// /// - public TermsSetQueryDescriptor Terms(ICollection terms) + public TermsSetQueryDescriptor Terms(ICollection terms) { TermsValue = terms; return Self; @@ -481,6 +530,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(BoostValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinimumShouldMatchFieldValue is not null) { writer.WritePropertyName("minimum_should_match_field"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs new file mode 100644 index 00000000000..76e91fab6de --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs @@ -0,0 +1,363 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +public sealed partial class RemoteIndicesPrivileges +{ + /// + /// + /// Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices. + /// + /// + [JsonInclude, JsonPropertyName("allow_restricted_indices")] + public bool? AllowRestrictedIndices { get; set; } + + /// + /// + /// A list of cluster aliases to which the permissions in this entry apply. + /// + /// + [JsonInclude, JsonPropertyName("clusters")] + public Elastic.Clients.Elasticsearch.Names Clusters { get; set; } + + /// + /// + /// The document fields that the owners of the role have read access to. + /// + /// + [JsonInclude, JsonPropertyName("field_security")] + public Elastic.Clients.Elasticsearch.Security.FieldSecurity? FieldSecurity { get; set; } + + /// + /// + /// A list of indices (or index name patterns) to which the permissions in this entry apply. + /// + /// + [JsonInclude, JsonPropertyName("names")] + public Elastic.Clients.Elasticsearch.Indices Names { get; set; } + + /// + /// + /// The index level privileges that owners of the role have on the specified indices. + /// + /// + [JsonInclude, JsonPropertyName("privileges")] + public ICollection Privileges { get; set; } + + /// + /// + /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. + /// + /// + [JsonInclude, JsonPropertyName("query")] + public object? Query { get; set; } +} + +public sealed partial class RemoteIndicesPrivilegesDescriptor : SerializableDescriptor> +{ + internal RemoteIndicesPrivilegesDescriptor(Action> configure) => configure.Invoke(this); + + public RemoteIndicesPrivilegesDescriptor() : base() + { + } + + private bool? AllowRestrictedIndicesValue { get; set; } + private Elastic.Clients.Elasticsearch.Names ClustersValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.FieldSecurity? FieldSecurityValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.FieldSecurityDescriptor FieldSecurityDescriptor { get; set; } + private Action> FieldSecurityDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Indices NamesValue { get; set; } + private ICollection PrivilegesValue { get; set; } + private object? QueryValue { get; set; } + + /// + /// + /// Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices. + /// + /// + public RemoteIndicesPrivilegesDescriptor AllowRestrictedIndices(bool? allowRestrictedIndices = true) + { + AllowRestrictedIndicesValue = allowRestrictedIndices; + return Self; + } + + /// + /// + /// A list of cluster aliases to which the permissions in this entry apply. + /// + /// + public RemoteIndicesPrivilegesDescriptor Clusters(Elastic.Clients.Elasticsearch.Names clusters) + { + ClustersValue = clusters; + return Self; + } + + /// + /// + /// The document fields that the owners of the role have read access to. + /// + /// + public RemoteIndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Security.FieldSecurity? fieldSecurity) + { + FieldSecurityDescriptor = null; + FieldSecurityDescriptorAction = null; + FieldSecurityValue = fieldSecurity; + return Self; + } + + public RemoteIndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Security.FieldSecurityDescriptor descriptor) + { + FieldSecurityValue = null; + FieldSecurityDescriptorAction = null; + FieldSecurityDescriptor = descriptor; + return Self; + } + + public RemoteIndicesPrivilegesDescriptor FieldSecurity(Action> configure) + { + FieldSecurityValue = null; + FieldSecurityDescriptor = null; + FieldSecurityDescriptorAction = configure; + return Self; + } + + /// + /// + /// A list of indices (or index name patterns) to which the permissions in this entry apply. + /// + /// + public RemoteIndicesPrivilegesDescriptor Names(Elastic.Clients.Elasticsearch.Indices names) + { + NamesValue = names; + return Self; + } + + /// + /// + /// The index level privileges that owners of the role have on the specified indices. + /// + /// + public RemoteIndicesPrivilegesDescriptor Privileges(ICollection privileges) + { + PrivilegesValue = privileges; + return Self; + } + + /// + /// + /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. + /// + /// + public RemoteIndicesPrivilegesDescriptor Query(object? query) + { + QueryValue = query; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AllowRestrictedIndicesValue.HasValue) + { + writer.WritePropertyName("allow_restricted_indices"); + writer.WriteBooleanValue(AllowRestrictedIndicesValue.Value); + } + + writer.WritePropertyName("clusters"); + JsonSerializer.Serialize(writer, ClustersValue, options); + if (FieldSecurityDescriptor is not null) + { + writer.WritePropertyName("field_security"); + JsonSerializer.Serialize(writer, FieldSecurityDescriptor, options); + } + else if (FieldSecurityDescriptorAction is not null) + { + writer.WritePropertyName("field_security"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.FieldSecurityDescriptor(FieldSecurityDescriptorAction), options); + } + else if (FieldSecurityValue is not null) + { + writer.WritePropertyName("field_security"); + JsonSerializer.Serialize(writer, FieldSecurityValue, options); + } + + writer.WritePropertyName("names"); + JsonSerializer.Serialize(writer, NamesValue, options); + writer.WritePropertyName("privileges"); + JsonSerializer.Serialize(writer, PrivilegesValue, options); + if (QueryValue is not null) + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, QueryValue, options); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class RemoteIndicesPrivilegesDescriptor : SerializableDescriptor +{ + internal RemoteIndicesPrivilegesDescriptor(Action configure) => configure.Invoke(this); + + public RemoteIndicesPrivilegesDescriptor() : base() + { + } + + private bool? AllowRestrictedIndicesValue { get; set; } + private Elastic.Clients.Elasticsearch.Names ClustersValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.FieldSecurity? FieldSecurityValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.FieldSecurityDescriptor FieldSecurityDescriptor { get; set; } + private Action FieldSecurityDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Indices NamesValue { get; set; } + private ICollection PrivilegesValue { get; set; } + private object? QueryValue { get; set; } + + /// + /// + /// Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices. + /// + /// + public RemoteIndicesPrivilegesDescriptor AllowRestrictedIndices(bool? allowRestrictedIndices = true) + { + AllowRestrictedIndicesValue = allowRestrictedIndices; + return Self; + } + + /// + /// + /// A list of cluster aliases to which the permissions in this entry apply. + /// + /// + public RemoteIndicesPrivilegesDescriptor Clusters(Elastic.Clients.Elasticsearch.Names clusters) + { + ClustersValue = clusters; + return Self; + } + + /// + /// + /// The document fields that the owners of the role have read access to. + /// + /// + public RemoteIndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Security.FieldSecurity? fieldSecurity) + { + FieldSecurityDescriptor = null; + FieldSecurityDescriptorAction = null; + FieldSecurityValue = fieldSecurity; + return Self; + } + + public RemoteIndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Security.FieldSecurityDescriptor descriptor) + { + FieldSecurityValue = null; + FieldSecurityDescriptorAction = null; + FieldSecurityDescriptor = descriptor; + return Self; + } + + public RemoteIndicesPrivilegesDescriptor FieldSecurity(Action configure) + { + FieldSecurityValue = null; + FieldSecurityDescriptor = null; + FieldSecurityDescriptorAction = configure; + return Self; + } + + /// + /// + /// A list of indices (or index name patterns) to which the permissions in this entry apply. + /// + /// + public RemoteIndicesPrivilegesDescriptor Names(Elastic.Clients.Elasticsearch.Indices names) + { + NamesValue = names; + return Self; + } + + /// + /// + /// The index level privileges that owners of the role have on the specified indices. + /// + /// + public RemoteIndicesPrivilegesDescriptor Privileges(ICollection privileges) + { + PrivilegesValue = privileges; + return Self; + } + + /// + /// + /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. + /// + /// + public RemoteIndicesPrivilegesDescriptor Query(object? query) + { + QueryValue = query; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AllowRestrictedIndicesValue.HasValue) + { + writer.WritePropertyName("allow_restricted_indices"); + writer.WriteBooleanValue(AllowRestrictedIndicesValue.Value); + } + + writer.WritePropertyName("clusters"); + JsonSerializer.Serialize(writer, ClustersValue, options); + if (FieldSecurityDescriptor is not null) + { + writer.WritePropertyName("field_security"); + JsonSerializer.Serialize(writer, FieldSecurityDescriptor, options); + } + else if (FieldSecurityDescriptorAction is not null) + { + writer.WritePropertyName("field_security"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.FieldSecurityDescriptor(FieldSecurityDescriptorAction), options); + } + else if (FieldSecurityValue is not null) + { + writer.WritePropertyName("field_security"); + JsonSerializer.Serialize(writer, FieldSecurityValue, options); + } + + writer.WritePropertyName("names"); + JsonSerializer.Serialize(writer, NamesValue, options); + writer.WritePropertyName("privileges"); + JsonSerializer.Serialize(writer, PrivilegesValue, options); + if (QueryValue is not null) + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, QueryValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs index 7609f772fa3..06ff9ad73cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs @@ -31,6 +31,8 @@ public sealed partial class SnapshotShardFailure { [JsonInclude, JsonPropertyName("index")] public string Index { get; init; } + [JsonInclude, JsonPropertyName("index_uuid")] + public string IndexUuid { get; init; } [JsonInclude, JsonPropertyName("node_id")] public string? NodeId { get; init; } [JsonInclude, JsonPropertyName("reason")]