diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs index 4d7c69eba2d..f84886bf35a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs @@ -21,62 +21,45 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Requests; internal static class ApiUrlLookup { - internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" }); internal static ApiUrls AsyncSearchDelete = new ApiUrls(new[] { "_async_search/{id}" }); internal static ApiUrls AsyncSearchGet = new ApiUrls(new[] { "_async_search/{id}" }); + internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" }); internal static ApiUrls AsyncSearchSubmit = new ApiUrls(new[] { "_async_search", "{index}/_async_search" }); - internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); - internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); - internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[] { "_cluster/allocation/explain" }); - internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" }); internal static ApiUrls ClusterGetSettings = new ApiUrls(new[] { "_cluster/settings" }); internal static ApiUrls ClusterHealth = new ApiUrls(new[] { "_cluster/health", "_cluster/health/{index}" }); internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[] { "_cluster/pending_tasks" }); - internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); - internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" }); - internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" }); - internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" }); - internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" }); + internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" }); internal static ApiUrls EnrichDeletePolicy = new ApiUrls(new[] { "_enrich/policy/{name}" }); - internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" }); internal static ApiUrls EnrichExecutePolicy = new ApiUrls(new[] { "_enrich/policy/{name}/_execute" }); internal static ApiUrls EnrichGetPolicy = new ApiUrls(new[] { "_enrich/policy/{name}", "_enrich/policy" }); internal static ApiUrls EnrichPutPolicy = new ApiUrls(new[] { "_enrich/policy/{name}" }); + internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" }); internal static ApiUrls EqlDelete = new ApiUrls(new[] { "_eql/search/{id}" }); internal static ApiUrls EqlGet = new ApiUrls(new[] { "_eql/search/{id}" }); - internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" }); internal static ApiUrls EqlGetStatus = new ApiUrls(new[] { "_eql/search/status/{id}" }); - internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" }); - internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" }); - internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" }); - internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" }); - internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" }); + internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" }); internal static ApiUrls GraphExplore = new ApiUrls(new[] { "{index}/_graph/explore" }); internal static ApiUrls IndexManagementClose = new ApiUrls(new[] { "{index}/_close" }); - internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); internal static ApiUrls IndexManagementCreate = new ApiUrls(new[] { "{index}" }); + internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); + internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementDeleteAlias = new ApiUrls(new[] { "{index}/_alias/{name}" }); internal static ApiUrls IndexManagementDeleteDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); internal static ApiUrls IndexManagementDeleteDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); - internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementDeleteIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); + internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementExistsAlias = new ApiUrls(new[] { "_alias/{name}", "{index}/_alias/{name}" }); internal static ApiUrls IndexManagementExistsIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); - internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementExplainDataLifecycle = new ApiUrls(new[] { "{index}/_lifecycle/explain" }); internal static ApiUrls IndexManagementFlush = new ApiUrls(new[] { "_flush", "{index}/_flush" }); internal static ApiUrls IndexManagementForcemerge = new ApiUrls(new[] { "_forcemerge", "{index}/_forcemerge" }); + internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementGetAlias = new ApiUrls(new[] { "_alias", "_alias/{name}", "{index}/_alias/{name}", "{index}/_alias" }); internal static ApiUrls IndexManagementGetDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); internal static ApiUrls IndexManagementGetDataStream = new ApiUrls(new[] { "_data_stream", "_data_stream/{name}" }); - internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementGetIndexTemplate = new ApiUrls(new[] { "_index_template", "_index_template/{name}" }); internal static ApiUrls IndexManagementGetMapping = new ApiUrls(new[] { "_mapping", "{index}/_mapping" }); - internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" }); internal static ApiUrls IndexManagementMigrateToDataStream = new ApiUrls(new[] { "_data_stream/_migrate/{name}" }); internal static ApiUrls IndexManagementOpen = new ApiUrls(new[] { "{index}/_open" }); internal static ApiUrls IndexManagementPutAlias = new ApiUrls(new[] { "{index}/_alias/{name}" }); @@ -88,15 +71,32 @@ internal static class ApiUrlLookup internal static ApiUrls IndexManagementRollover = new ApiUrls(new[] { "{alias}/_rollover", "{alias}/_rollover/{new_index}" }); internal static ApiUrls IndexManagementSimulateIndexTemplate = new ApiUrls(new[] { "_index_template/_simulate_index/{name}" }); internal static ApiUrls IndexManagementSimulateTemplate = new ApiUrls(new[] { "_index_template/_simulate", "_index_template/_simulate/{name}" }); + internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" }); internal static ApiUrls IndexManagementUpdateAliases = new ApiUrls(new[] { "_aliases" }); - internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" }); - internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" }); internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" }); internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "_ingest/geoip/stats" }); internal static ApiUrls IngestGetPipeline = new ApiUrls(new[] { "_ingest/pipeline", "_ingest/pipeline/{id}" }); internal static ApiUrls IngestProcessorGrok = new ApiUrls(new[] { "_ingest/processor/grok" }); internal static ApiUrls IngestPutPipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" }); internal static ApiUrls IngestSimulate = new ApiUrls(new[] { "_ingest/pipeline/_simulate", "_ingest/pipeline/{id}/_simulate" }); + internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); + internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); + internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); + internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); + internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" }); + internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" }); + internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" }); + internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" }); + internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" }); + internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" }); + internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" }); + internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" }); + internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" }); + internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" }); + internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" }); internal static ApiUrls NoNamespaceMget = new ApiUrls(new[] { "_mget", "{index}/_mget" }); internal static ApiUrls NoNamespaceMsearch = new ApiUrls(new[] { "_msearch", "{index}/_msearch" }); internal static ApiUrls NoNamespaceMsearchTemplate = new ApiUrls(new[] { "_msearch/template", "{index}/_msearch/template" }); @@ -111,6 +111,11 @@ internal static class ApiUrlLookup internal static ApiUrls NoNamespaceScroll = new ApiUrls(new[] { "_search/scroll" }); internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "_search", "{index}/_search" }); internal static ApiUrls NoNamespaceSearchTemplate = new ApiUrls(new[] { "_search/template", "{index}/_search/template" }); + internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" }); + internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" }); + internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); + internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); + internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); internal static ApiUrls SqlClearCursor = new ApiUrls(new[] { "_sql/close" }); internal static ApiUrls SqlDeleteAsync = new ApiUrls(new[] { "_sql/async/delete/{id}" }); internal static ApiUrls SqlGetAsync = new ApiUrls(new[] { "_sql/async/{id}" }); @@ -119,9 +124,4 @@ internal static class ApiUrlLookup internal static ApiUrls TasksCancel = new ApiUrls(new[] { "_tasks/_cancel", "_tasks/{task_id}/_cancel" }); internal static ApiUrls TasksGet = new ApiUrls(new[] { "_tasks/{task_id}" }); internal static ApiUrls TasksList = new ApiUrls(new[] { "_tasks" }); - internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" }); - internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" }); - internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); - internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); - internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs index d5d7c2b123a..c05a7af3e60 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -31,21 +31,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; public sealed class SubmitAsyncSearchRequestParameters : RequestParameters { - /// - /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } - - /// - /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. - /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } - - /// - /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -101,6 +86,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + /// + /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + + /// + /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. + /// + public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } + /// /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored /// @@ -122,10 +117,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters /// public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Specify if request cache should be used for this request or not, defaults to true /// public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// /// A comma-separated list of specific routing values @@ -138,6 +139,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + /// + /// A list of fields to exclude from the returned _source field + /// + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + /// + /// A list of fields to extract and return from the _source field + /// + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + /// /// Specifies which field to use for suggestions. /// @@ -162,22 +173,11 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response /// public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// A list of fields to exclude from the returned _source field - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// A list of fields to extract and return from the _source field - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Query in the Lucene query string syntax + /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } } internal sealed partial class SubmitAsyncSearchRequestConverter : JsonConverter @@ -204,6 +204,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "docvalue_fields") + { + variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "explain") { variant.Explain = JsonSerializer.Deserialize(ref reader, options); @@ -216,21 +222,21 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "from") + if (property == "fields") { - variant.From = JsonSerializer.Deserialize(ref reader, options); + variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); continue; } - if (property == "highlight") + if (property == "from") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.From = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "track_total_hits") + if (property == "highlight") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -240,12 +246,6 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - if (property == "knn") { variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); @@ -258,6 +258,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "pit") + { + variant.Pit = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "post_filter") { variant.PostFilter = JsonSerializer.Deserialize(ref reader, options); @@ -282,6 +288,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "runtime_mappings") + { + variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "script_fields") { variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); @@ -294,6 +306,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "seq_no_primary_term") + { + variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "size") { variant.Size = JsonSerializer.Deserialize(ref reader, options); @@ -318,9 +336,15 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "fields") + if (property == "stats") { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); + variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + + if (property == "stored_fields") + { + variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -348,39 +372,15 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") + if (property == "track_total_hits") { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "stats") + if (property == "version") { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + variant.Version = JsonSerializer.Deserialize(ref reader, options); continue; } } @@ -404,6 +404,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Collapse, options); } + if (value.DocvalueFields is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, value.DocvalueFields, options); + } + if (value.Explain.HasValue) { writer.WritePropertyName("explain"); @@ -416,6 +422,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Ext, options); } + if (value.Fields is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, value.Fields, options); + } + if (value.From.HasValue) { writer.WritePropertyName("from"); @@ -428,24 +440,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Highlight, options); } - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - if (value.IndicesBoost is not null) { writer.WritePropertyName("indices_boost"); JsonSerializer.Serialize(writer, value.IndicesBoost, options); } - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - if (value.Knn is not null) { writer.WritePropertyName("knn"); @@ -458,6 +458,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value writer.WriteNumberValue(value.MinScore.Value); } + if (value.Pit is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, value.Pit, options); + } + if (value.PostFilter is not null) { writer.WritePropertyName("post_filter"); @@ -482,6 +488,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Rescore, options); } + if (value.RuntimeMappings is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + } + if (value.ScriptFields is not null) { writer.WritePropertyName("script_fields"); @@ -494,6 +506,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.SearchAfter, options); } + if (value.SeqNoPrimaryTerm.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); + } + if (value.Size.HasValue) { writer.WritePropertyName("size"); @@ -518,10 +536,16 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Source, options); } - if (value.Fields is not null) + if (value.Stats is not null) { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); + writer.WritePropertyName("stats"); + JsonSerializer.Serialize(writer, value.Stats, options); + } + + if (value.StoredFields is not null) + { + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, value.StoredFields, options); } if (value.Suggest is not null) @@ -548,40 +572,16 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value writer.WriteBooleanValue(value.TrackScores.Value); } - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, value.StoredFields, options); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.RuntimeMappings is not null) + if (value.TrackTotalHits is not null) { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + writer.WritePropertyName("track_total_hits"); + JsonSerializer.Serialize(writer, value.TrackTotalHits, options); } - if (value.Stats is not null) + if (value.Version.HasValue) { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); + writer.WritePropertyName("version"); + writer.WriteBooleanValue(value.Version.Value); } writer.WriteEndObject(); @@ -610,24 +610,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices internal override string OperationName => "async_search.submit"; - /// - /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
- ///
- [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } - - /// - /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. - /// - [JsonIgnore] - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } - - /// - /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
- ///
- [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -695,17 +677,29 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// - /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
///
[JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } /// - /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. /// [JsonIgnore] - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - [JsonIgnore] + public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } + + /// + /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + /// + [JsonIgnore] + public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } + + /// + /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + /// + [JsonIgnore] + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + [JsonIgnore] public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } /// @@ -720,11 +714,19 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices [JsonIgnore] public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax + /// + [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Specify if request cache should be used for this request or not, defaults to true /// [JsonIgnore] public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + [JsonIgnore] + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// /// A comma-separated list of specific routing values @@ -740,6 +742,18 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + /// + /// A list of fields to exclude from the returned _source field + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + /// + /// A list of fields to extract and return from the _source field + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + /// /// Specifies which field to use for suggestions. /// @@ -769,31 +783,23 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices /// [JsonIgnore] public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// A list of fields to exclude from the returned _source field - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// A list of fields to extract and return from the _source field - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Query in the Lucene query string syntax + /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
[JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } [JsonInclude, JsonPropertyName("aggregations")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? Aggregations { get; set; } [JsonInclude, JsonPropertyName("collapse")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } + /// + /// Array of wildcard (*) patterns. The request returns doc values for field
names matching these patterns in the hits.fields property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("docvalue_fields")] + public ICollection? DocvalueFields { get; set; } + /// /// If true, returns detailed information about score computation as part of a hit. /// @@ -806,6 +812,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices [JsonInclude, JsonPropertyName("ext")] public IDictionary? Ext { get; set; } + /// + /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("fields")] + public ICollection? Fields { get; set; } + /// /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
///
@@ -814,28 +826,17 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices [JsonInclude, JsonPropertyName("highlight")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - /// - /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
- ///
- [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } - /// /// Boosts the _score of documents from specified indices. /// [JsonInclude, JsonPropertyName("indices_boost")] public ICollection>? IndicesBoost { get; set; } - /// - /// Array of wildcard (*) patterns. The request returns doc values for field
names matching these patterns in the hits.fields property of the response.
- ///
- [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - /// /// Defines the approximate kNN search to run. /// - [JsonInclude, JsonPropertyName("knn"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))] + [JsonInclude, JsonPropertyName("knn")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))] public ICollection? Knn { get; set; } /// @@ -843,6 +844,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices /// [JsonInclude, JsonPropertyName("min_score")] public double? MinScore { get; set; } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ [JsonInclude, JsonPropertyName("pit")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } [JsonInclude, JsonPropertyName("post_filter")] public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilter { get; set; } [JsonInclude, JsonPropertyName("profile")] @@ -853,9 +860,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ///
[JsonInclude, JsonPropertyName("query")] public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - [JsonInclude, JsonPropertyName("rescore"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))] + [JsonInclude, JsonPropertyName("rescore")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))] public ICollection? Rescore { get; set; } + /// + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } + /// /// Retrieve a script evaluation (based on different fields) for each hit. /// @@ -864,6 +878,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices [JsonInclude, JsonPropertyName("search_after")] public ICollection? SearchAfter { get; set; } + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ [JsonInclude, JsonPropertyName("seq_no_primary_term")] + public bool? SeqNoPrimaryTerm { get; set; } + /// /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
///
@@ -871,7 +891,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices public int? Size { get; set; } [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] public ICollection? Sort { get; set; } /// @@ -881,10 +902,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } /// - /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
+ /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } + [JsonInclude, JsonPropertyName("stats")] + public ICollection? Stats { get; set; } + + /// + /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
+ ///
+ [JsonInclude, JsonPropertyName("stored_fields")] + public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } [JsonInclude, JsonPropertyName("suggest")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? Suggest { get; set; } @@ -907,40 +934,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices public bool? TrackScores { get; set; } /// - /// If true, returns document version as part of a hit. - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- [JsonInclude, JsonPropertyName("stored_fields")] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- [JsonInclude, JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } - - /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
///
- [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("track_total_hits")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } /// - /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
+ /// If true, returns document version as part of a hit. ///
- [JsonInclude, JsonPropertyName("stats")] - public ICollection? Stats { get; set; } + [JsonInclude, JsonPropertyName("version")] + public bool? Version { get; set; } } /// @@ -962,12 +965,10 @@ public SubmitAsyncSearchRequestDescriptor() internal override string OperationName => "async_search.submit"; - public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -980,14 +981,16 @@ public SubmitAsyncSearchRequestDescriptor() public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); + public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -1011,20 +1014,29 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } private Action>[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action> KnnDescriptorAction { get; set; } private Action>[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action> PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } @@ -1032,6 +1044,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } private Action>[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } @@ -1040,20 +1057,6 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } @@ -1152,6 +1155,24 @@ public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Actio return Self; } + /// + /// If true, returns detailed information about score computation as part of a hit. + /// + public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -1191,6 +1212,15 @@ public SubmitAsyncSearchRequestDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -1215,6 +1245,15 @@ public SubmitAsyncSearchRequestDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + ///
+ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -1254,6 +1293,42 @@ public SubmitAsyncSearchRequestDescriptor Knn(params Action + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ /// + public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) { PostFilterDescriptor = null; @@ -1278,6 +1353,12 @@ public SubmitAsyncSearchRequestDescriptor PostFilter(Action Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -1341,6 +1422,48 @@ public SubmitAsyncSearchRequestDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// + public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) { SliceDescriptor = null; @@ -1410,126 +1533,6 @@ public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elas return Self; } - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// Boosts the _score of documents from specified indices. - /// - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
- ///
- public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
@@ -1683,6 +1686,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -1714,6 +1729,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -1730,6 +1751,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -1759,6 +1786,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -1775,6 +1824,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -1820,6 +1875,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -1871,98 +1956,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) + if (StatsValue is not null) { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); + writer.WritePropertyName("stats"); + JsonSerializer.Serialize(writer, StatsValue, options); } - if (ExtValue is not null) + if (StoredFieldsValue is not null) { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, StoredFieldsValue, options); } if (SuggestDescriptor is not null) @@ -2034,12 +2037,10 @@ public SubmitAsyncSearchRequestDescriptor() internal override string OperationName => "async_search.submit"; - public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -2052,14 +2053,16 @@ public SubmitAsyncSearchRequestDescriptor() public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); + public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -2083,20 +2086,29 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } private Action[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action KnnDescriptorAction { get; set; } private Action[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } @@ -2104,6 +2116,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } private Action[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } @@ -2112,20 +2129,6 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } @@ -2224,6 +2227,24 @@ public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -2263,6 +2284,15 @@ public SubmitAsyncSearchRequestDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// + public SubmitAsyncSearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -2287,6 +2317,15 @@ public SubmitAsyncSearchRequestDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + /// + public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -2326,6 +2365,42 @@ public SubmitAsyncSearchRequestDescriptor Knn(params Action[ return Self; } + /// + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ ///
+ public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) { PostFilterDescriptor = null; @@ -2350,6 +2425,12 @@ public SubmitAsyncSearchRequestDescriptor PostFilter(Action /// Defines the search definition using the Query DSL. /// @@ -2413,6 +2494,48 @@ public SubmitAsyncSearchRequestDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// + public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) { SliceDescriptor = null; @@ -2483,144 +2606,24 @@ public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.S } /// - /// If true, returns detailed information about score computation as part of a hit. + /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) + public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats) { - ExplainValue = explain; + StatsValue = stats; return Self; } /// - /// Configuration of search extensions defined by Elasticsearch plugins. + /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
///
- public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) + public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) { - ExtValue = selector?.Invoke(new FluentDictionary()); + StoredFieldsValue = storedFields; return Self; } - /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// Boosts the _score of documents from specified indices. - /// - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
- ///
- public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
- ///
- public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) + public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -2755,6 +2758,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -2786,6 +2801,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -2802,6 +2823,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -2831,6 +2858,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -2847,6 +2896,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -2892,6 +2947,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -2943,88 +3028,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs index d78c9ef5e29..a00356a5f82 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs @@ -41,6 +41,11 @@ public sealed class BulkRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the request’s actions must target an index alias. + /// + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -70,11 +75,6 @@ public sealed class BulkRequestParameters : RequestParameters /// The number of shard copies that must be active before proceeding with the operation.
Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
/// public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the request’s actions must target an index alias. - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -110,6 +110,12 @@ public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the request’s actions must target an index alias. + /// + [JsonIgnore] + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -145,12 +151,6 @@ public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the request’s actions must target an index alias. - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -172,13 +172,13 @@ public BulkRequestDescriptor() internal override string OperationName => "bulk"; - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -212,13 +212,13 @@ public BulkRequestDescriptor() internal override string OperationName => "bulk"; - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs index 066b713ff5d..038ee227a48 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs @@ -201,9 +201,9 @@ public HealthRequestDescriptor() public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents); + public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards); public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards); - public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.Serverless.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus); public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) @@ -243,9 +243,9 @@ public HealthRequestDescriptor() public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents); + public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards); public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards); - public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.Serverless.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus); public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs index 9f7368a5a2e..a97925dbd35 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs @@ -86,6 +86,11 @@ public sealed class CountRequestParameters : RequestParameters /// public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -95,11 +100,6 @@ public sealed class CountRequestParameters : RequestParameters /// Maximum number of documents to collect for each shard.
If a query reaches this limit, Elasticsearch terminates the query early.
Elasticsearch collects documents before sorting.
/// public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// Query in the Lucene query string syntax. - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } } /// @@ -190,22 +190,22 @@ public CountRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : public string? Preference { get => Q("preference"); set => Q("preference", value); } /// - /// Custom value used to route operations to a specific shard. + /// Query in the Lucene query string syntax. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } /// - /// Maximum number of documents to collect for each shard.
If a query reaches this limit, Elasticsearch terminates the query early.
Elasticsearch collects documents before sorting.
+ /// Custom value used to route operations to a specific shard. ///
[JsonIgnore] - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } + public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } /// - /// Query in the Lucene query string syntax. + /// Maximum number of documents to collect for each shard.
If a query reaches this limit, Elasticsearch terminates the query early.
Elasticsearch collects documents before sorting.
///
[JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } /// /// Defines the search definition using the Query DSL. @@ -238,8 +238,8 @@ public CountRequestDescriptor(Serverless.Indices? indices) : base(r => r.Optiona internal override string OperationName => "count"; public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public CountRequestDescriptor Df(string? df) => Qs("df", df); public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -248,7 +248,7 @@ public CountRequestDescriptor(Serverless.Indices? indices) : base(r => r.Optiona public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore); public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); @@ -336,8 +336,8 @@ public CountRequestDescriptor() internal override string OperationName => "count"; public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public CountRequestDescriptor Df(string? df) => Qs("df", df); public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -346,7 +346,7 @@ public CountRequestDescriptor() public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore); public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs index 01c1a3486b5..fe991951b21 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs @@ -86,6 +86,11 @@ public sealed class DeleteByQueryRequestParameters : RequestParameters /// public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. /// @@ -106,11 +111,6 @@ public sealed class DeleteByQueryRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - /// - /// Query in the Lucene query string syntax. - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - /// /// Period to retain the search context for scrolling. /// @@ -255,6 +255,12 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ind [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. /// @@ -279,12 +285,6 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ind [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - /// - /// Query in the Lucene query string syntax. - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - /// /// Period to retain the search context for scrolling. /// @@ -400,8 +400,8 @@ internal DeleteByQueryRequestDescriptor() internal override string OperationName => "delete_by_query"; public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) => Qs("conflicts", conflicts); public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df); @@ -410,7 +410,7 @@ internal DeleteByQueryRequestDescriptor() public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); @@ -434,13 +434,22 @@ public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elastic return Self; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } - private long? MaxDocsValue { get; set; } + + /// + /// The maximum number of documents to delete. + /// + public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to delete using the Query DSL. @@ -496,18 +505,15 @@ public DeleteByQueryRequestDescriptor Slice(Action - /// The maximum number of documents to delete. - /// - public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -540,12 +546,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - writer.WriteEndObject(); } } @@ -574,8 +574,8 @@ internal DeleteByQueryRequestDescriptor() internal override string OperationName => "delete_by_query"; public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) => Qs("conflicts", conflicts); public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df); @@ -584,7 +584,7 @@ internal DeleteByQueryRequestDescriptor() public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); @@ -608,13 +608,22 @@ public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serv return Self; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } - private long? MaxDocsValue { get; set; } + + /// + /// The maximum number of documents to delete. + /// + public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to delete using the Query DSL. @@ -670,18 +679,15 @@ public DeleteByQueryRequestDescriptor Slice(Action confi return Self; } - /// - /// The maximum number of documents to delete. - /// - public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -714,12 +720,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs index 89eb39e8df3..fb522b3a973 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -67,12 +67,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices /// [JsonIgnore] public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// EQL query you wish to run. - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } [JsonInclude, JsonPropertyName("case_sensitive")] public bool? CaseSensitive { get; set; } @@ -82,35 +76,39 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices [JsonInclude, JsonPropertyName("event_category_field")] public Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryField { get; set; } - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - [JsonInclude, JsonPropertyName("tiebreaker_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerField { get; set; } - - /// - /// Field containing event timestamp. Default "@timestamp" - /// - [JsonInclude, JsonPropertyName("timestamp_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TimestampField { get; set; } - /// /// Maximum number of events to search at a time for sequence queries. /// [JsonInclude, JsonPropertyName("fetch_size")] public int? FetchSize { get; set; } + /// + /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. + /// + [JsonInclude, JsonPropertyName("fields")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormat))] + public ICollection? Fields { get; set; } + /// /// Query, written in Query DSL, used to filter the events on which the EQL query runs. /// - [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? Filter { get; set; } [JsonInclude, JsonPropertyName("keep_alive")] public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; } [JsonInclude, JsonPropertyName("keep_on_completion")] public bool? KeepOnCompletion { get; set; } - [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; } + + /// + /// EQL query you wish to run. + /// + [JsonInclude, JsonPropertyName("query")] + public string Query { get; set; } + [JsonInclude, JsonPropertyName("result_position")] + public Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPosition { get; set; } + [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } /// /// For basic queries, the maximum number of matching events to return. Defaults to 10 @@ -119,14 +117,18 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices public int? Size { get; set; } /// - /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. + /// Field used to sort hits with the same timestamp in ascending order /// - [JsonInclude, JsonPropertyName("fields"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormat))] - public ICollection? Fields { get; set; } - [JsonInclude, JsonPropertyName("result_position")] - public Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPosition { get; set; } - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("tiebreaker_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerField { get; set; } + + /// + /// Field containing event timestamp. Default "@timestamp" + /// + [JsonInclude, JsonPropertyName("timestamp_field")] + public Elastic.Clients.Elasticsearch.Serverless.Field? TimestampField { get; set; } + [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; } } /// @@ -162,6 +164,9 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear return Self; } + private bool? CaseSensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; } + private int? FetchSizeValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } @@ -170,9 +175,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } - private bool? CaseSensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; } - private int? FetchSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } private string QueryValue { get; set; } @@ -183,6 +185,39 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear private Elastic.Clients.Elasticsearch.Serverless.Field? TimestampFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } + public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) + { + CaseSensitiveValue = caseSensitive; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Maximum number of events to search at a time for sequence queries. + /// + public EqlSearchRequestDescriptor FetchSize(int? fetchSize) + { + FetchSizeValue = fetchSize; + return Self; + } + /// /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. /// @@ -261,39 +296,6 @@ public EqlSearchRequestDescriptor Filter(params Action CaseSensitive(bool? caseSensitive = true) - { - CaseSensitiveValue = caseSensitive; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Maximum number of events to search at a time for sequence queries. - /// - public EqlSearchRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) { KeepAliveValue = keepAlive; @@ -381,6 +383,24 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Cl protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseSensitiveValue.HasValue) + { + writer.WritePropertyName("case_sensitive"); + writer.WriteBooleanValue(CaseSensitiveValue.Value); + } + + if (EventCategoryFieldValue is not null) + { + writer.WritePropertyName("event_category_field"); + JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); + } + + if (FetchSizeValue.HasValue) + { + writer.WritePropertyName("fetch_size"); + writer.WriteNumberValue(FetchSizeValue.Value); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -439,24 +459,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (CaseSensitiveValue.HasValue) - { - writer.WritePropertyName("case_sensitive"); - writer.WriteBooleanValue(CaseSensitiveValue.Value); - } - - if (EventCategoryFieldValue is not null) - { - writer.WritePropertyName("event_category_field"); - JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - if (KeepAliveValue is not null) { writer.WritePropertyName("keep_alive"); @@ -544,6 +546,9 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverle return Self; } + private bool? CaseSensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; } + private int? FetchSizeValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } @@ -552,9 +557,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverle private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } - private bool? CaseSensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; } - private int? FetchSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } private string QueryValue { get; set; } @@ -565,6 +567,48 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverle private Elastic.Clients.Elasticsearch.Serverless.Field? TimestampFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } + public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) + { + CaseSensitiveValue = caseSensitive; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Maximum number of events to search at a time for sequence queries. + /// + public EqlSearchRequestDescriptor FetchSize(int? fetchSize) + { + FetchSizeValue = fetchSize; + return Self; + } + /// /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. /// @@ -643,48 +687,6 @@ public EqlSearchRequestDescriptor Filter(params Action return Self; } - public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) - { - CaseSensitiveValue = caseSensitive; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Maximum number of events to search at a time for sequence queries. - /// - public EqlSearchRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) { KeepAliveValue = keepAlive; @@ -790,6 +792,24 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elast protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseSensitiveValue.HasValue) + { + writer.WritePropertyName("case_sensitive"); + writer.WriteBooleanValue(CaseSensitiveValue.Value); + } + + if (EventCategoryFieldValue is not null) + { + writer.WritePropertyName("event_category_field"); + JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); + } + + if (FetchSizeValue.HasValue) + { + writer.WritePropertyName("fetch_size"); + writer.WriteNumberValue(FetchSizeValue.Value); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -848,24 +868,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (CaseSensitiveValue.HasValue) - { - writer.WritePropertyName("case_sensitive"); - writer.WriteBooleanValue(CaseSensitiveValue.Value); - } - - if (EventCategoryFieldValue is not null) - { - writer.WritePropertyName("event_category_field"); - JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - if (KeepAliveValue is not null) { writer.WritePropertyName("keep_alive"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs index ff56111b146..22f27411004 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs @@ -203,13 +203,13 @@ internal ExistsRequestDescriptor() internal override string OperationName => "exists"; - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public ExistsRequestDescriptor Version(long? version) => Qs("version", version); public ExistsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); @@ -254,13 +254,13 @@ internal ExistsRequestDescriptor() internal override string OperationName => "exists"; - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public ExistsRequestDescriptor Version(long? version) => Qs("version", version); public ExistsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs index 9b94433576b..d3dc2fa1661 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs @@ -192,13 +192,13 @@ internal ExistsSourceRequestDescriptor() internal override string OperationName => "exists_source"; - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version); public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); @@ -242,13 +242,13 @@ internal ExistsSourceRequestDescriptor() internal override string OperationName => "exists_source"; - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version); public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs index eebda6f373e..d426638c64d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs @@ -61,6 +61,11 @@ public sealed class ExplainRequestParameters : RequestParameters /// public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -85,11 +90,6 @@ public sealed class ExplainRequestParameters : RequestParameters /// A comma-separated list of stored fields to return in the response. /// public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// Query in the Lucene query string syntax. - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } } /// @@ -145,6 +145,12 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -175,12 +181,6 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - /// - /// Query in the Lucene query string syntax. - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - /// /// Defines the search definition using the Query DSL. /// @@ -231,17 +231,17 @@ internal ExplainRequestDescriptor() internal override string OperationName => "explain"; - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public ExplainRequestDescriptor Df(string? df) => Qs("df", df); public ExplainRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public ExplainRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExplainRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public ExplainRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public ExplainRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExplainRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public ExplainRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) @@ -333,17 +333,17 @@ internal ExplainRequestDescriptor() internal override string OperationName => "explain"; - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public ExplainRequestDescriptor Df(string? df) => Qs("df", df); public ExplainRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public ExplainRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExplainRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public ExplainRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public ExplainRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExplainRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public ExplainRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs index 60d1c51304d..23bbeeb9a0c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs @@ -41,6 +41,11 @@ public sealed class FieldCapsRequestParameters : RequestParameters /// public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent + /// + public string? Filters { get => Q("filters"); set => Q("filters", value); } + /// /// If `true`, missing or closed indices are not included in the response. /// @@ -51,11 +56,6 @@ public sealed class FieldCapsRequestParameters : RequestParameters /// public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } - /// - /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent - /// - public string? Filters { get => Q("filters"); set => Q("filters", value); } - /// /// Only return results for fields that have one of the types in the list /// @@ -96,22 +96,22 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indice public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } /// - /// If `true`, missing or closed indices are not included in the response. + /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent /// [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + public string? Filters { get => Q("filters"); set => Q("filters", value); } /// - /// If true, unmapped fields are included in the response. + /// If `true`, missing or closed indices are not included in the response. /// [JsonIgnore] - public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// - /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent + /// If true, unmapped fields are included in the response. /// [JsonIgnore] - public string? Filters { get => Q("filters"); set => Q("filters", value); } + public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } /// /// Only return results for fields that have one of the types in the list @@ -170,12 +170,21 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsear return Self; } + private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } private QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } private Action> IndexFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } + /// + /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + /// + public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) + { + FieldsValue = fields; + return Self; + } + /// /// Allows to filter indices if the provided query rewrites to match_none on every shard. /// @@ -203,15 +212,6 @@ public FieldCapsRequestDescriptor IndexFilter(Action - /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. - /// - public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - /// /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
@@ -224,6 +224,12 @@ public FieldCapsRequestDescriptor RuntimeMappings(Func IndexFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } + /// + /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + /// + public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) + { + FieldsValue = fields; + return Self; + } + /// /// Allows to filter indices if the provided query rewrites to match_none on every shard. /// @@ -321,15 +330,6 @@ public FieldCapsRequestDescriptor IndexFilter(Action c return Self; } - /// - /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. - /// - public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - /// /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
@@ -342,6 +342,12 @@ public FieldCapsRequestDescriptor RuntimeMappings(Func "get"; - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public GetRequestDescriptor Version(long? version) => Qs("version", version); public GetRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); @@ -254,13 +254,13 @@ internal GetRequestDescriptor() internal override string OperationName => "get"; - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public GetRequestDescriptor Version(long? version) => Qs("version", version); public GetRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs index bdcba06231e..f8271920fe9 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs @@ -195,13 +195,13 @@ internal GetSourceRequestDescriptor() internal override string OperationName => "get_source"; - public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public GetSourceRequestDescriptor Version(long? version) => Qs("version", version); public GetSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); @@ -246,13 +246,13 @@ internal GetSourceRequestDescriptor() internal override string OperationName => "get_source"; - public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public GetSourceRequestDescriptor Version(long? version) => Qs("version", version); public GetSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs index 0058a7ef0e9..8cadf053693 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs @@ -138,13 +138,22 @@ public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsear return Self; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action> MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action> SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } + + /// + /// Aliases for the index. + /// + public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Mapping for fields in the index. If specified, this mapping can include:
- Field names
- Field data types
- Mapping parameters
@@ -200,18 +209,15 @@ public CreateIndexRequestDescriptor Settings(Action - /// Aliases for the index. - ///
- public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -244,12 +250,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - writer.WriteEndObject(); } } @@ -287,13 +287,22 @@ public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverle return Self; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } + + /// + /// Aliases for the index. + /// + public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Mapping for fields in the index. If specified, this mapping can include:
- Field names
- Field data types
- Mapping parameters
@@ -349,18 +358,15 @@ public CreateIndexRequestDescriptor Settings(Action con return Self; } - /// - /// Aliases for the index. - /// - public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -393,12 +399,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs index 726d5536089..e0f0d433297 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs @@ -41,6 +41,11 @@ public sealed class GetIndexRequestParameters : RequestParameters ///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// Return only information on specified index features + /// + public ICollection? Features { get => Q?>("features"); set => Q("features", value); } + /// /// If true, returns settings in flat format. /// @@ -65,11 +70,6 @@ public sealed class GetIndexRequestParameters : RequestParameters /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// Return only information on specified index features - /// - public ICollection? Features { get => Q?>("features"); set => Q("features", value); } } /// @@ -101,6 +101,12 @@ public GetIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) [JsonIgnore] public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// Return only information on specified index features + /// + [JsonIgnore] + public ICollection? Features { get => Q?>("features"); set => Q("features", value); } + /// /// If true, returns settings in flat format. /// @@ -130,12 +136,6 @@ public GetIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// Return only information on specified index features - /// - [JsonIgnore] - public ICollection? Features { get => Q?>("features"); set => Q("features", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs index 9756109d109..b523253be52 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs @@ -32,24 +32,24 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed class GetIndexTemplateRequestParameters : RequestParameters { /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + /// If true, returns settings in flat format. /// - public bool? Local { get => Q("local"); set => Q("local", value); } + public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } /// - /// If true, returns settings in flat format. + /// If true, returns all relevant default configurations for the index template. /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? Local { get => Q("local"); set => Q("local", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// @@ -74,28 +74,28 @@ public GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name? na internal override string OperationName => "indices.get_index_template"; /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + /// If true, returns settings in flat format. /// [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } + public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } /// - /// If true, returns settings in flat format. + /// If true, returns all relevant default configurations for the index template. /// [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? Local { get => Q("local"); set => Q("local", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 9c4512b098a..a1abd42d561 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -60,30 +60,30 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name nam [JsonIgnore] public bool? Create { get => Q("create"); set => Q("create", value); } - /// - /// Name of the index template to create. - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
[JsonInclude, JsonPropertyName("composed_of")] public ICollection? ComposedOf { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { get; set; } - /// /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
///
[JsonInclude, JsonPropertyName("data_stream")] public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } + /// + /// Name of the index template to create. + /// + [JsonInclude, JsonPropertyName("index_patterns")] + public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("_meta")] + public IDictionary? Meta { get; set; } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -91,16 +91,16 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name nam public int? Priority { get; set; } /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
///
- [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } + [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { get; set; } /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
- [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("version")] + public long? Version { get; set; } } /// @@ -134,54 +134,18 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elastic return Self; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -227,6 +191,15 @@ public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Client return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -236,6 +209,33 @@ public PutIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(Action> configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -248,28 +248,6 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -298,12 +276,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -345,54 +345,18 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serv return Self; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -438,6 +402,15 @@ public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticse return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -447,6 +420,33 @@ public PutIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -459,28 +459,6 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -509,12 +487,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs index 12486847aba..c22f22c95f4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -136,7 +136,8 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indice /// /// Specify dynamic templates for the mapping. /// - [JsonInclude, JsonPropertyName("dynamic_templates"), SingleOrManyCollectionConverter(typeof(IDictionary))] + [JsonInclude, JsonPropertyName("dynamic_templates")] + [SingleOrManyCollectionConverter(typeof(IDictionary))] public ICollection>? DynamicTemplates { get; set; } /// @@ -170,17 +171,17 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indice [JsonInclude, JsonPropertyName("_routing")] public Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? Routing { get; set; } - /// - /// Control whether the _source field is enabled on the index. - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? Source { get; set; } - /// /// Mapping of runtime fields for the index. /// [JsonInclude, JsonPropertyName("runtime")] public IDictionary? Runtime { get; set; } + + /// + /// Control whether the _source field is enabled on the index. + /// + [JsonInclude, JsonPropertyName("_source")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? Source { get; set; } } /// @@ -219,147 +220,93 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsea return Self; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } private Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } private Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } private Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } /// - /// Control whether field names are enabled for the index. + /// Controls whether dynamic date detection is enabled. /// - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Action configure) + public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; + DateDetectionValue = dateDetection; return Self; } /// - /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
+ /// Controls whether new fields are added dynamically. ///
- public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) + public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) { - MetaValue = selector?.Invoke(new FluentDictionary()); + DynamicValue = dynamic; return Self; } /// - /// Enable making a routing value required on indexed documents. + /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
///
- public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Routing(Action configure) + public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } /// - /// Control whether the _source field is enabled on the index. + /// Specify dynamic templates for the mapping. /// - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Source(Action configure) + public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + DynamicTemplatesValue = dynamicTemplates; return Self; } /// - /// Controls whether dynamic date detection is enabled. + /// Control whether field names are enabled for the index. /// - public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) + public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) { - DateDetectionValue = dateDetection; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - /// - /// Controls whether new fields are added dynamically. - /// - public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) { - DynamicValue = dynamic; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - /// - /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
- ///
- public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public PutMappingRequestDescriptor FieldNames(Action configure) { - DynamicDateFormatsValue = dynamicDateFormats; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } /// - /// Specify dynamic templates for the mapping. + /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
///
- public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) { - DynamicTemplatesValue = dynamicTemplates; + MetaValue = selector?.Invoke(new FluentDictionary()); return Self; } @@ -404,6 +351,33 @@ public PutMappingRequestDescriptor Properties(Action + /// Enable making a routing value required on indexed documents. + ///
+ public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) + { + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; + return Self; + } + + public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Routing(Action configure) + { + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; + return Self; + } + /// /// Mapping of runtime fields for the index. /// @@ -413,9 +387,60 @@ public PutMappingRequestDescriptor Runtime(Func + /// Control whether the _source field is enabled on the index. + ///
+ public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -438,6 +463,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -454,6 +491,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SourceDescriptor is not null) { writer.WritePropertyName("_source"); @@ -470,58 +513,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } + writer.WriteEndObject(); + } +} - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// Adds new fields to an existing data stream or index.
You can also use this API to change the search settings of existing fields.
For data streams, these changes are applied to all backing indices by default.
-///
-public sealed partial class PutMappingRequestDescriptor : RequestDescriptor -{ - internal PutMappingRequestDescriptor(Action configure) => configure.Invoke(this); +/// +/// Adds new fields to an existing data stream or index.
You can also use this API to change the search settings of existing fields.
For data streams, these changes are applied to all backing indices by default.
+///
+public sealed partial class PutMappingRequestDescriptor : RequestDescriptor +{ + internal PutMappingRequestDescriptor(Action configure) => configure.Invoke(this); public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) { @@ -552,147 +553,93 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverl return Self; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } private Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } private Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } private Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } /// - /// Control whether field names are enabled for the index. + /// Controls whether dynamic date detection is enabled. /// - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Action configure) + public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; + DateDetectionValue = dateDetection; return Self; } /// - /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
+ /// Controls whether new fields are added dynamically. ///
- public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) + public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) { - MetaValue = selector?.Invoke(new FluentDictionary()); + DynamicValue = dynamic; return Self; } /// - /// Enable making a routing value required on indexed documents. + /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
///
- public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Routing(Action configure) + public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } /// - /// Control whether the _source field is enabled on the index. + /// Specify dynamic templates for the mapping. /// - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Source(Action configure) + public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + DynamicTemplatesValue = dynamicTemplates; return Self; } /// - /// Controls whether dynamic date detection is enabled. + /// Control whether field names are enabled for the index. /// - public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) + public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) { - DateDetectionValue = dateDetection; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - /// - /// Controls whether new fields are added dynamically. - /// - public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) { - DynamicValue = dynamic; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - /// - /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
- ///
- public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public PutMappingRequestDescriptor FieldNames(Action configure) { - DynamicDateFormatsValue = dynamicDateFormats; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } /// - /// Specify dynamic templates for the mapping. + /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
///
- public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) { - DynamicTemplatesValue = dynamicTemplates; + MetaValue = selector?.Invoke(new FluentDictionary()); return Self; } @@ -737,6 +684,33 @@ public PutMappingRequestDescriptor Properties(Action + /// Enable making a routing value required on indexed documents. + ///
+ public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) + { + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; + return Self; + } + + public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Routing(Action configure) + { + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; + return Self; + } + /// /// Mapping of runtime fields for the index. /// @@ -746,9 +720,60 @@ public PutMappingRequestDescriptor Runtime(Func + /// Control whether the _source field is enabled on the index. + ///
+ public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -771,6 +796,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -787,6 +824,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SourceDescriptor is not null) { writer.WritePropertyName("_source"); @@ -803,48 +846,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs index 67253030a5e..c57e56a8b76 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -102,7 +102,8 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : /// /// Array of wildcard expressions used to match the names
of indices during creation.
///
- [JsonInclude, JsonPropertyName("index_patterns"), SingleOrManyCollectionConverter(typeof(string))] + [JsonInclude, JsonPropertyName("index_patterns")] + [SingleOrManyCollectionConverter(typeof(string))] public ICollection? IndexPatterns { get; set; } /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs index 59c698d6c23..3203e3425b5 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -37,14 +37,14 @@ public sealed class SimulateIndexTemplateRequestParameters : RequestParameters public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
+ /// If true, returns all relevant default configurations for the index template. ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
///
- public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } public sealed partial class SimulateIndexTemplateRequest : PlainRequest @@ -68,16 +68,16 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Nam public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
+ /// If true, returns all relevant default configurations for the index template. ///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
///
[JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
@@ -85,30 +85,30 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Nam [JsonInclude, JsonPropertyName("allow_auto_create")] public bool? AllowAutoCreate { get; set; } - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
[JsonInclude, JsonPropertyName("composed_of")] public ICollection? ComposedOf { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { get; set; } - /// /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
///
[JsonInclude, JsonPropertyName("data_stream")] public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + [JsonInclude, JsonPropertyName("index_patterns")] + public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("_meta")] + public IDictionary? Meta { get; set; } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -116,16 +116,16 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Nam public int? Priority { get; set; } /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
///
- [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } + [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { get; set; } /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
- [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("version")] + public long? Version { get; set; } } public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor, SimulateIndexTemplateRequestParameters> @@ -158,55 +158,19 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.El return Self; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
///
@@ -261,6 +225,15 @@ public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.C return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -270,6 +243,33 @@ public SimulateIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(Action> configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -282,28 +282,6 @@ public SimulateIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (AllowAutoCreateValue.HasValue) { writer.WritePropertyName("allow_auto_create"); @@ -338,12 +316,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -384,55 +384,19 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch return Self; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
///
@@ -487,6 +451,15 @@ public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elas return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -496,6 +469,33 @@ public SimulateIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -508,28 +508,6 @@ public SimulateIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (AllowAutoCreateValue.HasValue) { writer.WritePropertyName("allow_auto_create"); @@ -564,12 +542,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index a2cfb585ae1..c13e328662a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -37,14 +37,14 @@ public sealed class SimulateTemplateRequestParameters : RequestParameters public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, returns all relevant default configurations for the index template. /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// @@ -75,16 +75,16 @@ public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name? na public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, returns all relevant default configurations for the index template. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs index f41da154db8..23c4a51a87e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs @@ -97,9 +97,9 @@ public UpdateAliasesRequestDescriptor() public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); private ICollection? ActionsValue { get; set; } - private ActionDescriptor ActionsDescriptor { get; set; } - private Action ActionsDescriptorAction { get; set; } - private Action[] ActionsDescriptorActions { get; set; } + private ActionDescriptor ActionsDescriptor { get; set; } + private Action> ActionsDescriptorAction { get; set; } + private Action>[] ActionsDescriptorActions { get; set; } /// /// Actions to perform. @@ -113,7 +113,7 @@ public UpdateAliasesRequestDescriptor Actions(ICollection Actions(ActionDescriptor descriptor) + public UpdateAliasesRequestDescriptor Actions(ActionDescriptor descriptor) { ActionsValue = null; ActionsDescriptorAction = null; @@ -122,7 +122,7 @@ public UpdateAliasesRequestDescriptor Actions(ActionDescriptor descri return Self; } - public UpdateAliasesRequestDescriptor Actions(Action configure) + public UpdateAliasesRequestDescriptor Actions(Action> configure) { ActionsValue = null; ActionsDescriptor = null; @@ -131,7 +131,7 @@ public UpdateAliasesRequestDescriptor Actions(Action Actions(params Action[] configure) + public UpdateAliasesRequestDescriptor Actions(params Action>[] configure) { ActionsValue = null; ActionsDescriptor = null; @@ -154,7 +154,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("actions"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new ActionDescriptor(ActionsDescriptorAction), options); + JsonSerializer.Serialize(writer, new ActionDescriptor(ActionsDescriptorAction), options); writer.WriteEndArray(); } else if (ActionsDescriptorActions is not null) @@ -163,7 +163,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in ActionsDescriptorActions) { - JsonSerializer.Serialize(writer, new ActionDescriptor(action), options); + JsonSerializer.Serialize(writer, new ActionDescriptor(action), options); } writer.WriteEndArray(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs index b9950563004..673fdf1db5f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs @@ -56,6 +56,11 @@ public sealed class IndexRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the destination must be an index alias. + /// + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -80,11 +85,6 @@ public sealed class IndexRequestParameters : RequestParameters /// The number of shard copies that must be active before proceeding with the operation.
Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
///
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the destination must be an index alias. - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -141,6 +141,12 @@ public IndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the destination must be an index alias. + /// + [JsonIgnore] + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -170,12 +176,6 @@ public IndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the destination must be an index alias. - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// 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 27e931b2553..babd4ea9f82 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 @@ -31,6 +31,11 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; public sealed class PutPipelineRequestParameters : RequestParameters { + /// + /// Required version for optimistic concurrency control for pipeline updates + /// + public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -40,11 +45,6 @@ public sealed class PutPipelineRequestParameters : RequestParameters /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. /// public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// Required version for optimistic concurrency control for pipeline updates - /// - public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } } /// @@ -64,6 +64,12 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base internal override string OperationName => "ingest.put_pipeline"; + /// + /// Required version for optimistic concurrency control for pipeline updates + /// + [JsonIgnore] + public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -77,10 +83,10 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// - /// Required version for optimistic concurrency control for pipeline updates + /// Description of the ingest pipeline. /// - [JsonIgnore] - public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } /// /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. @@ -88,12 +94,6 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base [JsonInclude, JsonPropertyName("_meta")] public IDictionary? Meta { get; set; } - /// - /// Description of the ingest pipeline. - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - /// /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. /// @@ -146,6 +146,8 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. return Self; } + private string? DescriptionValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } @@ -154,10 +156,26 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action> ProcessorsDescriptorAction { get; set; } private Action>[] ProcessorsDescriptorActions { get; set; } - private IDictionary? MetaValue { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PutPipelineRequestDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. + /// + public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. /// @@ -236,24 +254,6 @@ public PutPipelineRequestDescriptor Processors(params Action - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Description of the ingest pipeline. - /// - public PutPipelineRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. /// @@ -266,6 +266,18 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -328,18 +340,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -383,6 +383,8 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless. return Self; } + private string? DescriptionValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } @@ -391,10 +393,26 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless. private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action ProcessorsDescriptorAction { get; set; } private Action[] ProcessorsDescriptorActions { get; set; } - private IDictionary? MetaValue { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PutPipelineRequestDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. + /// + public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. /// @@ -473,24 +491,6 @@ public PutPipelineRequestDescriptor Processors(params Action - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Description of the ingest pipeline. - /// - public PutPipelineRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. /// @@ -503,6 +503,18 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -565,18 +577,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs index 1b7c5a33517..50857c0bb22 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs @@ -104,40 +104,13 @@ public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Ser return Self; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? PipelineValue { get; set; } - private PipelineDescriptor PipelineDescriptor { get; set; } - private Action> PipelineDescriptorAction { get; set; } private ICollection? DocsValue { get; set; } private DocumentDescriptor DocsDescriptor { get; set; } private Action DocsDescriptorAction { get; set; } private Action[] DocsDescriptorActions { get; set; } - - /// - /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
- ///
- public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? pipeline) - { - PipelineDescriptor = null; - PipelineDescriptorAction = null; - PipelineValue = pipeline; - return Self; - } - - public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) - { - PipelineValue = null; - PipelineDescriptorAction = null; - PipelineDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Action> configure) - { - PipelineValue = null; - PipelineDescriptor = null; - PipelineDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? PipelineValue { get; set; } + private PipelineDescriptor PipelineDescriptor { get; set; } + private Action> PipelineDescriptorAction { get; set; } /// /// Sample documents to test in the pipeline. @@ -178,25 +151,36 @@ public SimulateRequestDescriptor Docs(params Action + /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
+ ///
+ public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? pipeline) + { + PipelineDescriptor = null; + PipelineDescriptorAction = null; + PipelineValue = pipeline; + return Self; + } + + public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) + { + PipelineValue = null; + PipelineDescriptorAction = null; + PipelineDescriptor = descriptor; + return Self; + } + + public SimulateRequestDescriptor Pipeline(Action> configure) + { + PipelineValue = null; + PipelineDescriptor = null; + PipelineDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (PipelineDescriptor is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineDescriptor, options); - } - else if (PipelineDescriptorAction is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); - } - else if (PipelineValue is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineValue, options); - } - if (DocsDescriptor is not null) { writer.WritePropertyName("docs"); @@ -228,6 +212,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocsValue, options); } + if (PipelineDescriptor is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineDescriptor, options); + } + else if (PipelineDescriptorAction is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); + } + else if (PipelineValue is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineValue, options); + } + writer.WriteEndObject(); } } @@ -259,40 +259,13 @@ public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? return Self; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? PipelineValue { get; set; } - private PipelineDescriptor PipelineDescriptor { get; set; } - private Action PipelineDescriptorAction { get; set; } private ICollection? DocsValue { get; set; } private DocumentDescriptor DocsDescriptor { get; set; } private Action DocsDescriptorAction { get; set; } private Action[] DocsDescriptorActions { get; set; } - - /// - /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
- ///
- public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? pipeline) - { - PipelineDescriptor = null; - PipelineDescriptorAction = null; - PipelineValue = pipeline; - return Self; - } - - public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) - { - PipelineValue = null; - PipelineDescriptorAction = null; - PipelineDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Action configure) - { - PipelineValue = null; - PipelineDescriptor = null; - PipelineDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? PipelineValue { get; set; } + private PipelineDescriptor PipelineDescriptor { get; set; } + private Action PipelineDescriptorAction { get; set; } /// /// Sample documents to test in the pipeline. @@ -333,25 +306,36 @@ public SimulateRequestDescriptor Docs(params Action[] config return Self; } + /// + /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
+ ///
+ public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? pipeline) + { + PipelineDescriptor = null; + PipelineDescriptorAction = null; + PipelineValue = pipeline; + return Self; + } + + public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) + { + PipelineValue = null; + PipelineDescriptorAction = null; + PipelineDescriptor = descriptor; + return Self; + } + + public SimulateRequestDescriptor Pipeline(Action configure) + { + PipelineValue = null; + PipelineDescriptor = null; + PipelineDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (PipelineDescriptor is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineDescriptor, options); - } - else if (PipelineDescriptorAction is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); - } - else if (PipelineValue is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineValue, options); - } - if (DocsDescriptor is not null) { writer.WritePropertyName("docs"); @@ -383,6 +367,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocsValue, options); } + if (PipelineDescriptor is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineDescriptor, options); + } + else if (PipelineDescriptorAction is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); + } + else if (PipelineValue is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineValue, options); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs index e06bc1bfed7..b3b20f45578 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs @@ -173,13 +173,13 @@ public MultiGetRequestDescriptor() internal override string OperationName => "mget"; - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public MultiGetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) @@ -305,13 +305,13 @@ public MultiGetRequestDescriptor() internal override string OperationName => "mget"; - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public MultiGetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs index f29ad9740fd..4b186583aa0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs @@ -44,14 +44,14 @@ public sealed class MultiSearchTemplateRequestParameters : RequestParameters public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } /// - /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+ /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
///
- public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// - /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
+ /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
///
- public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. @@ -93,16 +93,16 @@ public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Indic public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } /// - /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+ /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// - /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
+ /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
///
[JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs index 10c172cc8d6..52605bd1bff 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs @@ -206,8 +206,8 @@ public MultiTermVectorsRequestDescriptor() internal override string OperationName => "mtermvectors"; - public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); + public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); public MultiTermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); public MultiTermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); @@ -341,8 +341,8 @@ public MultiTermVectorsRequestDescriptor() internal override string OperationName => "mtermvectors"; - public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); + public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); public MultiTermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); public MultiTermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); 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 9c7a389bd38..b8edc33e55c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs @@ -32,15 +32,20 @@ namespace Elastic.Clients.Elasticsearch.Serverless; public sealed class OpenPointInTimeRequestParameters : RequestParameters { /// - /// Extends the time to live of the corresponding point in time. + /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
///
- public Elastic.Clients.Elasticsearch.Serverless.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + 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); } + /// + /// Extends the time to live of the corresponding point in time. + /// + public Elastic.Clients.Elasticsearch.Serverless.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + /// /// Specifies the node or shard the operation should be performed on.
Random by default.
///
@@ -50,11 +55,6 @@ public sealed class OpenPointInTimeRequestParameters : RequestParameters /// Custom value used to route operations to a specific shard. ///
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
- ///
- public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } } /// @@ -75,10 +75,10 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Serverless.Indices i internal override string OperationName => "open_point_in_time"; /// - /// Extends the time to live of the corresponding point in time. + /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + 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. @@ -87,22 +87,22 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Serverless.Indices i public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// - /// Specifies the node or shard the operation should be performed on.
Random by default.
+ /// Extends the time to live of the corresponding point in time. ///
[JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } /// - /// Custom value used to route operations to a specific shard. + /// Specifies the node or shard the operation should be performed on.
Random by default.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + public string? Preference { get => Q("preference"); set => Q("preference", value); } /// - /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+ /// Custom value used to route operations to a specific shard. ///
[JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs index 4a3d6280a1f..1f50f8e318d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs @@ -97,17 +97,17 @@ public RankEvalRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices [JsonIgnore] public string? SearchType { get => Q("search_type"); set => Q("search_type", value); } - /// - /// A set of typical search requests, together with their provided ratings. - /// - [JsonInclude, JsonPropertyName("requests")] - public ICollection Requests { get; set; } - /// /// Definition of the evaluation metric to calculate. /// [JsonInclude, JsonPropertyName("metric")] public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? Metric { get; set; } + + /// + /// A set of typical search requests, together with their provided ratings. + /// + [JsonInclude, JsonPropertyName("requests")] + public ICollection Requests { get; set; } } /// @@ -140,13 +140,40 @@ public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearc return Self; } + private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? MetricValue { get; set; } + private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } + private Action MetricDescriptorAction { get; set; } private ICollection RequestsValue { get; set; } private Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } private Action> RequestsDescriptorAction { get; set; } private Action>[] RequestsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } + + /// + /// Definition of the evaluation metric to calculate. + /// + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? metric) + { + MetricDescriptor = null; + MetricDescriptorAction = null; + MetricValue = metric; + return Self; + } + + public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptor = descriptor; + return Self; + } + + public RankEvalRequestDescriptor Metric(Action configure) + { + MetricValue = null; + MetricDescriptor = null; + MetricDescriptorAction = configure; + return Self; + } /// /// A set of typical search requests, together with their provided ratings. @@ -187,36 +214,25 @@ public RankEvalRequestDescriptor Requests(params Action - /// Definition of the evaluation metric to calculate. - /// - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? metric) - { - MetricDescriptor = null; - MetricDescriptorAction = null; - MetricValue = metric; - return Self; - } - - public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) - { - MetricValue = null; - MetricDescriptorAction = null; - MetricDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Metric(Action configure) - { - MetricValue = null; - MetricDescriptor = null; - MetricDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MetricDescriptor is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricDescriptor, options); + } + else if (MetricDescriptorAction is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); + } + else if (MetricValue is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricValue, options); + } + if (RequestsDescriptor is not null) { writer.WritePropertyName("requests"); @@ -248,22 +264,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RequestsValue, options); } - if (MetricDescriptor is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricDescriptor, options); - } - else if (MetricDescriptorAction is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); - } - else if (MetricValue is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricValue, options); - } - writer.WriteEndObject(); } } @@ -298,13 +298,40 @@ public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverles return Self; } + private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? MetricValue { get; set; } + private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } + private Action MetricDescriptorAction { get; set; } private ICollection RequestsValue { get; set; } private Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } private Action RequestsDescriptorAction { get; set; } private Action[] RequestsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } + + /// + /// Definition of the evaluation metric to calculate. + /// + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? metric) + { + MetricDescriptor = null; + MetricDescriptorAction = null; + MetricValue = metric; + return Self; + } + + public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptor = descriptor; + return Self; + } + + public RankEvalRequestDescriptor Metric(Action configure) + { + MetricValue = null; + MetricDescriptor = null; + MetricDescriptorAction = configure; + return Self; + } /// /// A set of typical search requests, together with their provided ratings. @@ -345,36 +372,25 @@ public RankEvalRequestDescriptor Requests(params Action - /// Definition of the evaluation metric to calculate. - /// - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? metric) - { - MetricDescriptor = null; - MetricDescriptorAction = null; - MetricValue = metric; - return Self; - } - - public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) - { - MetricValue = null; - MetricDescriptorAction = null; - MetricDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Metric(Action configure) - { - MetricValue = null; - MetricDescriptor = null; - MetricDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MetricDescriptor is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricDescriptor, options); + } + else if (MetricDescriptorAction is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); + } + else if (MetricValue is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricValue, options); + } + if (RequestsDescriptor is not null) { writer.WritePropertyName("requests"); @@ -406,22 +422,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RequestsValue, options); } - if (MetricDescriptor is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricDescriptor, options); - } - else if (MetricDescriptorAction is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); - } - else if (MetricValue is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs index bcac90871ab..349b159a1c1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs @@ -41,6 +41,11 @@ public sealed class ReindexRequestParameters : RequestParameters /// public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } + /// + /// If `true`, the destination must be an index alias. + /// + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Specifies how long a consistent view of the index should be maintained for scrolled search. /// @@ -65,11 +70,6 @@ public sealed class ReindexRequestParameters : RequestParameters /// If `true`, the request blocks until the operation is complete. /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// If `true`, the destination must be an index alias. - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -97,6 +97,12 @@ public sealed partial class ReindexRequest : PlainRequest Q("requests_per_second"); set => Q("requests_per_second", value); } + /// + /// If `true`, the destination must be an index alias. + /// + [JsonIgnore] + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Specifies how long a consistent view of the index should be maintained for scrolled search. /// @@ -127,12 +133,6 @@ public sealed partial class ReindexRequest : PlainRequest Q("wait_for_completion"); set => Q("wait_for_completion", value); } - /// - /// If `true`, the destination must be an index alias. - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - /// /// Set to proceed to continue reindexing even if there are conflicts. /// @@ -194,9 +194,6 @@ public ReindexRequestDescriptor() public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source SourceValue { get; set; } - private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination DestValue { get; set; } private Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } @@ -204,33 +201,9 @@ public ReindexRequestDescriptor() private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private long? SizeValue { get; set; } - - /// - /// The source you are copying from. - /// - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source SourceValue { get; set; } + private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } + private Action> SourceDescriptorAction { get; set; } /// /// Set to proceed to continue reindexing even if there are conflicts. @@ -292,25 +265,36 @@ public ReindexRequestDescriptor Size(long? size) return Self; } + /// + /// The source you are copying from. + /// + public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public ReindexRequestDescriptor Source(Action> configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (ConflictsValue is not null) { writer.WritePropertyName("conflicts"); @@ -351,6 +335,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (SourceDescriptor is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); + } + else + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + writer.WriteEndObject(); } } @@ -383,9 +383,6 @@ public ReindexRequestDescriptor() public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source SourceValue { get; set; } - private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination DestValue { get; set; } private Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } @@ -393,33 +390,9 @@ public ReindexRequestDescriptor() private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private long? SizeValue { get; set; } - - /// - /// The source you are copying from. - /// - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source SourceValue { get; set; } + private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } + private Action SourceDescriptorAction { get; set; } /// /// Set to proceed to continue reindexing even if there are conflicts. @@ -481,25 +454,36 @@ public ReindexRequestDescriptor Size(long? size) return Self; } + /// + /// The source you are copying from. + /// + public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public ReindexRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (ConflictsValue is not null) { writer.WritePropertyName("conflicts"); @@ -540,6 +524,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (SourceDescriptor is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); + } + else + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + writer.WriteEndObject(); } } \ 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 d5f1eaf6eaf..e394bfe7383 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs @@ -111,11 +111,21 @@ public sealed class SearchRequestParameters : RequestParameters /// public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+ ///
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, the caching of search results is enabled for requests where `size` is `0`.
Defaults to index level settings.
///
public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + /// + /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + /// + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -131,6 +141,16 @@ public sealed class SearchRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + /// + /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + /// + /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + /// /// Specifies which field to use for suggestions. /// @@ -155,26 +175,6 @@ public sealed class SearchRequestParameters : RequestParameters /// If `true`, aggregation and suggester names are be prefixed by their respective types in the response. ///
public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
- ///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } } internal sealed partial class SearchRequestConverter : JsonConverter @@ -201,6 +201,12 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "docvalue_fields") + { + variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "explain") { variant.Explain = JsonSerializer.Deserialize(ref reader, options); @@ -213,21 +219,21 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "from") + if (property == "fields") { - variant.From = JsonSerializer.Deserialize(ref reader, options); + variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); continue; } - if (property == "highlight") + if (property == "from") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.From = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "track_total_hits") + if (property == "highlight") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -237,27 +243,21 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - if (property == "knn") { variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } - if (property == "rank") + if (property == "min_score") { - variant.Rank = JsonSerializer.Deserialize(ref reader, options); + variant.MinScore = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "min_score") + if (property == "pit") { - variant.MinScore = JsonSerializer.Deserialize(ref reader, options); + variant.Pit = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -279,12 +279,24 @@ 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); continue; } + if (property == "runtime_mappings") + { + variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "script_fields") { variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); @@ -297,6 +309,12 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "seq_no_primary_term") + { + variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "size") { variant.Size = JsonSerializer.Deserialize(ref reader, options); @@ -321,9 +339,15 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "fields") + if (property == "stats") { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); + variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + + if (property == "stored_fields") + { + variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -351,39 +375,15 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") + if (property == "track_total_hits") { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "stats") + if (property == "version") { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + variant.Version = JsonSerializer.Deserialize(ref reader, options); continue; } } @@ -407,6 +407,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Collapse, options); } + if (value.DocvalueFields is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, value.DocvalueFields, options); + } + if (value.Explain.HasValue) { writer.WritePropertyName("explain"); @@ -419,6 +425,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Ext, options); } + if (value.Fields is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, value.Fields, options); + } + if (value.From.HasValue) { writer.WritePropertyName("from"); @@ -431,42 +443,30 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Highlight, options); } - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - if (value.IndicesBoost is not null) { writer.WritePropertyName("indices_boost"); JsonSerializer.Serialize(writer, value.IndicesBoost, options); } - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - if (value.Knn is not null) { writer.WritePropertyName("knn"); JsonSerializer.Serialize(writer, value.Knn, options); } - if (value.Rank is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, value.Rank, options); - } - if (value.MinScore.HasValue) { writer.WritePropertyName("min_score"); writer.WriteNumberValue(value.MinScore.Value); } + if (value.Pit is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, value.Pit, options); + } + if (value.PostFilter is not null) { writer.WritePropertyName("post_filter"); @@ -485,12 +485,24 @@ 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"); JsonSerializer.Serialize(writer, value.Rescore, options); } + if (value.RuntimeMappings is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + } + if (value.ScriptFields is not null) { writer.WritePropertyName("script_fields"); @@ -503,6 +515,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.SearchAfter, options); } + if (value.SeqNoPrimaryTerm.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); + } + if (value.Size.HasValue) { writer.WritePropertyName("size"); @@ -527,10 +545,16 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Source, options); } - if (value.Fields is not null) + if (value.Stats is not null) { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); + writer.WritePropertyName("stats"); + JsonSerializer.Serialize(writer, value.Stats, options); + } + + if (value.StoredFields is not null) + { + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, value.StoredFields, options); } if (value.Suggest is not null) @@ -557,40 +581,16 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria writer.WriteBooleanValue(value.TrackScores.Value); } - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, value.StoredFields, options); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.RuntimeMappings is not null) + if (value.TrackTotalHits is not null) { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + writer.WritePropertyName("track_total_hits"); + JsonSerializer.Serialize(writer, value.TrackTotalHits, options); } - if (value.Stats is not null) + if (value.Version.HasValue) { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); + writer.WritePropertyName("version"); + writer.WriteBooleanValue(value.Version.Value); } writer.WriteEndObject(); @@ -715,12 +715,24 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) [JsonIgnore] public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+ ///
+ [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, the caching of search results is enabled for requests where `size` is `0`.
Defaults to index level settings.
///
[JsonIgnore] public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + /// + /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + /// + [JsonIgnore] + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -740,58 +752,46 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } /// - /// Specifies which field to use for suggestions. + /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// - /// Specifies the suggest mode.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+ /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Number of suggestions to return.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+ /// Specifies which field to use for suggestions. ///
[JsonIgnore] - public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } - - /// - /// The source text for which the suggestions should be returned.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
- ///
- [JsonIgnore] - public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } - - /// - /// If `true`, aggregation and suggester names are be prefixed by their respective types in the response. - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } + public Elastic.Clients.Elasticsearch.Serverless.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } /// - /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + /// Specifies the suggest mode.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
///
[JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } /// - /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ /// Number of suggestions to return.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } /// - /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ /// The source text for which the suggestions should be returned.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } /// - /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+ /// If `true`, aggregation and suggester names are be prefixed by their respective types in the response. ///
[JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } /// /// Defines the aggregations that are run as part of the search request. @@ -805,6 +805,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) [JsonInclude, JsonPropertyName("collapse")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } + /// + /// Array of wildcard (`*`) patterns.
The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("docvalue_fields")] + public ICollection? DocvalueFields { get; set; } + /// /// If true, returns detailed information about score computation as part of a hit. /// @@ -817,6 +823,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) [JsonInclude, JsonPropertyName("ext")] public IDictionary? Ext { get; set; } + /// + /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("fields")] + public ICollection? Fields { get; set; } + /// /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
///
@@ -829,42 +841,31 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) [JsonInclude, JsonPropertyName("highlight")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - /// - /// Number of hits matching the query to count accurately.
If `true`, the exact number of hits is returned at the cost of some performance.
If `false`, the response does not include the total number of hits matching the query.
- ///
- [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } - /// /// Boosts the _score of documents from specified indices. /// [JsonInclude, JsonPropertyName("indices_boost")] public ICollection>? IndicesBoost { get; set; } - /// - /// Array of wildcard (`*`) patterns.
The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
- ///
- [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - /// /// Defines the approximate kNN search to run. /// - [JsonInclude, JsonPropertyName("knn"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))] + [JsonInclude, JsonPropertyName("knn")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))] public ICollection? Knn { get; set; } - /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. - /// - [JsonInclude, JsonPropertyName("rank")] - public Elastic.Clients.Elasticsearch.Serverless.Rank? Rank { get; set; } - /// /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
///
[JsonInclude, JsonPropertyName("min_score")] public double? MinScore { get; set; } + /// + /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ ///
+ [JsonInclude, JsonPropertyName("pit")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } + /// /// Use the `post_filter` parameter to filter search results.
The search hits are filtered after the aggregations are calculated.
A post filter has no impact on the aggregation results.
///
@@ -883,12 +884,25 @@ 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. /// - [JsonInclude, JsonPropertyName("rescore"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))] + [JsonInclude, JsonPropertyName("rescore")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))] public ICollection? Rescore { get; set; } + /// + /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ ///
+ [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } + /// /// Retrieve a script evaluation (based on different fields) for each hit. /// @@ -901,6 +915,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) [JsonInclude, JsonPropertyName("search_after")] public ICollection? SearchAfter { get; set; } + /// + /// If `true`, returns sequence number and primary term of the last modification of each hit. + /// + [JsonInclude, JsonPropertyName("seq_no_primary_term")] + public bool? SeqNoPrimaryTerm { get; set; } + /// /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
///
@@ -916,7 +936,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) /// /// A comma-separated list of : pairs. /// - [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] public ICollection? Sort { get; set; } /// @@ -926,10 +947,16 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } /// - /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
+ /// Stats groups to associate with the search.
Each group maintains a statistics aggregation for its associated searches.
You can retrieve these stats using the indices stats API.
///
- [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } + [JsonInclude, JsonPropertyName("stats")] + public ICollection? Stats { get; set; } + + /// + /// List of stored fields to return as part of a hit.
If no fields are specified, no stored fields are included in the response.
If this field is specified, the `_source` parameter defaults to `false`.
You can pass `_source: true` to return both source fields and stored fields in the search response.
+ ///
+ [JsonInclude, JsonPropertyName("stored_fields")] + public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } /// /// Defines a suggester that provides similar looking terms based on a provided text. @@ -956,40 +983,16 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) public bool? TrackScores { get; set; } /// - /// If true, returns document version as part of a hit. - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } - - /// - /// If `true`, returns sequence number and primary term of the last modification of each hit. - /// - [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// List of stored fields to return as part of a hit.
If no fields are specified, no stored fields are included in the response.
If this field is specified, the `_source` parameter defaults to `false`.
You can pass `_source: true` to return both source fields and stored fields in the search response.
- ///
- [JsonInclude, JsonPropertyName("stored_fields")] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - - /// - /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
- ///
- [JsonInclude, JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } - - /// - /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately.
If `true`, the exact number of hits is returned at the cost of some performance.
If `false`, the response does not include the total number of hits matching the query.
///
- [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("track_total_hits")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } /// - /// Stats groups to associate with the search.
Each group maintains a statistics aggregation for its associated searches.
You can retrieve these stats using the indices stats API.
+ /// If true, returns document version as part of a hit. ///
- [JsonInclude, JsonPropertyName("stats")] - public ICollection? Stats { get; set; } + [JsonInclude, JsonPropertyName("version")] + public bool? Version { get; set; } } /// @@ -1025,12 +1028,10 @@ public SearchRequestDescriptor(Serverless.Indices? indices) : base(r => r.Option internal override string OperationName => "search"; - public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -1041,14 +1042,16 @@ public SearchRequestDescriptor(Serverless.Indices? indices) : base(r => r.Option public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); public SearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); public SearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); + public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); public SearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -1071,27 +1074,44 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } private Action>[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action> KnnDescriptorAction { get; set; } private Action>[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action> PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Rank? RankValue { get; set; } + private RankDescriptor RankDescriptor { get; set; } + private Action RankDescriptorAction { get; set; } private ICollection? RescoreValue { get; set; } private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } private Action>[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } @@ -1100,23 +1120,6 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Rank? RankValue { get; set; } - private RankDescriptor RankDescriptor { get; set; } - private Action RankDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } @@ -1221,6 +1224,24 @@ public SearchRequestDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public SearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
///
@@ -1260,6 +1281,15 @@ public SearchRequestDescriptor Fields(params Action + /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ ///
+ public SearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + /// /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. /// @@ -1287,6 +1317,15 @@ public SearchRequestDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + ///
+ public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -1326,6 +1365,42 @@ public SearchRequestDescriptor Knn(params Action + /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
+ ///
+ public SearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ ///
+ public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + /// /// Use the `post_filter` parameter to filter search results.
The search hits are filtered after the aggregations are calculated.
A post filter has no impact on the aggregation results.
///
@@ -1353,6 +1428,15 @@ public SearchRequestDescriptor PostFilter(Action + /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
+ ///
+ public SearchRequestDescriptor Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -1381,7 +1465,34 @@ public SearchRequestDescriptor Query(Action - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases. + /// 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(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. /// public SearchRequestDescriptor Rescore(ICollection? rescore) { @@ -1419,6 +1530,51 @@ public SearchRequestDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ ///
+ public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Used to retrieve the next page of hits using a set of sort values from the previous page. + /// + public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If `true`, returns sequence number and primary term of the last modification of each hit. + /// + public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ ///
+ public SearchRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// Can be used to split a scrolled search into multiple slices that can be consumed independently. /// @@ -1494,159 +1650,6 @@ public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.S return Self; } - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public SearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
- ///
- public SearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// Boosts the _score of documents from specified indices. - /// - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
- ///
- public SearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
- ///
- public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - /// - /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
- ///
- public SearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// 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(RankDescriptor descriptor) - { - RankValue = null; - RankDescriptorAction = null; - RankDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Rank(Action configure) - { - RankValue = null; - RankDescriptor = null; - RankDescriptorAction = configure; - return Self; - } - - /// - /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
- ///
- public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If `true`, returns sequence number and primary term of the last modification of each hit. - /// - public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
- ///
- public SearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// Stats groups to associate with the search.
Each group maintains a statistics aggregation for its associated searches.
You can retrieve these stats using the indices stats API.
///
@@ -1803,6 +1806,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -1834,6 +1849,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -1850,6 +1871,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -1879,10 +1906,32 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } - if (PostFilterDescriptor is not null) + if (MinScoreValue.HasValue) { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + + if (PostFilterDescriptor is not null) + { + writer.WritePropertyName("post_filter"); + JsonSerializer.Serialize(writer, PostFilterDescriptor, options); } else if (PostFilterDescriptorAction is not null) { @@ -1895,6 +1944,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -1911,6 +1966,22 @@ 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 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"); @@ -1940,6 +2011,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -1991,104 +2092,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - 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 RankDescriptor(RankDescriptorAction), options); - } - else if (RankValue is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); @@ -2174,12 +2177,10 @@ public SearchRequestDescriptor() internal override string OperationName => "search"; - public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -2190,14 +2191,16 @@ public SearchRequestDescriptor() public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); public SearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); public SearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); + public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); public SearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -2220,27 +2223,44 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless. private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } private Action[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action KnnDescriptorAction { get; set; } private Action[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Rank? RankValue { get; set; } + private RankDescriptor RankDescriptor { get; set; } + private Action RankDescriptorAction { get; set; } private ICollection? RescoreValue { get; set; } private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } private Action[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } @@ -2249,23 +2269,6 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless. private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Rank? RankValue { get; set; } - private RankDescriptor RankDescriptor { get; set; } - private Action RankDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } @@ -2370,6 +2373,24 @@ public SearchRequestDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + ///
+ public SearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
///
@@ -2409,6 +2430,15 @@ public SearchRequestDescriptor Fields(params Action + /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ ///
+ public SearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + /// /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. /// @@ -2436,6 +2466,15 @@ public SearchRequestDescriptor Highlight(Action return Self; } + /// + /// Boosts the _score of documents from specified indices. + /// + public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -2475,6 +2514,42 @@ public SearchRequestDescriptor Knn(params Action[] configure return Self; } + /// + /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
+ ///
+ public SearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ ///
+ public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + /// /// Use the `post_filter` parameter to filter search results.
The search hits are filtered after the aggregations are calculated.
A post filter has no impact on the aggregation results.
///
@@ -2502,6 +2577,15 @@ public SearchRequestDescriptor PostFilter(Action confi return Self; } + /// + /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
+ ///
+ public SearchRequestDescriptor Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -2529,6 +2613,33 @@ public SearchRequestDescriptor Query(Action configure) return Self; } + /// + /// 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(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. /// @@ -2569,230 +2680,122 @@ public SearchRequestDescriptor Rescore(params Action - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. - ///
- public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SearchRequestDescriptor Slice(SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - /// - /// A comma-separated list of : pairs. - /// - public SearchRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SearchRequestDescriptor Sort(SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// Indicates which source fields are returned for matching documents.
These fields are returned in the hits._source property of the search response.
- ///
- public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public SearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
///
- public SearchRequestDescriptor From(int? from) + public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) { - FromValue = from; + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); return Self; } /// - /// Boosts the _score of documents from specified indices. + /// Retrieve a script evaluation (based on different fields) for each hit. /// - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) { - IndicesBoostValue = indicesBoost; + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); return Self; } /// - /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
+ /// Used to retrieve the next page of hits using a set of sort values from the previous page. ///
- public SearchRequestDescriptor MinScore(double? minScore) + public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) { - MinScoreValue = minScore; + SearchAfterValue = searchAfter; return Self; } /// - /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ /// If `true`, returns sequence number and primary term of the last modification of each hit. ///
- public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Pit(Action configure) + public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; + SeqNoPrimaryTermValue = seqNoPrimaryTerm; return Self; } /// - /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
+ /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
///
- public SearchRequestDescriptor Profile(bool? profile = true) + public SearchRequestDescriptor Size(int? size) { - ProfileValue = profile; + SizeValue = size; return Self; } /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// Can be used to split a scrolled search into multiple slices that can be consumed independently. /// - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Serverless.Rank? rank) + public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) { - RankDescriptor = null; - RankDescriptorAction = null; - RankValue = rank; + SliceDescriptor = null; + SliceDescriptorAction = null; + SliceValue = slice; return Self; } - public SearchRequestDescriptor Rank(RankDescriptor descriptor) + public SearchRequestDescriptor Slice(SlicedScrollDescriptor descriptor) { - RankValue = null; - RankDescriptorAction = null; - RankDescriptor = descriptor; + SliceValue = null; + SliceDescriptorAction = null; + SliceDescriptor = descriptor; return Self; } - public SearchRequestDescriptor Rank(Action configure) + public SearchRequestDescriptor Slice(Action configure) { - RankValue = null; - RankDescriptor = null; - RankDescriptorAction = configure; + SliceValue = null; + SliceDescriptor = null; + SliceDescriptorAction = configure; return Self; } /// - /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ /// A comma-separated list of : pairs. ///
- public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + public SearchRequestDescriptor Sort(ICollection? sort) { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; return Self; } - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + public SearchRequestDescriptor Sort(SortOptionsDescriptor descriptor) { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; return Self; } - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) + public SearchRequestDescriptor Sort(Action configure) { - SearchAfterValue = searchAfter; + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; return Self; } - /// - /// If `true`, returns sequence number and primary term of the last modification of each hit. - /// - public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + public SearchRequestDescriptor Sort(params Action[] configure) { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; return Self; } /// - /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ /// Indicates which source fields are returned for matching documents.
These fields are returned in the hits._source property of the search response.
///
- public SearchRequestDescriptor Size(int? size) + public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) { - SizeValue = size; + SourceValue = source; return Self; } @@ -2952,6 +2955,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -2983,6 +2998,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -2999,6 +3020,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -3028,6 +3055,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -3044,6 +3093,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -3060,6 +3115,22 @@ 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 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"); @@ -3089,6 +3160,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -3140,104 +3241,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - 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 RankDescriptor(RankDescriptorAction), options); - } - else if (RankValue is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs index 3611764b650..a2b2a634a22 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs @@ -61,6 +61,11 @@ public sealed class SearchTemplateRequestParameters : RequestParameters ///
public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// If true, hits.total are rendered as an integer in the response. + /// + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -76,11 +81,6 @@ public sealed class SearchTemplateRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - /// - /// If true, hits.total are rendered as an integer in the response. - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. /// @@ -144,6 +144,12 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? i [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// If true, hits.total are rendered as an integer in the response. + /// + [JsonIgnore] + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -162,12 +168,6 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? i [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - /// - /// If true, hits.total are rendered as an integer in the response. - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. /// 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 6575d10b4b5..9679e7e9861 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 @@ -71,76 +71,76 @@ public sealed partial class QueryRequest : PlainRequest public int? FetchSize { get; set; } /// - /// Elasticsearch query DSL for additional filtering. + /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } + [JsonInclude, JsonPropertyName("field_multi_value_leniency")] + public bool? FieldMultiValueLeniency { get; set; } /// - /// SQL query to run. + /// Elasticsearch query DSL for additional filtering. /// - [JsonInclude, JsonPropertyName("query")] - public string? Query { get; set; } + [JsonInclude, JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } /// - /// The timeout before the request fails. + /// If true, the search can run on frozen indices. Defaults to false. /// - [JsonInclude, JsonPropertyName("request_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? RequestTimeout { get; set; } + [JsonInclude, JsonPropertyName("index_using_frozen")] + public bool? IndexUsingFrozen { get; set; } /// - /// The timeout before a pagination request fails. + /// Retention period for an async or saved synchronous search. /// - [JsonInclude, JsonPropertyName("page_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? PageTimeout { get; set; } + [JsonInclude, JsonPropertyName("keep_alive")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; } /// - /// ISO-8601 time zone ID for the search. + /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } + [JsonInclude, JsonPropertyName("keep_on_completion")] + public bool? KeepOnCompletion { get; set; } /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). + /// The timeout before a pagination request fails. /// - [JsonInclude, JsonPropertyName("field_multi_value_leniency")] - public bool? FieldMultiValueLeniency { get; set; } + [JsonInclude, JsonPropertyName("page_timeout")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? PageTimeout { get; set; } /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Values for parameters in the query. ///
- [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("params")] + public IDictionary? Params { get; set; } /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. + /// SQL query to run. /// - [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; } + [JsonInclude, JsonPropertyName("query")] + public string? Query { get; set; } /// - /// Values for parameters in the query. + /// The timeout before the request fails. /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } + [JsonInclude, JsonPropertyName("request_timeout")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? RequestTimeout { get; set; } /// - /// Retention period for an async or saved synchronous search. + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
///
- [JsonInclude, JsonPropertyName("keep_alive")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; } + [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. + /// ISO-8601 time zone ID for the search. /// - [JsonInclude, JsonPropertyName("keep_on_completion")] - public bool? KeepOnCompletion { get; set; } + [JsonInclude, JsonPropertyName("time_zone")] + public string? TimeZone { get; set; } /// - /// If true, the search can run on frozen indices. Defaults to false. + /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. /// - [JsonInclude, JsonPropertyName("index_using_frozen")] - public bool? IndexUsingFrozen { get; set; } + [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; } } /// @@ -162,14 +162,14 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } private string? CursorValue { get; set; } private int? FetchSizeValue { get; set; } private bool? FieldMultiValueLeniencyValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } + private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } private bool? IndexUsingFrozenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } @@ -181,33 +181,6 @@ public QueryRequestDescriptor() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } - /// - /// Elasticsearch query DSL for additional filtering. - /// - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public QueryRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. /// @@ -253,6 +226,33 @@ public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMult return Self; } + /// + /// Elasticsearch query DSL for additional filtering. + /// + public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public QueryRequestDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// If true, the search can run on frozen indices. Defaults to false. /// @@ -346,22 +346,6 @@ public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Client protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (!string.IsNullOrEmpty(CatalogValue)) { writer.WritePropertyName("catalog"); @@ -392,6 +376,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(FieldMultiValueLeniencyValue.Value); } + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IndexUsingFrozenValue.HasValue) { writer.WritePropertyName("index_using_frozen"); @@ -475,14 +475,14 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } private string? CursorValue { get; set; } private int? FetchSizeValue { get; set; } private bool? FieldMultiValueLeniencyValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } + private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private bool? IndexUsingFrozenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } @@ -494,33 +494,6 @@ public QueryRequestDescriptor() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } - /// - /// Elasticsearch query DSL for additional filtering. - /// - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public QueryRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. /// @@ -566,6 +539,33 @@ public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLenie return Self; } + /// + /// Elasticsearch query DSL for additional filtering. + /// + public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public QueryRequestDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// If true, the search can run on frozen indices. Defaults to false. /// @@ -659,22 +659,6 @@ public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticse protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (!string.IsNullOrEmpty(CatalogValue)) { writer.WritePropertyName("catalog"); @@ -705,6 +689,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(FieldMultiValueLeniencyValue.Value); } + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IndexUsingFrozenValue.HasValue) { writer.WritePropertyName("index_using_frozen"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Tasks/ListRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Tasks/ListRequest.g.cs index 89b2e945956..7e89471250d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Tasks/ListRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Tasks/ListRequest.g.cs @@ -46,6 +46,11 @@ public sealed class ListRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.Serverless.Tasks.GroupBy? GroupBy { get => Q("group_by"); set => Q("group_by", value); } + /// + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + /// /// Comma-separated list of node IDs or names used to limit returned information. /// @@ -56,11 +61,6 @@ public sealed class ListRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Serverless.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - /// /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -105,22 +105,22 @@ public sealed partial class ListRequest : PlainRequest public Elastic.Clients.Elasticsearch.Serverless.Tasks.GroupBy? GroupBy { get => Q("group_by"); set => Q("group_by", value); } /// - /// Comma-separated list of node IDs or names used to limit returned information. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// [JsonIgnore] - public ICollection? NodeId { get => Q?>("node_id"); set => Q("node_id", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// - /// Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. + /// Comma-separated list of node IDs or names used to limit returned information. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } + public ICollection? NodeId { get => Q?>("node_id"); set => Q("node_id", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public Elastic.Clients.Elasticsearch.Serverless.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } /// /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs index b9002ae585c..390ea784cec 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs @@ -232,8 +232,8 @@ internal TermVectorsRequestDescriptor() internal override string OperationName => "termvectors"; - public TermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public TermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); + public TermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public TermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); public TermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); public TermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs index a43c6a78724..2965a157a29 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs @@ -50,43 +50,43 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index internal override string OperationName => "terms_enum"; - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// How many matching terms to return. - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } - /// /// When true the provided search string is matched against index terms without case sensitivity. /// [JsonInclude, JsonPropertyName("case_insensitive")] public bool? CaseInsensitive { get; set; } + /// + /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. + /// + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } + /// /// Allows to filter an index shard if the provided query rewrites to match_none. /// [JsonInclude, JsonPropertyName("index_filter")] public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilter { get; set; } + [JsonInclude, JsonPropertyName("search_after")] + public string? SearchAfter { get; set; } + + /// + /// How many matching terms to return. + /// + [JsonInclude, JsonPropertyName("size")] + public int? Size { get; set; } /// /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. /// [JsonInclude, JsonPropertyName("string")] public string? String { get; set; } - [JsonInclude, JsonPropertyName("search_after")] - public string? SearchAfter { get; set; } + + /// + /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. + /// + [JsonInclude, JsonPropertyName("timeout")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } } /// @@ -122,67 +122,67 @@ public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch return Self; } + private bool? CaseInsensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } private QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } private Action> IndexFilterDescriptorAction { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? SearchAfterValue { get; set; } private int? SizeValue { get; set; } private string? StringValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } /// - /// Allows to filter an index shard if the provided query rewrites to match_none. + /// When true the provided search string is matched against index terms without case sensitivity. /// - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) + public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; + CaseInsensitiveValue = caseInsensitive; return Self; } - public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) + /// + /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. + /// + public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; + FieldValue = field; return Self; } - public TermsEnumRequestDescriptor IndexFilter(Action> configure) + /// + /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. + /// + public TermsEnumRequestDescriptor Field(Expression> field) { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; + FieldValue = field; return Self; } /// - /// When true the provided search string is matched against index terms without case sensitivity. + /// Allows to filter an index shard if the provided query rewrites to match_none. /// - public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) + public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) { - CaseInsensitiveValue = caseInsensitive; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; return Self; } - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) { - FieldValue = field; + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; return Self; } - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - public TermsEnumRequestDescriptor Field(Expression> field) + public TermsEnumRequestDescriptor IndexFilter(Action> configure) { - FieldValue = field; + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; return Self; } @@ -222,6 +222,14 @@ public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsear protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseInsensitiveValue.HasValue) + { + writer.WritePropertyName("case_insensitive"); + writer.WriteBooleanValue(CaseInsensitiveValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (IndexFilterDescriptor is not null) { writer.WritePropertyName("index_filter"); @@ -238,14 +246,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexFilterValue, options); } - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(SearchAfterValue)) { writer.WritePropertyName("search_after"); @@ -303,43 +303,16 @@ public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless return Self; } + private bool? CaseInsensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } private QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } private Action IndexFilterDescriptorAction { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? SearchAfterValue { get; set; } private int? SizeValue { get; set; } private string? StringValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - /// - /// Allows to filter an index shard if the provided query rewrites to match_none. - /// - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(Action configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - /// /// When true the provided search string is matched against index terms without case sensitivity. /// @@ -376,6 +349,33 @@ public TermsEnumRequestDescriptor Field(Expression + /// Allows to filter an index shard if the provided query rewrites to match_none. + /// + public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(Action configure) + { + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; + return Self; + } + public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) { SearchAfterValue = searchAfter; @@ -412,6 +412,14 @@ public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverle protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseInsensitiveValue.HasValue) + { + writer.WritePropertyName("case_insensitive"); + writer.WriteBooleanValue(CaseInsensitiveValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (IndexFilterDescriptor is not null) { writer.WritePropertyName("index_filter"); @@ -428,14 +436,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexFilterValue, options); } - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(SearchAfterValue)) { writer.WritePropertyName("search_after"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs index 8585605a649..cc4449fb9a0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs @@ -357,6 +357,12 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ind [JsonIgnore] public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } + /// + /// What to do if update by query hits version conflicts: `abort` or `proceed`. + /// + [JsonInclude, JsonPropertyName("conflicts")] + public Elastic.Clients.Elasticsearch.Serverless.Conflicts? Conflicts { get; set; } + /// /// The maximum number of documents to update. /// @@ -380,12 +386,6 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ind /// [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } - - /// - /// What to do if update by query hits version conflicts: `abort` or `proceed`. - /// - [JsonInclude, JsonPropertyName("conflicts")] - public Elastic.Clients.Elasticsearch.Serverless.Conflicts? Conflicts { get; set; } } /// @@ -412,8 +412,8 @@ internal UpdateByQueryRequestDescriptor() internal override string OperationName => "update_by_query"; public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public UpdateByQueryRequestDescriptor Df(string? df) => Qs("df", df); public UpdateByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -446,15 +446,33 @@ public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elastic return Self; } + private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } + + /// + /// What to do if update by query hits version conflicts: `abort` or `proceed`. + /// + public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) + { + ConflictsValue = conflicts; + return Self; + } + + /// + /// The maximum number of documents to update. + /// + public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to update using the Query DSL. @@ -483,6 +501,15 @@ public UpdateByQueryRequestDescriptor Query(Action + /// The script to run to update the document source or metadata when updating. + /// + public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// Slice the request manually using the provided slice ID and total number of slices. /// @@ -510,36 +537,21 @@ public UpdateByQueryRequestDescriptor Slice(Action - /// What to do if update by query hits version conflicts: `abort` or `proceed`. - /// - public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// The maximum number of documents to update. - /// - public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// The script to run to update the document source or metadata when updating. - /// - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptValue = script; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ConflictsValue is not null) + { + writer.WritePropertyName("conflicts"); + JsonSerializer.Serialize(writer, ConflictsValue, options); + } + + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -556,6 +568,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -572,24 +590,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - writer.WriteEndObject(); } } @@ -618,8 +618,8 @@ internal UpdateByQueryRequestDescriptor() internal override string OperationName => "update_by_query"; public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public UpdateByQueryRequestDescriptor Df(string? df) => Qs("df", df); public UpdateByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -652,15 +652,33 @@ public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serv return Self; } + private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } + + /// + /// What to do if update by query hits version conflicts: `abort` or `proceed`. + /// + public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) + { + ConflictsValue = conflicts; + return Self; + } + + /// + /// The maximum number of documents to update. + /// + public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to update using the Query DSL. @@ -689,6 +707,15 @@ public UpdateByQueryRequestDescriptor Query(Action con return Self; } + /// + /// The script to run to update the document source or metadata when updating. + /// + public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// Slice the request manually using the provided slice ID and total number of slices. /// @@ -716,36 +743,21 @@ public UpdateByQueryRequestDescriptor Slice(Action confi return Self; } - /// - /// What to do if update by query hits version conflicts: `abort` or `proceed`. - /// - public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// The maximum number of documents to update. - /// - public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// The script to run to update the document source or metadata when updating. - /// - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptValue = script; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ConflictsValue is not null) + { + writer.WritePropertyName("conflicts"); + JsonSerializer.Serialize(writer, ConflictsValue, options); + } + + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -762,6 +774,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -778,24 +796,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs index 0f40b80daa7..830373fb050 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs @@ -67,24 +67,24 @@ public sealed class UpdateRequestParameters : RequestParameters public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } /// - /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
+ /// Specify the source fields you want to exclude. ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// - /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
+ /// Specify the source fields you want to retrieve. ///
- public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Specify the source fields you want to exclude. + /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
///
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// - /// Specify the source fields you want to retrieve. + /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
///
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } } /// @@ -147,28 +147,28 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, E public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } /// - /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
+ /// Specify the source fields you want to exclude. ///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// - /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
+ /// Specify the source fields you want to retrieve. ///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Specify the source fields you want to exclude. + /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// - /// Specify the source fields you want to retrieve. + /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } /// /// Set to false to disable setting 'result' in the response
to 'noop' if no change to the document occurred.
@@ -258,8 +258,6 @@ internal UpdateRequestDescriptor() internal override string OperationName => "update"; - public UpdateRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public UpdateRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public UpdateRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); public UpdateRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); public UpdateRequestDescriptor Lang(string? lang) => Qs("lang", lang); @@ -267,6 +265,8 @@ internal UpdateRequestDescriptor() public UpdateRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); public UpdateRequestDescriptor RetryOnConflict(int? retryOnConflict) => Qs("retry_on_conflict", retryOnConflict); public UpdateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); + public UpdateRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public UpdateRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public UpdateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public UpdateRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -282,23 +282,14 @@ public UpdateRequestDescriptor Index(Elastic.Client return Self; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private bool? DetectNoopValue { get; set; } private TPartialDocument? DocValue { get; set; } private bool? DocAsUpsertValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private bool? ScriptedUpsertValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private TDocument? UpsertValue { get; set; } - /// - /// Set to false to disable source retrieval. You can also specify a comma-separated
list of the fields you want to retrieve.
- ///
- public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - /// /// Set to false to disable setting 'result' in the response
to 'noop' if no change to the document occurred.
///
@@ -344,6 +335,15 @@ public UpdateRequestDescriptor ScriptedUpsert(bool? return Self; } + /// + /// Set to false to disable source retrieval. You can also specify a comma-separated
list of the fields you want to retrieve.
+ ///
+ public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// If the document does not already exist, the contents of 'upsert' are inserted as a
new document. If the document exists, the 'script' is executed.
///
@@ -356,12 +356,6 @@ public UpdateRequestDescriptor Upsert(TDocument? up protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (DetectNoopValue.HasValue) { writer.WritePropertyName("detect_noop"); @@ -392,6 +386,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ScriptedUpsertValue.Value); } + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (UpsertValue is not null) { writer.WritePropertyName("upsert"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs index 1bdc006da18..b0e114774af 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs @@ -38,7 +38,7 @@ internal AsyncSearchNamespacedClient(ElasticsearchClient client) : base(client) /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequest request) { @@ -48,7 +48,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequest request /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(AsyncSearchStatusRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task StatusAsync(AsyncSearchStatusRequ /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Serverless.Id id) { @@ -69,7 +69,7 @@ public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Se /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequestDescript /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest) { @@ -91,7 +91,7 @@ public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Se /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequestDescriptor descriptor) { @@ -101,7 +101,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequ /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest) { @@ -113,7 +113,7 @@ public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elast /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task StatusAsync(Elastic.Clients.Elast /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -134,7 +134,7 @@ public virtual Task StatusAsync(AsyncSearchStatusRequ /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -146,7 +146,7 @@ public virtual Task StatusAsync(Elastic.Clients.Elast /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -156,7 +156,7 @@ public virtual Task StatusAsync(AsyncSearc /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -168,7 +168,7 @@ public virtual Task StatusAsync(Elastic.Cl /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequest request) { @@ -178,7 +178,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequest request /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteAsyncSearchRequest request, CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task DeleteAsync(DeleteAsyncSearchRequ /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Serverless.Id id) { @@ -199,7 +199,7 @@ public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Se /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequestDescriptor descriptor) { @@ -209,7 +209,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequestDescript /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest) { @@ -221,7 +221,7 @@ public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Se /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequestDescriptor descriptor) { @@ -231,7 +231,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequ /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest) { @@ -243,7 +243,7 @@ public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elast /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -254,7 +254,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elast /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -264,7 +264,7 @@ public virtual Task DeleteAsync(DeleteAsyncSearchRequ /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -276,7 +276,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elast /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -286,7 +286,7 @@ public virtual Task DeleteAsync(DeleteAsyn /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -298,7 +298,7 @@ public virtual Task DeleteAsync(Elastic.Cl /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(GetAsyncSearchRequest request) { @@ -308,7 +308,7 @@ public virtual GetAsyncSearchResponse Get(GetAsyncSearchRe /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(GetAsyncSearchRequest request, CancellationToken cancellationToken = default) { @@ -318,7 +318,7 @@ public virtual Task> GetAsync(GetAs /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id id) { @@ -329,7 +329,7 @@ public virtual GetAsyncSearchResponse Get(Elastic.Clients. /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(GetAsyncSearchRequestDescriptor descriptor) { @@ -339,7 +339,7 @@ public virtual GetAsyncSearchResponse Get(GetAsyncSearchRe /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest) { @@ -351,7 +351,7 @@ public virtual GetAsyncSearchResponse Get(Elastic.Clients. /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -362,7 +362,7 @@ public virtual Task> GetAsync(Elast /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(GetAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -372,7 +372,7 @@ public virtual Task> GetAsync(GetAs /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -384,7 +384,7 @@ public virtual Task> GetAsync(Elast /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit(SubmitAsyncSearchRequest request) { @@ -394,7 +394,7 @@ public virtual SubmitAsyncSearchResponse Submit(SubmitAsyn /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> SubmitAsync(SubmitAsyncSearchRequest request, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task> SubmitAsync /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit() { @@ -415,7 +415,7 @@ public virtual SubmitAsyncSearchResponse Submit() /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit(SubmitAsyncSearchRequestDescriptor descriptor) { @@ -425,7 +425,7 @@ public virtual SubmitAsyncSearchResponse Submit(SubmitAsyn /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit(Action> configureRequest) { @@ -437,7 +437,7 @@ public virtual SubmitAsyncSearchResponse Submit(Action /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task> SubmitAsync(CancellationToken cancellationToken = default) { @@ -448,7 +448,7 @@ public virtual Task> SubmitAsync /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> SubmitAsync(SubmitAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -458,7 +458,7 @@ public virtual Task> SubmitAsync /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> SubmitAsync(Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs index dd37bf3997c..5935ec66cb9 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs @@ -38,7 +38,7 @@ internal ClusterNamespacedClient(ElasticsearchClient client) : base(client) /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequest request) { @@ -48,7 +48,7 @@ public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequ /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AllocationExplainAsync(AllocationExplainRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task AllocationExplainAsync(Allocation /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain() { @@ -69,7 +69,7 @@ public virtual AllocationExplainResponse AllocationExplain() /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequ /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain(Action configureRequest) { @@ -91,7 +91,7 @@ public virtual AllocationExplainResponse AllocationExplain(Action /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task AllocationExplainAsync(CancellationToken cancellationToken = default) { @@ -102,7 +102,7 @@ public virtual Task AllocationExplainAsync(Cancellati /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AllocationExplainAsync(AllocationExplainRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -112,7 +112,7 @@ public virtual Task AllocationExplainAsync(Allocation /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AllocationExplainAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task AllocationExplainAsync(Action /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual ClusterStatsResponse Stats(ClusterStatsRequest request) { @@ -134,7 +134,7 @@ public virtual ClusterStatsResponse Stats(ClusterStatsRequest request) /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(ClusterStatsRequest request, CancellationToken cancellationToken = default) { @@ -144,7 +144,7 @@ public virtual Task StatsAsync(ClusterStatsRequest request /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClusterStatsResponse Stats() { @@ -155,7 +155,7 @@ public virtual ClusterStatsResponse Stats() /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClusterStatsResponse Stats(ClusterStatsRequestDescriptor descriptor) { @@ -165,7 +165,7 @@ public virtual ClusterStatsResponse Stats(ClusterStatsRequestDescriptor descript /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClusterStatsResponse Stats(Action configureRequest) { @@ -177,7 +177,7 @@ public virtual ClusterStatsResponse Stats(Action /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task StatsAsync(CancellationToken cancellat /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(ClusterStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -198,7 +198,7 @@ public virtual Task StatsAsync(ClusterStatsRequestDescript /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -210,7 +210,7 @@ public virtual Task StatsAsync(Action /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequest request) { @@ -220,7 +220,7 @@ public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequest /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetClusterSettingsRequest request, CancellationToken cancellationToken = default) { @@ -230,7 +230,7 @@ public virtual Task GetSettingsAsync(GetClusterSetti /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings() { @@ -241,7 +241,7 @@ public virtual GetClusterSettingsResponse GetSettings() /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequestDescriptor descriptor) { @@ -251,7 +251,7 @@ public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequestD /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings(Action configureRequest) { @@ -263,7 +263,7 @@ public virtual GetClusterSettingsResponse GetSettings(Action /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) { @@ -274,7 +274,7 @@ public virtual Task GetSettingsAsync(CancellationTok /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetClusterSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -284,7 +284,7 @@ public virtual Task GetSettingsAsync(GetClusterSetti /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -296,7 +296,7 @@ public virtual Task GetSettingsAsync(Action /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(HealthRequest request) { @@ -306,7 +306,7 @@ public virtual HealthResponse Health(HealthRequest request) /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(HealthRequest request, CancellationToken cancellationToken = default) { @@ -316,7 +316,7 @@ public virtual Task HealthAsync(HealthRequest request, Cancellat /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health() { @@ -327,7 +327,7 @@ public virtual HealthResponse Health() /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(HealthRequestDescriptor descriptor) { @@ -337,7 +337,7 @@ public virtual HealthResponse Health(HealthRequestDescriptor descriptor) /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(Action configureRequest) { @@ -349,7 +349,7 @@ public virtual HealthResponse Health(Action configureRe /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(HealthRequestDescriptor descriptor) { @@ -359,7 +359,7 @@ public virtual HealthResponse Health(HealthRequestDescriptor /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(Action> configureRequest) { @@ -371,7 +371,7 @@ public virtual HealthResponse Health(Action /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(CancellationToken cancellationToken = default) { @@ -382,7 +382,7 @@ public virtual Task HealthAsync(CancellationToken cancellationTo /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(HealthRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -392,7 +392,7 @@ public virtual Task HealthAsync(HealthRequestDescriptor descript /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task HealthAsync(Action /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(HealthRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -414,7 +414,7 @@ public virtual Task HealthAsync(HealthRequestDescript /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -426,7 +426,7 @@ public virtual Task HealthAsync(Action /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PendingTasksResponse PendingTasks(PendingTasksRequest request) { @@ -436,7 +436,7 @@ public virtual PendingTasksResponse PendingTasks(PendingTasksRequest request) /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task PendingTasksAsync(PendingTasksRequest request, CancellationToken cancellationToken = default) { @@ -446,7 +446,7 @@ public virtual Task PendingTasksAsync(PendingTasksRequest /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual PendingTasksResponse PendingTasks() { @@ -457,7 +457,7 @@ public virtual PendingTasksResponse PendingTasks() /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual PendingTasksResponse PendingTasks(PendingTasksRequestDescriptor descriptor) { @@ -467,7 +467,7 @@ public virtual PendingTasksResponse PendingTasks(PendingTasksRequestDescriptor d /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual PendingTasksResponse PendingTasks(Action configureRequest) { @@ -479,7 +479,7 @@ public virtual PendingTasksResponse PendingTasks(Action /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PendingTasksAsync(CancellationToken cancellationToken = default) { @@ -490,7 +490,7 @@ public virtual Task PendingTasksAsync(CancellationToken ca /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task PendingTasksAsync(PendingTasksRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -500,7 +500,7 @@ public virtual Task PendingTasksAsync(PendingTasksRequestD /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task PendingTasksAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs index d97269bc5c2..90684d0e24a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs @@ -210,7 +210,7 @@ public virtual Task StatsAsync(Action /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequest request) { @@ -220,7 +220,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequest request) /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(ExecutePolicyRequest request, CancellationToken cancellationToken = default) { @@ -230,7 +230,7 @@ public virtual Task ExecutePolicyAsync(ExecutePolicyReque /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch.Serverless.Name name) { @@ -241,7 +241,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequestDescriptor descriptor) { @@ -251,7 +251,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequestDescripto /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest) { @@ -263,7 +263,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) { @@ -274,7 +274,7 @@ public virtual Task ExecutePolicyAsync(Elastic.Clients.El /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(ExecutePolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -284,7 +284,7 @@ public virtual Task ExecutePolicyAsync(ExecutePolicyReque /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -382,7 +382,7 @@ public virtual Task GetPolicyAsync(Action /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(PutPolicyRequest request) { @@ -392,7 +392,7 @@ public virtual PutPolicyResponse PutPolicy(PutPolicyRequest request) /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(PutPolicyRequest request, CancellationToken cancellationToken = default) { @@ -402,7 +402,7 @@ public virtual Task PutPolicyAsync(PutPolicyRequest request, /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor descriptor) { @@ -412,7 +412,7 @@ public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor descriptor /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest) { @@ -424,7 +424,7 @@ public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsearch.Serverl /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor descriptor) { @@ -434,7 +434,7 @@ public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest) { @@ -446,7 +446,7 @@ public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsea /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -456,7 +456,7 @@ public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -468,7 +468,7 @@ public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsea /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -478,7 +478,7 @@ public virtual Task PutPolicyAsync(PutPolicyReques /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs index 2552adddc75..49bdd2f831a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs @@ -168,7 +168,7 @@ public virtual Task DeleteAsync(Elastic.Clients.El /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(EqlGetRequest request) { @@ -178,7 +178,7 @@ public virtual EqlGetResponse Get(EqlGetRequest request) /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(EqlGetRequest request, CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task> GetAsync(EqlGetRequest reque /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id id) { @@ -199,7 +199,7 @@ public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch. /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(EqlGetRequestDescriptor descriptor) { @@ -209,7 +209,7 @@ public virtual EqlGetResponse Get(EqlGetRequestDescriptor descri /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest) { @@ -221,7 +221,7 @@ public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch. /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -232,7 +232,7 @@ public virtual Task> GetAsync(Elastic.Clients.Ela /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(EqlGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -242,7 +242,7 @@ public virtual Task> GetAsync(EqlGetRequestDescri /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -340,7 +340,7 @@ public virtual Task> SearchAsync(Elastic.Clien /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequest request) { @@ -350,7 +350,7 @@ public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequest request) /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetEqlStatusRequest request, CancellationToken cancellationToken = default) { @@ -360,7 +360,7 @@ public virtual Task GetStatusAsync(GetEqlStatusRequest req /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Serverless.Id id) { @@ -371,7 +371,7 @@ public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Serv /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDescriptor descriptor) { @@ -381,7 +381,7 @@ public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDescriptor desc /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest) { @@ -393,7 +393,7 @@ public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Serv /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDescriptor descriptor) { @@ -403,7 +403,7 @@ public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDesc /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest) { @@ -415,7 +415,7 @@ public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elastic /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) { @@ -426,7 +426,7 @@ public virtual Task GetStatusAsync(Elastic.Clients.Elastic /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetEqlStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -436,7 +436,7 @@ public virtual Task GetStatusAsync(GetEqlStatusRequestDesc /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -448,7 +448,7 @@ public virtual Task GetStatusAsync(Elastic.Clients.Elastic /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetEqlStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -458,7 +458,7 @@ public virtual Task GetStatusAsync(GetEqlStatus /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs index 5c976248d16..8de15603ac4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs @@ -38,7 +38,7 @@ internal GraphNamespacedClient(ElasticsearchClient client) : base(client) /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(ExploreRequest request) { @@ -48,7 +48,7 @@ public virtual ExploreResponse Explore(ExploreRequest request) /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(ExploreRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task ExploreAsync(ExploreRequest request, Cancel /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Serverless.Indices indices) { @@ -69,7 +69,7 @@ public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Serverless. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(ExploreRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual ExploreResponse Explore(ExploreRequestDescriptor descriptor) /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest) { @@ -91,7 +91,7 @@ public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Serverless. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(ExploreRequestDescriptor descriptor) { @@ -101,7 +101,7 @@ public virtual ExploreResponse Explore(ExploreRequestDescriptor /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest) { @@ -113,7 +113,7 @@ public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(ExploreRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -134,7 +134,7 @@ public virtual Task ExploreAsync(ExploreRequestDescriptor descr /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -146,7 +146,7 @@ public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(ExploreRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -156,7 +156,7 @@ public virtual Task ExploreAsync(ExploreRequestDescr /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs index 0d667292f19..cba778b8d1c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs @@ -38,7 +38,7 @@ internal IndicesNamespacedClient(ElasticsearchClient client) : base(client) /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(CloseIndexRequest request) { @@ -48,7 +48,7 @@ public virtual CloseIndexResponse Close(CloseIndexRequest request) /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(CloseIndexRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task CloseAsync(CloseIndexRequest request, Ca /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Serverless.Indices indices) { @@ -69,7 +69,7 @@ public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Serverless /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor descriptor) /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest) { @@ -91,7 +91,7 @@ public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Serverless /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor descriptor) { @@ -101,7 +101,7 @@ public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest) { @@ -113,7 +113,7 @@ public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task CloseAsync(Elastic.Clients.Elasticsearch /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(CloseIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -134,7 +134,7 @@ public virtual Task CloseAsync(CloseIndexRequestDescriptor d /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -146,7 +146,7 @@ public virtual Task CloseAsync(Elastic.Clients.Elasticsearch /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(CloseIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -156,7 +156,7 @@ public virtual Task CloseAsync(CloseIndexRequestD /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -254,7 +254,7 @@ public virtual Task CreateDataStreamAsync(Elastic.Clie /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(CreateIndexRequest request) { @@ -264,7 +264,7 @@ public virtual CreateIndexResponse Create(CreateIndexRequest request) /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateIndexRequest request, CancellationToken cancellationToken = default) { @@ -274,7 +274,7 @@ public virtual Task CreateAsync(CreateIndexRequest request, /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.Serverless.IndexName index) { @@ -285,7 +285,7 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.Serverle /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descriptor) { @@ -295,7 +295,7 @@ public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descripto /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action configureRequest) { @@ -307,7 +307,7 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.Serverle /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create() { @@ -318,7 +318,7 @@ public virtual CreateIndexResponse Create() /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Action> configureRequest) { @@ -330,7 +330,7 @@ public virtual CreateIndexResponse Create(Action /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descriptor) { @@ -340,7 +340,7 @@ public virtual CreateIndexResponse Create(CreateIndexRequestDescripto /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest) { @@ -352,7 +352,7 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsear /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) { @@ -363,7 +363,7 @@ public virtual Task CreateAsync(Elastic.Clients.Elasticsear /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -373,7 +373,7 @@ public virtual Task CreateAsync(CreateIndexRequestDescripto /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action configureRequest, CancellationToken cancellationToken = default) { @@ -385,7 +385,7 @@ public virtual Task CreateAsync(Elastic.Clients.Elasticsear /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CancellationToken cancellationToken = default) { @@ -396,7 +396,7 @@ public virtual Task CreateAsync(CancellationToke /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -408,7 +408,7 @@ public virtual Task CreateAsync(Action /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -418,7 +418,7 @@ public virtual Task CreateAsync(CreateIndexReque /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -862,7 +862,7 @@ public virtual Task DeleteAsync(Elastic.Clients. /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTemplateRequest request) { @@ -872,7 +872,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTempla /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -882,7 +882,7 @@ public virtual Task DeleteIndexTemplateAsync(Delete /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Names name) { @@ -893,7 +893,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.E /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTemplateRequestDescriptor descriptor) { @@ -903,7 +903,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTempla /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest) { @@ -915,7 +915,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.E /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) { @@ -926,7 +926,7 @@ public virtual Task DeleteIndexTemplateAsync(Elasti /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -936,7 +936,7 @@ public virtual Task DeleteIndexTemplateAsync(Delete /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1078,7 +1078,7 @@ public virtual Task ExistsAliasAsync(Elastic.Cli /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTemplateRequest request) { @@ -1088,7 +1088,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTempla /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(ExistsIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -1098,7 +1098,7 @@ public virtual Task ExistsIndexTemplateAsync(Exists /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name) { @@ -1109,7 +1109,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.E /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTemplateRequestDescriptor descriptor) { @@ -1119,7 +1119,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTempla /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest) { @@ -1131,7 +1131,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.E /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) { @@ -1142,7 +1142,7 @@ public virtual Task ExistsIndexTemplateAsync(Elasti /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(ExistsIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1152,7 +1152,7 @@ public virtual Task ExistsIndexTemplateAsync(Exists /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1424,7 +1424,7 @@ public virtual Task ExplainDataLifecycleAsync /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(FlushRequest request) { @@ -1434,7 +1434,7 @@ public virtual FlushResponse Flush(FlushRequest request) /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(FlushRequest request, CancellationToken cancellationToken = default) { @@ -1444,7 +1444,7 @@ public virtual Task FlushAsync(FlushRequest request, Cancellation /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush() { @@ -1455,7 +1455,7 @@ public virtual FlushResponse Flush() /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(FlushRequestDescriptor descriptor) { @@ -1465,7 +1465,7 @@ public virtual FlushResponse Flush(FlushRequestDescriptor descriptor) /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(Action configureRequest) { @@ -1477,7 +1477,7 @@ public virtual FlushResponse Flush(Action configureReque /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(FlushRequestDescriptor descriptor) { @@ -1487,7 +1487,7 @@ public virtual FlushResponse Flush(FlushRequestDescriptor /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(Action> configureRequest) { @@ -1499,7 +1499,7 @@ public virtual FlushResponse Flush(Action /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(CancellationToken cancellationToken = default) { @@ -1510,7 +1510,7 @@ public virtual Task FlushAsync(CancellationToken cancellationToke /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(FlushRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1520,7 +1520,7 @@ public virtual Task FlushAsync(FlushRequestDescriptor descriptor, /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -1532,7 +1532,7 @@ public virtual Task FlushAsync(Action con /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(FlushRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1542,7 +1542,7 @@ public virtual Task FlushAsync(FlushRequestDescriptor< /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2116,7 +2116,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasti /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest request) { @@ -2126,7 +2126,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -2136,7 +2136,7 @@ public virtual Task GetIndexTemplateAsync(GetIndexTemp /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate() { @@ -2147,7 +2147,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate() /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequestDescriptor descriptor) { @@ -2157,7 +2157,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate(Action configureRequest) { @@ -2169,7 +2169,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(Action /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(CancellationToken cancellationToken = default) { @@ -2180,7 +2180,7 @@ public virtual Task GetIndexTemplateAsync(Cancellation /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2190,7 +2190,7 @@ public virtual Task GetIndexTemplateAsync(GetIndexTemp /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -2894,7 +2894,7 @@ public virtual Task PutDataLifecycleAsync(Elastic.Clie /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest request) { @@ -2904,7 +2904,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -2914,7 +2914,7 @@ public virtual Task PutIndexTemplateAsync(PutIndexTemp /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequestDescriptor descriptor) { @@ -2924,7 +2924,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest) { @@ -2936,7 +2936,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elastic /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequestDescriptor descriptor) { @@ -2946,7 +2946,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemp /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest) { @@ -2958,7 +2958,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clie /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2968,7 +2968,7 @@ public virtual Task PutIndexTemplateAsync(PutIndexTemp /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2980,7 +2980,7 @@ public virtual Task PutIndexTemplateAsync(Elastic.Clie /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2990,7 +2990,7 @@ public virtual Task PutIndexTemplateAsync(P /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3110,7 +3110,7 @@ public virtual Task PutMappingAsync(Elastic.Clien /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutTemplateResponse PutTemplate(PutTemplateRequest request) { @@ -3120,7 +3120,7 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequest request) /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3130,7 +3130,7 @@ public virtual Task PutTemplateAsync(PutTemplateRequest req /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor descriptor) { @@ -3140,7 +3140,7 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor desc /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest) { @@ -3152,7 +3152,7 @@ public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Ser /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3162,7 +3162,7 @@ public virtual Task PutTemplateAsync(PutTemplateRequestDesc /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3304,7 +3304,7 @@ public virtual Task RefreshAsync(Action /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual RolloverResponse Rollover(RolloverRequest request) { @@ -3314,7 +3314,7 @@ public virtual RolloverResponse Rollover(RolloverRequest request) /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(RolloverRequest request, CancellationToken cancellationToken = default) { @@ -3324,7 +3324,7 @@ public virtual Task RolloverAsync(RolloverRequest request, Can /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias) { @@ -3335,7 +3335,7 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.Serverles /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) { @@ -3345,7 +3345,7 @@ public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Action configureRequest) { @@ -3357,7 +3357,7 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.Serverles /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, CancellationToken cancellationToken = default) { @@ -3368,7 +3368,7 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(RolloverRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3378,7 +3378,7 @@ public virtual Task RolloverAsync(RolloverRequestDescriptor de /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3390,7 +3390,7 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequest request) { @@ -3400,7 +3400,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndex /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3410,7 +3410,7 @@ public virtual Task SimulateIndexTemplateAsync(Si /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name) { @@ -3421,7 +3421,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequestDescriptor descriptor) { @@ -3431,7 +3431,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndex /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest) { @@ -3443,7 +3443,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequestDescriptor descriptor) { @@ -3453,7 +3453,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Si /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest) { @@ -3465,7 +3465,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(El /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) { @@ -3476,7 +3476,7 @@ public virtual Task SimulateIndexTemplateAsync(El /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3486,7 +3486,7 @@ public virtual Task SimulateIndexTemplateAsync(Si /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3498,7 +3498,7 @@ public virtual Task SimulateIndexTemplateAsync(El /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3508,7 +3508,7 @@ public virtual Task SimulateIndexTemplateAsync /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3520,7 +3520,7 @@ public virtual Task SimulateIndexTemplateAsync /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest request) { @@ -3530,7 +3530,7 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3540,7 +3540,7 @@ public virtual Task SimulateTemplateAsync(SimulateTemp /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate() { @@ -3551,7 +3551,7 @@ public virtual SimulateTemplateResponse SimulateTemplate() /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequestDescriptor descriptor) { @@ -3561,7 +3561,7 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate(Action configureRequest) { @@ -3573,7 +3573,7 @@ public virtual SimulateTemplateResponse SimulateTemplate(Action /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(CancellationToken cancellationToken = default) { @@ -3584,7 +3584,7 @@ public virtual Task SimulateTemplateAsync(Cancellation /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3594,7 +3594,7 @@ public virtual Task SimulateTemplateAsync(SimulateTemp /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { 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 c1660435947..07bb2570eb9 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 @@ -168,7 +168,7 @@ public virtual Task DeletePipelineAsync(Elast /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequest request) { @@ -178,7 +178,7 @@ public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequest request) /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(GeoIpStatsRequest request, CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task GeoIpStatsAsync(GeoIpStatsRequest reques /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats() { @@ -199,7 +199,7 @@ public virtual GeoIpStatsResponse GeoIpStats() /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequestDescriptor descriptor) { @@ -209,7 +209,7 @@ public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequestDescriptor descrip /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats(Action configureRequest) { @@ -221,7 +221,7 @@ public virtual GeoIpStatsResponse GeoIpStats(Action /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(CancellationToken cancellationToken = default) { @@ -232,7 +232,7 @@ public virtual Task GeoIpStatsAsync(CancellationToken cancel /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(GeoIpStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -242,7 +242,7 @@ public virtual Task GeoIpStatsAsync(GeoIpStatsRequestDescrip /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -384,7 +384,7 @@ public virtual Task GetPipelineAsync(Action /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequest request) { @@ -394,7 +394,7 @@ public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequest request) /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(ProcessorGrokRequest request, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task ProcessorGrokAsync(ProcessorGrokReque /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok() { @@ -415,7 +415,7 @@ public virtual ProcessorGrokResponse ProcessorGrok() /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequestDescriptor descriptor) { @@ -425,7 +425,7 @@ public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequestDescripto /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok(Action configureRequest) { @@ -437,7 +437,7 @@ public virtual ProcessorGrokResponse ProcessorGrok(Action /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(CancellationToken cancellationToken = default) { @@ -448,7 +448,7 @@ public virtual Task ProcessorGrokAsync(CancellationToken /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(ProcessorGrokRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -458,7 +458,7 @@ public virtual Task ProcessorGrokAsync(ProcessorGrokReque /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -470,7 +470,7 @@ public virtual Task ProcessorGrokAsync(Action /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(PutPipelineRequest request) { @@ -480,7 +480,7 @@ public virtual PutPipelineResponse PutPipeline(PutPipelineRequest request) /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(PutPipelineRequest request, CancellationToken cancellationToken = default) { @@ -490,7 +490,7 @@ public virtual Task PutPipelineAsync(PutPipelineRequest req /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDescriptor descriptor) { @@ -500,7 +500,7 @@ public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDescriptor desc /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest) { @@ -512,7 +512,7 @@ public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasticsearch.Ser /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDescriptor descriptor) { @@ -522,7 +522,7 @@ public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDesc /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest) { @@ -534,7 +534,7 @@ public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasti /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(PutPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -544,7 +544,7 @@ public virtual Task PutPipelineAsync(PutPipelineRequestDesc /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -556,7 +556,7 @@ public virtual Task PutPipelineAsync(Elastic.Clients.Elasti /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(PutPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -566,7 +566,7 @@ public virtual Task PutPipelineAsync(PutPipeline /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Tasks.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Tasks.g.cs index 06b160e4802..699ee96be09 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Tasks.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Tasks.g.cs @@ -39,7 +39,7 @@ internal TasksNamespacedClient(ElasticsearchClient client) : base(client) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel(CancelRequest request) { @@ -50,7 +50,7 @@ public virtual CancelResponse Cancel(CancelRequest request) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(CancelRequest request, CancellationToken cancellationToken = default) { @@ -61,7 +61,7 @@ public virtual Task CancelAsync(CancelRequest request, Cancellat /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel() { @@ -73,7 +73,7 @@ public virtual CancelResponse Cancel() /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel(CancelRequestDescriptor descriptor) { @@ -84,7 +84,7 @@ public virtual CancelResponse Cancel(CancelRequestDescriptor descriptor) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel(Action configureRequest) { @@ -97,7 +97,7 @@ public virtual CancelResponse Cancel(Action configureRe /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(CancellationToken cancellationToken = default) { @@ -109,7 +109,7 @@ public virtual Task CancelAsync(CancellationToken cancellationTo /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(CancelRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -120,7 +120,7 @@ public virtual Task CancelAsync(CancelRequestDescriptor descript /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -133,7 +133,7 @@ public virtual Task CancelAsync(Action /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(GetTasksRequest request) { @@ -144,7 +144,7 @@ public virtual GetTasksResponse Get(GetTasksRequest request) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetTasksRequest request, CancellationToken cancellationToken = default) { @@ -155,7 +155,7 @@ public virtual Task GetAsync(GetTasksRequest request, Cancella /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id task_id) { @@ -167,7 +167,7 @@ public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(GetTasksRequestDescriptor descriptor) { @@ -178,7 +178,7 @@ public virtual GetTasksResponse Get(GetTasksRequestDescriptor descriptor) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id task_id, Action configureRequest) { @@ -191,7 +191,7 @@ public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Serverless.Id /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id task_id, CancellationToken cancellationToken = default) { @@ -203,7 +203,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Ser /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetTasksRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -214,7 +214,7 @@ public virtual Task GetAsync(GetTasksRequestDescriptor descrip /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id task_id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -227,7 +227,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Ser /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List(ListRequest request) { @@ -238,7 +238,7 @@ public virtual ListResponse List(ListRequest request) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(ListRequest request, CancellationToken cancellationToken = default) { @@ -249,7 +249,7 @@ public virtual Task ListAsync(ListRequest request, CancellationTok /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List() { @@ -261,7 +261,7 @@ public virtual ListResponse List() /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List(ListRequestDescriptor descriptor) { @@ -272,7 +272,7 @@ public virtual ListResponse List(ListRequestDescriptor descriptor) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List(Action configureRequest) { @@ -285,7 +285,7 @@ public virtual ListResponse List(Action configureRequest) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(CancellationToken cancellationToken = default) { @@ -297,7 +297,7 @@ public virtual Task ListAsync(CancellationToken cancellationToken /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(ListRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -308,7 +308,7 @@ public virtual Task ListAsync(ListRequestDescriptor descriptor, Ca /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs index 28cbbafb7f7..e313578afc7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs @@ -51,7 +51,7 @@ private partial void SetupNamespaces() /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(BulkRequest request) { @@ -61,7 +61,7 @@ public virtual BulkResponse Bulk(BulkRequest request) /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequest request, CancellationToken cancellationToken = default) { @@ -71,7 +71,7 @@ public virtual Task BulkAsync(BulkRequest request, CancellationTok /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) { @@ -81,7 +81,7 @@ public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(Action configureRequest) { @@ -93,7 +93,7 @@ public virtual BulkResponse Bulk(Action configureRequest) /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) { @@ -103,7 +103,7 @@ public virtual BulkResponse Bulk(BulkRequestDescriptor des /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(Action> configureRequest) { @@ -115,7 +115,7 @@ public virtual BulkResponse Bulk(Action /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -125,7 +125,7 @@ public virtual Task BulkAsync(BulkRequestDescriptor descriptor, Ca /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -137,7 +137,7 @@ public virtual Task BulkAsync(Action config /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -147,7 +147,7 @@ public virtual Task BulkAsync(BulkRequestDescriptor /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -159,7 +159,7 @@ public virtual Task BulkAsync(Action /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request) { @@ -169,7 +169,7 @@ public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request) /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(ClearScrollRequest request, CancellationToken cancellationToken = default) { @@ -179,7 +179,7 @@ public virtual Task ClearScrollAsync(ClearScrollRequest req /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll() { @@ -190,7 +190,7 @@ public virtual ClearScrollResponse ClearScroll() /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll(ClearScrollRequestDescriptor descriptor) { @@ -200,7 +200,7 @@ public virtual ClearScrollResponse ClearScroll(ClearScrollRequestDescriptor desc /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll(Action configureRequest) { @@ -212,7 +212,7 @@ public virtual ClearScrollResponse ClearScroll(Action /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(CancellationToken cancellationToken = default) { @@ -223,7 +223,7 @@ public virtual Task ClearScrollAsync(CancellationToken canc /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(ClearScrollRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -233,7 +233,7 @@ public virtual Task ClearScrollAsync(ClearScrollRequestDesc /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -245,7 +245,7 @@ public virtual Task ClearScrollAsync(Action /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest request) { @@ -255,7 +255,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequest request, CancellationToken cancellationToken = default) { @@ -265,7 +265,7 @@ public virtual Task ClosePointInTimeAsync(ClosePointIn /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime() { @@ -276,7 +276,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime() /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequestDescriptor descriptor) { @@ -286,7 +286,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime(Action configureRequest) { @@ -298,7 +298,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(Action /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(CancellationToken cancellationToken = default) { @@ -309,7 +309,7 @@ public virtual Task ClosePointInTimeAsync(Cancellation /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -319,7 +319,7 @@ public virtual Task ClosePointInTimeAsync(ClosePointIn /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -2627,7 +2627,7 @@ public virtual Task MultiTermVectorsAsync(A /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest request) { @@ -2637,7 +2637,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest re /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequest request, CancellationToken cancellationToken = default) { @@ -2647,7 +2647,7 @@ public virtual Task OpenPointInTimeAsync(OpenPointInTim /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Serverless.Indices indices) { @@ -2658,7 +2658,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticse /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) { @@ -2668,7 +2668,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDes /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest) { @@ -2680,7 +2680,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticse /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) { @@ -2690,7 +2690,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTim /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest) { @@ -2702,7 +2702,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Client /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) { @@ -2713,7 +2713,7 @@ public virtual Task OpenPointInTimeAsync(Elastic.Client /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2723,7 +2723,7 @@ public virtual Task OpenPointInTimeAsync(OpenPointInTim /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2735,7 +2735,7 @@ public virtual Task OpenPointInTimeAsync(Elastic.Client /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2745,7 +2745,7 @@ public virtual Task OpenPointInTimeAsync(Ope /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs index fe17da10f7a..f61607999c7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs @@ -147,11 +147,6 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("geo_distance", ref reader, options); } - if (propertyName == "geo_line") - { - return AggregationSerializationHelper.ReadContainer("geo_line", ref reader, options); - } - if (propertyName == "geohash_grid") { return AggregationSerializationHelper.ReadContainer("geohash_grid", ref reader, options); @@ -162,6 +157,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("geohex_grid", ref reader, options); } + if (propertyName == "geo_line") + { + return AggregationSerializationHelper.ReadContainer("geo_line", ref reader, options); + } + if (propertyName == "geotile_grid") { return AggregationSerializationHelper.ReadContainer("geotile_grid", ref reader, options); @@ -302,11 +302,6 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("sum", ref reader, options); } - if (propertyName == "t_test") - { - return AggregationSerializationHelper.ReadContainer("t_test", ref reader, options); - } - if (propertyName == "terms") { return AggregationSerializationHelper.ReadContainer("terms", ref reader, options); @@ -322,6 +317,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("top_metrics", ref reader, options); } + if (propertyName == "t_test") + { + return AggregationSerializationHelper.ReadContainer("t_test", ref reader, options); + } + if (propertyName == "value_count") { return AggregationSerializationHelper.ReadContainer("value_count", ref reader, options); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs index eb8d28bf489..5153c2e5a04 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs @@ -192,14 +192,47 @@ public BucketSortAggregationDescriptor() : base() { } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + + /// + /// Buckets in positions prior to `from` will be truncated. + /// + public BucketSortAggregationDescriptor From(int? from) + { + FromValue = from; + return Self; + } + + /// + /// The policy to apply when gaps are found in the data. + /// + public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + + public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
+ ///
+ public BucketSortAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } /// /// The list of fields to sort on. @@ -240,44 +273,29 @@ public BucketSortAggregationDescriptor Sort(params Action - /// Buckets in positions prior to `from` will be truncated. - /// - public BucketSortAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// The policy to apply when gaps are found in the data. - /// - public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
- ///
- public BucketSortAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("bucket_sort"); writer.WriteStartObject(); + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + + if (GapPolicyValue is not null) + { + writer.WritePropertyName("gap_policy"); + JsonSerializer.Serialize(writer, GapPolicyValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -307,24 +325,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { @@ -344,14 +344,47 @@ public BucketSortAggregationDescriptor() : base() { } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + + /// + /// Buckets in positions prior to `from` will be truncated. + /// + public BucketSortAggregationDescriptor From(int? from) + { + FromValue = from; + return Self; + } + + /// + /// The policy to apply when gaps are found in the data. + /// + public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + + public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
+ ///
+ public BucketSortAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } /// /// The list of fields to sort on. @@ -392,44 +425,29 @@ public BucketSortAggregationDescriptor Sort(params Action return Self; } - /// - /// Buckets in positions prior to `from` will be truncated. - /// - public BucketSortAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// The policy to apply when gaps are found in the data. - /// - public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
- ///
- public BucketSortAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("bucket_sort"); writer.WriteStartObject(); + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + + if (GapPolicyValue is not null) + { + writer.WritePropertyName("gap_policy"); + JsonSerializer.Serialize(writer, GapPolicyValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -459,24 +477,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs index e9c94abf8c8..ea52bd26d29 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -187,14 +187,23 @@ public CompositeAggregationDescriptor() : base() { } + private IDictionary? AfterValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action> AggregationsDescriptorAction { get; set; } - private IDictionary? AfterValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } + /// + /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. + /// + public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) + { + AfterValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + public CompositeAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? aggregations) { AggregationsDescriptor = null; @@ -219,15 +228,6 @@ public CompositeAggregationDescriptor Aggregations(Action - /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. - ///
- public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - AfterValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public CompositeAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -310,14 +310,23 @@ public CompositeAggregationDescriptor() : base() { } + private IDictionary? AfterValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action AggregationsDescriptorAction { get; set; } - private IDictionary? AfterValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } + /// + /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. + /// + public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) + { + AfterValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + public CompositeAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? aggregations) { AggregationsDescriptor = null; @@ -342,15 +351,6 @@ public CompositeAggregationDescriptor Aggregations(Action - /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. - /// - public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - AfterValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public CompositeAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs index f1f7b46f592..0f932532f55 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs @@ -199,17 +199,32 @@ public GeoLineAggregationDescriptor() : base() { } + private bool? IncludeSortValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint PointValue { get; set; } private GeoLinePointDescriptor PointDescriptor { get; set; } private Action> PointDescriptorAction { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort SortValue { get; set; } private GeoLineSortDescriptor SortDescriptor { get; set; } private Action> SortDescriptorAction { get; set; } - private bool? IncludeSortValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? SortOrderValue { get; set; } + /// + /// When `true`, returns an additional array of the sort values in the feature properties. + /// + public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) + { + IncludeSortValue = includeSort; + return Self; + } + + public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// The name of the geo_point field. /// @@ -237,6 +252,15 @@ public GeoLineAggregationDescriptor Point(Action + /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
+ /// + public GeoLineAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The name of the numeric field to use as the sort key for ordering the points.
When the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error.
///
@@ -264,30 +288,6 @@ public GeoLineAggregationDescriptor Sort(Action - /// When `true`, returns an additional array of the sort values in the feature properties. - /// - public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) - { - IncludeSortValue = includeSort; - return Self; - } - - public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
- ///
- public GeoLineAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// The order in which the line is sorted (ascending or descending). /// @@ -302,6 +302,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("geo_line"); writer.WriteStartObject(); + if (IncludeSortValue.HasValue) + { + writer.WritePropertyName("include_sort"); + writer.WriteBooleanValue(IncludeSortValue.Value); + } + if (PointDescriptor is not null) { writer.WritePropertyName("point"); @@ -318,6 +324,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PointValue, options); } + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -334,18 +346,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SortValue, options); } - if (IncludeSortValue.HasValue) - { - writer.WritePropertyName("include_sort"); - writer.WriteBooleanValue(IncludeSortValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (SortOrderValue is not null) { writer.WritePropertyName("sort_order"); @@ -371,17 +371,32 @@ public GeoLineAggregationDescriptor() : base() { } + private bool? IncludeSortValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint PointValue { get; set; } private GeoLinePointDescriptor PointDescriptor { get; set; } private Action PointDescriptorAction { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort SortValue { get; set; } private GeoLineSortDescriptor SortDescriptor { get; set; } private Action SortDescriptorAction { get; set; } - private bool? IncludeSortValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? SortOrderValue { get; set; } + /// + /// When `true`, returns an additional array of the sort values in the feature properties. + /// + public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) + { + IncludeSortValue = includeSort; + return Self; + } + + public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// The name of the geo_point field. /// @@ -409,6 +424,15 @@ public GeoLineAggregationDescriptor Point(Action configu return Self; } + /// + /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
+ ///
+ public GeoLineAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The name of the numeric field to use as the sort key for ordering the points.
When the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error.
///
@@ -436,30 +460,6 @@ public GeoLineAggregationDescriptor Sort(Action configure return Self; } - /// - /// When `true`, returns an additional array of the sort values in the feature properties. - /// - public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) - { - IncludeSortValue = includeSort; - return Self; - } - - public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
- ///
- public GeoLineAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// The order in which the line is sorted (ascending or descending). /// @@ -474,6 +474,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("geo_line"); writer.WriteStartObject(); + if (IncludeSortValue.HasValue) + { + writer.WritePropertyName("include_sort"); + writer.WriteBooleanValue(IncludeSortValue.Value); + } + if (PointDescriptor is not null) { writer.WritePropertyName("point"); @@ -490,6 +496,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PointValue, options); } + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -506,18 +518,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SortValue, options); } - if (IncludeSortValue.HasValue) - { - writer.WritePropertyName("include_sort"); - writer.WriteBooleanValue(IncludeSortValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (SortOrderValue is not null) { writer.WritePropertyName("sort_order"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs index 50af73b7fb8..b35207933f3 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -196,15 +196,33 @@ public InferenceAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } - private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action> InferenceConfigDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } + private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } + private Action> InferenceConfigDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name ModelIdValue { get; set; } + public InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) + { + BucketsPathValue = bucketsPath; + return Self; + } + + public InferenceAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -232,24 +250,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - public InferenceAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - public InferenceAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -270,22 +270,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("inference"); writer.WriteStartObject(); - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - if (BucketsPathValue is not null) { writer.WritePropertyName("buckets_path"); @@ -304,6 +288,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } + if (InferenceConfigDescriptor is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); + } + else if (InferenceConfigDescriptorAction is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); + } + else if (InferenceConfigValue is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigValue, options); + } + writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); writer.WriteEndObject(); @@ -325,15 +325,33 @@ public InferenceAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } - private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } + private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } + private Action InferenceConfigDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name ModelIdValue { get; set; } + public InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) + { + BucketsPathValue = bucketsPath; + return Self; + } + + public InferenceAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -361,24 +379,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -399,22 +399,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("inference"); writer.WriteStartObject(); - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - if (BucketsPathValue is not null) { writer.WritePropertyName("buckets_path"); @@ -433,6 +417,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } + if (InferenceConfigDescriptor is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); + } + else if (InferenceConfigDescriptorAction is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); + } + else if (InferenceConfigValue is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigValue, options); + } + writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs index 08e1e4ee1bf..5b90b0b1290 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -298,10 +298,6 @@ public MultiTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action> AggregationsDescriptorAction { get; set; } - private ICollection TermsValue { get; set; } - private MultiTermLookupDescriptor TermsDescriptor { get; set; } - private Action> TermsDescriptorAction { get; set; } - private Action>[] TermsDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } @@ -310,6 +306,10 @@ public MultiTermsAggregationDescriptor() : base() private int? ShardSizeValue { get; set; } private bool? ShowTermDocCountErrorValue { get; set; } private int? SizeValue { get; set; } + private ICollection TermsValue { get; set; } + private MultiTermLookupDescriptor TermsDescriptor { get; set; } + private Action> TermsDescriptorAction { get; set; } + private Action>[] TermsDescriptorActions { get; set; } public MultiTermsAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? aggregations) { @@ -335,45 +335,6 @@ public MultiTermsAggregationDescriptor Aggregations(Action - /// The field from which to generate sets of terms. - /// - public MultiTermsAggregationDescriptor Terms(ICollection terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsValue = terms; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsDescriptor = descriptor; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Action> configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorActions = null; - TermsDescriptorAction = configure; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(params Action>[] configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = configure; - return Self; - } - /// /// Specifies the strategy for data collection. /// @@ -443,42 +404,50 @@ public MultiTermsAggregationDescriptor Size(int? size) return Self; } + /// + /// The field from which to generate sets of terms. + /// + public MultiTermsAggregationDescriptor Terms(ICollection terms) + { + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsValue = terms; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) + { + TermsValue = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsDescriptor = descriptor; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(Action> configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorActions = null; + TermsDescriptorAction = configure; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(params Action>[] configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("multi_terms"); writer.WriteStartObject(); - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - writer.WriteEndArray(); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TermsDescriptorActions is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - foreach (var action in TermsDescriptorActions) - { - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - if (CollectModeValue is not null) { writer.WritePropertyName("collect_mode"); @@ -521,6 +490,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (TermsDescriptor is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, TermsDescriptor, options); + writer.WriteEndArray(); + } + else if (TermsDescriptorAction is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); + writer.WriteEndArray(); + } + else if (TermsDescriptorActions is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + foreach (var action in TermsDescriptorActions) + { + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else + { + writer.WritePropertyName("terms"); + JsonSerializer.Serialize(writer, TermsValue, options); + } + writer.WriteEndObject(); if (MetaValue is not null) { @@ -559,10 +559,6 @@ public MultiTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action AggregationsDescriptorAction { get; set; } - private ICollection TermsValue { get; set; } - private MultiTermLookupDescriptor TermsDescriptor { get; set; } - private Action TermsDescriptorAction { get; set; } - private Action[] TermsDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } @@ -571,6 +567,10 @@ public MultiTermsAggregationDescriptor() : base() private int? ShardSizeValue { get; set; } private bool? ShowTermDocCountErrorValue { get; set; } private int? SizeValue { get; set; } + private ICollection TermsValue { get; set; } + private MultiTermLookupDescriptor TermsDescriptor { get; set; } + private Action TermsDescriptorAction { get; set; } + private Action[] TermsDescriptorActions { get; set; } public MultiTermsAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? aggregations) { @@ -596,45 +596,6 @@ public MultiTermsAggregationDescriptor Aggregations(Action - /// The field from which to generate sets of terms. - /// - public MultiTermsAggregationDescriptor Terms(ICollection terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsValue = terms; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsDescriptor = descriptor; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Action configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorActions = null; - TermsDescriptorAction = configure; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(params Action[] configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = configure; - return Self; - } - /// /// Specifies the strategy for data collection. /// @@ -704,42 +665,50 @@ public MultiTermsAggregationDescriptor Size(int? size) return Self; } + /// + /// The field from which to generate sets of terms. + /// + public MultiTermsAggregationDescriptor Terms(ICollection terms) + { + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsValue = terms; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) + { + TermsValue = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsDescriptor = descriptor; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(Action configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorActions = null; + TermsDescriptorAction = configure; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(params Action[] configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("multi_terms"); writer.WriteStartObject(); - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - writer.WriteEndArray(); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TermsDescriptorActions is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - foreach (var action in TermsDescriptorActions) - { - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - if (CollectModeValue is not null) { writer.WritePropertyName("collect_mode"); @@ -782,6 +751,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (TermsDescriptor is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, TermsDescriptor, options); + writer.WriteEndArray(); + } + else if (TermsDescriptorAction is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); + writer.WriteEndArray(); + } + else if (TermsDescriptorActions is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + foreach (var action in TermsDescriptorActions) + { + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else + { + writer.WritePropertyName("terms"); + JsonSerializer.Serialize(writer, TermsValue, options); + } + writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs index f4108bb18cc..1cc918902fa 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs @@ -52,12 +52,30 @@ public TestPopulationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } + /// + /// The field to aggregate. + /// + public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to aggregate. + /// + public TestPopulationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// A filter used to define a set of records to run unpaired t-test on. /// @@ -85,24 +103,6 @@ public TestPopulationDescriptor Filter(Action - /// The field to aggregate. - /// - public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to aggregate. - /// - public TestPopulationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) { ScriptValue = script; @@ -112,6 +112,8 @@ public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -128,8 +130,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (ScriptValue is not null) { writer.WritePropertyName("script"); @@ -148,43 +148,25 @@ public TestPopulationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } /// - /// A filter used to define a set of records to run unpaired t-test on. + /// The field to aggregate. /// - public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TestPopulationDescriptor Filter(QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TestPopulationDescriptor Filter(Action configure) + public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; + FieldValue = field; return Self; } /// /// The field to aggregate. /// - public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + public TestPopulationDescriptor Field(Expression> field) { FieldValue = field; return Self; @@ -193,18 +175,36 @@ public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.F /// /// The field to aggregate. /// - public TestPopulationDescriptor Field(Expression> field) + public TestPopulationDescriptor Field(Expression> field) { FieldValue = field; return Self; } /// - /// The field to aggregate. + /// A filter used to define a set of records to run unpaired t-test on. /// - public TestPopulationDescriptor Field(Expression> field) + public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) { - FieldValue = field; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public TestPopulationDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public TestPopulationDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; return Self; } @@ -217,6 +217,8 @@ public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -233,8 +235,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs index cac4c975dd0..730204e84fb 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs @@ -434,139 +434,91 @@ public TopHitsAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? DocvalueFieldsValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } + private Action> HighlightDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. + /// Fields for which to return doc values. /// - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Action> configure) + public TopHitsAggregationDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.Fields? docvalueFields) { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; + DocvalueFieldsValue = docvalueFields; return Self; } /// - /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
+ /// If `true`, returns detailed information about score computation as part of a hit. ///
- public TopHitsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Action> configure) + public TopHitsAggregationDescriptor Explain(bool? explain = true) { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; + ExplainValue = explain; return Self; } - public TopHitsAggregationDescriptor Sort(params Action>[] configure) + public TopHitsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; + FieldValue = field; return Self; } - /// - /// Selects the fields of the source that are returned. - /// - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + public TopHitsAggregationDescriptor Field(Expression> field) { - SourceValue = source; + FieldValue = field; return Self; } /// - /// Fields for which to return doc values. + /// Starting document offset. /// - public TopHitsAggregationDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.Fields? docvalueFields) + public TopHitsAggregationDescriptor From(int? from) { - DocvalueFieldsValue = docvalueFields; + FromValue = from; return Self; } /// - /// If `true`, returns detailed information about score computation as part of a hit. + /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. /// - public TopHitsAggregationDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public TopHitsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) + public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { - FieldValue = field; + HighlightDescriptor = null; + HighlightDescriptorAction = null; + HighlightValue = highlight; return Self; } - public TopHitsAggregationDescriptor Field(Expression> field) + public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { - FieldValue = field; + HighlightValue = null; + HighlightDescriptorAction = null; + HighlightDescriptor = descriptor; return Self; } - /// - /// Starting document offset. - /// - public TopHitsAggregationDescriptor From(int? from) + public TopHitsAggregationDescriptor Highlight(Action> configure) { - FromValue = from; + HighlightValue = null; + HighlightDescriptor = null; + HighlightDescriptorAction = configure; return Self; } @@ -615,6 +567,54 @@ public TopHitsAggregationDescriptor Size(int? size) return Self; } + /// + /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
+ ///
+ public TopHitsAggregationDescriptor Sort(ICollection? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; + return Self; + } + + public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; + return Self; + } + + public TopHitsAggregationDescriptor Sort(Action> configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; + return Self; + } + + public TopHitsAggregationDescriptor Sort(params Action>[] configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; + return Self; + } + + /// + /// Selects the fields of the source that are returned. + /// + public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// Returns values for the specified stored fields (fields that use the `store` mapping option). /// @@ -647,6 +647,30 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("top_hits"); writer.WriteStartObject(); + if (DocvalueFieldsValue is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); + } + + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (FieldValue is not null) + { + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + } + + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -663,6 +687,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (MissingValue is not null) + { + writer.WritePropertyName("missing"); + JsonSerializer.Serialize(writer, MissingValue, options); + } + + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -698,88 +752,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (DocvalueFieldsValue is not null) + if (StoredFieldsValue is not null) { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, StoredFieldsValue, options); } - if (ExplainValue.HasValue) + if (TrackScoresValue.HasValue) { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); + writer.WritePropertyName("track_scores"); + writer.WriteBooleanValue(TrackScoresValue.Value); } - if (FieldValue is not null) + if (VersionValue.HasValue) { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); + writer.WritePropertyName("version"); + writer.WriteBooleanValue(VersionValue.Value); } - if (FromValue.HasValue) + writer.WriteEndObject(); + if (MetaValue is not null) { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); } - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WriteEndObject(); - } -} + writer.WriteEndObject(); + } +} public sealed partial class TopHitsAggregationDescriptor : SerializableDescriptor { @@ -789,103 +789,28 @@ public TopHitsAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? DocvalueFieldsValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } + private Action HighlightDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. - /// - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
- ///
- public TopHitsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// Selects the fields of the source that are returned. - /// - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - /// /// Fields for which to return doc values. /// @@ -931,6 +856,33 @@ public TopHitsAggregationDescriptor From(int? from) return Self; } + /// + /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. + /// + public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) + { + HighlightDescriptor = null; + HighlightDescriptorAction = null; + HighlightValue = highlight; + return Self; + } + + public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) + { + HighlightValue = null; + HighlightDescriptorAction = null; + HighlightDescriptor = descriptor; + return Self; + } + + public TopHitsAggregationDescriptor Highlight(Action configure) + { + HighlightValue = null; + HighlightDescriptor = null; + HighlightDescriptorAction = configure; + return Self; + } + public TopHitsAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -976,6 +928,54 @@ public TopHitsAggregationDescriptor Size(int? size) return Self; } + /// + /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
+ ///
+ public TopHitsAggregationDescriptor Sort(ICollection? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; + return Self; + } + + public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; + return Self; + } + + public TopHitsAggregationDescriptor Sort(Action configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; + return Self; + } + + public TopHitsAggregationDescriptor Sort(params Action[] configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; + return Self; + } + + /// + /// Selects the fields of the source that are returned. + /// + public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// Returns values for the specified stored fields (fields that use the `store` mapping option). /// @@ -1008,57 +1008,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("top_hits"); writer.WriteStartObject(); - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length > 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length > 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (DocvalueFieldsValue is not null) { writer.WritePropertyName("docvalue_fields"); @@ -1083,6 +1032,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(FromValue.Value); } + if (HighlightDescriptor is not null) + { + writer.WritePropertyName("highlight"); + JsonSerializer.Serialize(writer, HighlightDescriptor, options); + } + else if (HighlightDescriptorAction is not null) + { + writer.WritePropertyName("highlight"); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); + } + else if (HighlightValue is not null) + { + writer.WritePropertyName("highlight"); + JsonSerializer.Serialize(writer, HighlightValue, options); + } + if (MissingValue is not null) { writer.WritePropertyName("missing"); @@ -1113,6 +1078,41 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (SortDescriptor is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortDescriptor, options); + } + else if (SortDescriptorAction is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, new SortOptionsDescriptor(SortDescriptorAction), options); + } + else if (SortDescriptorActions is not null) + { + writer.WritePropertyName("sort"); + if (SortDescriptorActions.Length > 1) + writer.WriteStartArray(); + foreach (var action in SortDescriptorActions) + { + JsonSerializer.Serialize(writer, new SortOptionsDescriptor(action), options); + } + + if (SortDescriptorActions.Length > 1) + writer.WriteEndArray(); + } + else if (SortValue is not null) + { + writer.WritePropertyName("sort"); + SingleOrManySerializationHelper.Serialize(SortValue, writer, options); + } + + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (StoredFieldsValue is not null) { writer.WritePropertyName("stored_fields"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs index 3d6072088bb..76f5b5f204c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs @@ -228,19 +228,37 @@ public TopMetricsAggregationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? MetricsValue { get; set; } private TopMetricsValueDescriptor MetricsDescriptor { get; set; } private Action> MetricsDescriptorAction { get; set; } private Action>[] MetricsDescriptorActions { get; set; } + private FieldValue? MissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } + private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private SortOptionsDescriptor SortDescriptor { get; set; } private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private int? SizeValue { get; set; } + + public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// The fields of the top document to return. @@ -281,6 +299,27 @@ public TopMetricsAggregationDescriptor Metrics(params Action Missing(FieldValue? missing) + { + MissingValue = missing; + return Self; + } + + public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) + { + ScriptValue = script; + return Self; + } + + /// + /// The number of top documents from which to return metrics. + /// + public TopMetricsAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The sort order of the documents. /// @@ -320,50 +359,17 @@ public TopMetricsAggregationDescriptor Sort(params Action Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TopMetricsAggregationDescriptor Missing(FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptValue = script; - return Self; - } - - /// - /// The number of top documents from which to return metrics. - /// - public TopMetricsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("top_metrics"); writer.WriteStartObject(); + if (FieldValue is not null) + { + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + } + if (MetricsDescriptor is not null) { writer.WritePropertyName("metrics"); @@ -393,6 +399,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MetricsValue, writer, options); } + if (MissingValue is not null) + { + writer.WritePropertyName("missing"); + JsonSerializer.Serialize(writer, MissingValue, options); + } + + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -422,30 +446,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { @@ -465,19 +465,43 @@ public TopMetricsAggregationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? MetricsValue { get; set; } private TopMetricsValueDescriptor MetricsDescriptor { get; set; } private Action MetricsDescriptorAction { get; set; } private Action[] MetricsDescriptorActions { get; set; } + private FieldValue? MissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } + private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private SortOptionsDescriptor SortDescriptor { get; set; } private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private int? SizeValue { get; set; } + + public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// The fields of the top document to return. @@ -518,6 +542,27 @@ public TopMetricsAggregationDescriptor Metrics(params Action + /// The number of top documents from which to return metrics. + /// + public TopMetricsAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The sort order of the documents. /// @@ -557,56 +602,17 @@ public TopMetricsAggregationDescriptor Sort(params Action return Self; } - public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TopMetricsAggregationDescriptor Missing(FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptValue = script; - return Self; - } - - /// - /// The number of top documents from which to return metrics. - /// - public TopMetricsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("top_metrics"); writer.WriteStartObject(); + if (FieldValue is not null) + { + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + } + if (MetricsDescriptor is not null) { writer.WritePropertyName("metrics"); @@ -636,6 +642,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MetricsValue, writer, options); } + if (MissingValue is not null) + { + writer.WritePropertyName("missing"); + JsonSerializer.Serialize(writer, MissingValue, options); + } + + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -665,30 +689,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs index b2d058f0838..82bada902f5 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -188,15 +188,30 @@ public WeightedAverageAggregationDescriptor() : base() { } + private string? FormatValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? ValueValue { get; set; } private WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action> ValueDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? WeightValue { get; set; } private WeightedAverageValueDescriptor WeightDescriptor { get; set; } private Action> WeightDescriptorAction { get; set; } - private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } + + /// + /// A numeric response formatter. + /// + public WeightedAverageAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Configuration for the field that provides the values. @@ -225,6 +240,12 @@ public WeightedAverageAggregationDescriptor Value(Action ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) + { + ValueTypeValue = valueType; + return Self; + } + /// /// Configuration for the field or script that provides the weights. /// @@ -252,32 +273,17 @@ public WeightedAverageAggregationDescriptor Weight(Action - /// A numeric response formatter. - /// - public WeightedAverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("weighted_avg"); writer.WriteStartObject(); + if (!string.IsNullOrEmpty(FormatValue)) + { + writer.WritePropertyName("format"); + writer.WriteStringValue(FormatValue); + } + if (ValueDescriptor is not null) { writer.WritePropertyName("value"); @@ -294,6 +300,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ValueValue, options); } + if (ValueTypeValue is not null) + { + writer.WritePropertyName("value_type"); + JsonSerializer.Serialize(writer, ValueTypeValue, options); + } + if (WeightDescriptor is not null) { writer.WritePropertyName("weight"); @@ -310,18 +322,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, WeightValue, options); } - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - writer.WriteEndObject(); if (MetaValue is not null) { @@ -341,15 +341,30 @@ public WeightedAverageAggregationDescriptor() : base() { } + private string? FormatValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? ValueValue { get; set; } private WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action ValueDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? WeightValue { get; set; } private WeightedAverageValueDescriptor WeightDescriptor { get; set; } private Action WeightDescriptorAction { get; set; } - private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } + + /// + /// A numeric response formatter. + /// + public WeightedAverageAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Configuration for the field that provides the values. @@ -378,6 +393,12 @@ public WeightedAverageAggregationDescriptor Value(Action /// Configuration for the field or script that provides the weights. /// @@ -405,32 +426,17 @@ public WeightedAverageAggregationDescriptor Weight(Action - /// A numeric response formatter. - /// - public WeightedAverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("weighted_avg"); writer.WriteStartObject(); + if (!string.IsNullOrEmpty(FormatValue)) + { + writer.WritePropertyName("format"); + writer.WriteStringValue(FormatValue); + } + if (ValueDescriptor is not null) { writer.WritePropertyName("value"); @@ -447,6 +453,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ValueValue, options); } + if (ValueTypeValue is not null) + { + writer.WritePropertyName("value_type"); + JsonSerializer.Serialize(writer, ValueTypeValue, options); + } + if (WeightDescriptor is not null) { writer.WritePropertyName("weight"); @@ -463,18 +475,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, WeightValue, options); } - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs index c491c9d6121..71ac21458b1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs @@ -31,17 +31,17 @@ public sealed partial class PathHierarchyTokenizer : ITokenizer { [JsonInclude, JsonPropertyName("buffer_size")] [JsonConverter(typeof(StringifiedIntegerConverter))] - public int BufferSize { get; set; } + public int? BufferSize { get; set; } [JsonInclude, JsonPropertyName("delimiter")] - public string Delimiter { get; set; } + public string? Delimiter { get; set; } [JsonInclude, JsonPropertyName("replacement")] - public string Replacement { get; set; } + public string? Replacement { get; set; } [JsonInclude, JsonPropertyName("reverse")] [JsonConverter(typeof(StringifiedBoolConverter))] - public bool Reverse { get; set; } + public bool? Reverse { get; set; } [JsonInclude, JsonPropertyName("skip")] [JsonConverter(typeof(StringifiedIntegerConverter))] - public int Skip { get; set; } + public int? Skip { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "path_hierarchy"; @@ -58,38 +58,38 @@ public PathHierarchyTokenizerDescriptor() : base() { } - private int BufferSizeValue { get; set; } - private string DelimiterValue { get; set; } - private string ReplacementValue { get; set; } - private bool ReverseValue { get; set; } - private int SkipValue { get; set; } + private int? BufferSizeValue { get; set; } + private string? DelimiterValue { get; set; } + private string? ReplacementValue { get; set; } + private bool? ReverseValue { get; set; } + private int? SkipValue { get; set; } private string? VersionValue { get; set; } - public PathHierarchyTokenizerDescriptor BufferSize(int bufferSize) + public PathHierarchyTokenizerDescriptor BufferSize(int? bufferSize) { BufferSizeValue = bufferSize; return Self; } - public PathHierarchyTokenizerDescriptor Delimiter(string delimiter) + public PathHierarchyTokenizerDescriptor Delimiter(string? delimiter) { DelimiterValue = delimiter; return Self; } - public PathHierarchyTokenizerDescriptor Replacement(string replacement) + public PathHierarchyTokenizerDescriptor Replacement(string? replacement) { ReplacementValue = replacement; return Self; } - public PathHierarchyTokenizerDescriptor Reverse(bool reverse = true) + public PathHierarchyTokenizerDescriptor Reverse(bool? reverse = true) { ReverseValue = reverse; return Self; } - public PathHierarchyTokenizerDescriptor Skip(int skip) + public PathHierarchyTokenizerDescriptor Skip(int? skip) { SkipValue = skip; return Self; @@ -104,16 +104,36 @@ public PathHierarchyTokenizerDescriptor Version(string? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("buffer_size"); - JsonSerializer.Serialize(writer, BufferSizeValue, options); - writer.WritePropertyName("delimiter"); - writer.WriteStringValue(DelimiterValue); - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - writer.WritePropertyName("reverse"); - JsonSerializer.Serialize(writer, ReverseValue, options); - writer.WritePropertyName("skip"); - JsonSerializer.Serialize(writer, SkipValue, options); + if (BufferSizeValue is not null) + { + writer.WritePropertyName("buffer_size"); + JsonSerializer.Serialize(writer, BufferSizeValue, options); + } + + if (!string.IsNullOrEmpty(DelimiterValue)) + { + writer.WritePropertyName("delimiter"); + writer.WriteStringValue(DelimiterValue); + } + + if (!string.IsNullOrEmpty(ReplacementValue)) + { + writer.WritePropertyName("replacement"); + writer.WriteStringValue(ReplacementValue); + } + + if (ReverseValue is not null) + { + writer.WritePropertyName("reverse"); + JsonSerializer.Serialize(writer, ReverseValue, options); + } + + if (SkipValue is not null) + { + writer.WritePropertyName("skip"); + JsonSerializer.Serialize(writer, SkipValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("path_hierarchy"); if (VersionValue is not null) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs index 1a057df9e20..17cc8ead9e7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs @@ -74,8 +74,8 @@ public MultiGetOperationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } @@ -99,20 +99,20 @@ public MultiGetOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverles } /// - /// If `false`, excludes all _source fields. + /// The key for the primary shard the document resides on. Required if routing is used during indexing. /// - public MultiGetOperationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + public MultiGetOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) { - SourceValue = source; + RoutingValue = routing; return Self; } /// - /// The key for the primary shard the document resides on. Required if routing is used during indexing. + /// If `false`, excludes all _source fields. /// - public MultiGetOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) + public MultiGetOperationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) { - RoutingValue = routing; + SourceValue = source; return Self; } @@ -148,18 +148,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexValue, options); } - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (RoutingValue is not null) { writer.WritePropertyName("routing"); JsonSerializer.Serialize(writer, RoutingValue, options); } + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (StoredFieldsValue is not null) { writer.WritePropertyName("stored_fields"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index e514e7fb6e8..eb9aa6cfbe2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -39,12 +39,6 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_source") - { - variant.Source = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "aggregations" || property == "aggs") { variant.Aggregations = JsonSerializer.Deserialize(ref reader, options); @@ -177,6 +171,12 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve continue; } + if (property == "_source") + { + variant.Source = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "stats") { variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); @@ -233,12 +233,6 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve public override void Write(Utf8JsonWriter writer, MultisearchBody value, JsonSerializerOptions options) { writer.WriteStartObject(); - if (value.Source is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, value.Source, options); - } - if (value.Aggregations is not null) { writer.WritePropertyName("aggregations"); @@ -371,6 +365,12 @@ public override void Write(Utf8JsonWriter writer, MultisearchBody value, JsonSer JsonSerializer.Serialize(writer, value.Sort, options); } + if (value.Source is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, value.Source, options); + } + if (value.Stats is not null) { writer.WritePropertyName("stats"); @@ -564,20 +564,29 @@ public MultisearchBodyDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } private Action>[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action> KnnDescriptorAction { get; set; } private Action>[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action> PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } @@ -585,25 +594,16 @@ public MultisearchBodyDescriptor() : base() private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } private Action>[] RescoreDescriptorActions { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } @@ -702,6 +702,24 @@ public MultisearchBodyDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public MultisearchBodyDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -741,6 +759,15 @@ public MultisearchBodyDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// + public MultisearchBodyDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -765,6 +792,15 @@ public MultisearchBodyDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + /// + public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -804,6 +840,42 @@ public MultisearchBodyDescriptor Knn(params Action + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ /// + public MultisearchBodyDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public MultisearchBodyDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) { PostFilterDescriptor = null; @@ -828,6 +900,12 @@ public MultisearchBodyDescriptor PostFilter(Action Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -891,6 +969,48 @@ public MultisearchBodyDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// + public MultisearchBodyDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public MultisearchBodyDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public MultisearchBodyDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public MultisearchBodyDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + public MultisearchBodyDescriptor Sort(ICollection? sort) { SortDescriptor = null; @@ -937,209 +1057,89 @@ public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch } /// - /// If true, returns detailed information about score computation as part of a hit. + /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- public MultisearchBodyDescriptor Explain(bool? explain = true) + public MultisearchBodyDescriptor Stats(ICollection? stats) { - ExplainValue = explain; + StatsValue = stats; return Self; } /// - /// Configuration of search extensions defined by Elasticsearch plugins. + /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
///
- public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) { - ExtValue = selector?.Invoke(new FluentDictionary()); + StoredFieldsValue = storedFields; return Self; } - /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public MultisearchBodyDescriptor From(int? from) + public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) { - FromValue = from; + SuggestDescriptor = null; + SuggestDescriptorAction = null; + SuggestValue = suggest; return Self; } - /// - /// Boosts the _score of documents from specified indices. - /// - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + public MultisearchBodyDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { - IndicesBoostValue = indicesBoost; + SuggestValue = null; + SuggestDescriptorAction = null; + SuggestDescriptor = descriptor; return Self; } - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public MultisearchBodyDescriptor MinScore(double? minScore) + public MultisearchBodyDescriptor Suggest(Action configure) { - MinScoreValue = minScore; + SuggestValue = null; + SuggestDescriptor = null; + SuggestDescriptorAction = configure; return Self; } /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ /// Maximum number of documents to collect for each shard. If a query reaches this
limit, Elasticsearch terminates the query early. Elasticsearch collects documents
before sorting. Defaults to 0, which does not terminate query execution early.
///
- public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + public MultisearchBodyDescriptor TerminateAfter(long? terminateAfter) { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; + TerminateAfterValue = terminateAfter; return Self; } - public MultisearchBodyDescriptor Pit(Action configure) + /// + /// Specifies the period of time to wait for a response from each shard. If no response
is received before the timeout expires, the request fails and returns an error.
Defaults to no timeout.
+ ///
+ public MultisearchBodyDescriptor Timeout(string? timeout) { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; + TimeoutValue = timeout; return Self; } - public MultisearchBodyDescriptor Profile(bool? profile = true) + /// + /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// + public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) { - ProfileValue = profile; + TrackScoresValue = trackScores; return Self; } /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
///
- public MultisearchBodyDescriptor RuntimeMappings(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + TrackTotalHitsValue = trackTotalHits; return Self; } /// - /// Retrieve a script evaluation (based on different fields) for each hit. + /// If true, returns document version as part of a hit. /// - public MultisearchBodyDescriptor ScriptFields(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor Version(bool? version = true) { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MultisearchBodyDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public MultisearchBodyDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
- ///
- public MultisearchBodyDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Action configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// Maximum number of documents to collect for each shard. If a query reaches this
limit, Elasticsearch terminates the query early. Elasticsearch collects documents
before sorting. Defaults to 0, which does not terminate query execution early.
- ///
- public MultisearchBodyDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// Specifies the period of time to wait for a response from each shard. If no response
is received before the timeout expires, the request fails and returns an error.
Defaults to no timeout.
- ///
- public MultisearchBodyDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
- ///
- public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// If true, returns document version as part of a hit. - /// - public MultisearchBodyDescriptor Version(bool? version = true) - { - VersionValue = version; + VersionValue = version; return Self; } @@ -1209,6 +1209,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -1240,6 +1252,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -1256,6 +1274,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -1285,6 +1309,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -1301,6 +1347,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -1346,6 +1398,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -1381,88 +1463,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); @@ -1543,20 +1543,29 @@ public MultisearchBodyDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } private Action[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action KnnDescriptorAction { get; set; } private Action[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } @@ -1564,25 +1573,16 @@ public MultisearchBodyDescriptor() : base() private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } private Action[] RescoreDescriptorActions { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } @@ -1681,6 +1681,24 @@ public MultisearchBodyDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public MultisearchBodyDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -1720,6 +1738,15 @@ public MultisearchBodyDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// + public MultisearchBodyDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -1744,6 +1771,15 @@ public MultisearchBodyDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + /// + public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -1783,213 +1819,132 @@ public MultisearchBodyDescriptor Knn(params Action[] configu return Self; } - public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Action configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - /// - /// Defines the search definition using the Query DSL. + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
///
- public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public MultisearchBodyDescriptor Query(QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Action configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(params Action[] configure) + public MultisearchBodyDescriptor MinScore(double? minScore) { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; + MinScoreValue = minScore; return Self; } - public MultisearchBodyDescriptor Sort(ICollection? sort) + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; return Self; } - public MultisearchBodyDescriptor Sort(SortOptionsDescriptor descriptor) + public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; return Self; } - public MultisearchBodyDescriptor Sort(Action configure) + public MultisearchBodyDescriptor Pit(Action configure) { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; return Self; } - public MultisearchBodyDescriptor Sort(params Action[] configure) + public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; + PostFilterDescriptor = null; + PostFilterDescriptorAction = null; + PostFilterValue = postFilter; return Self; } - /// - /// Indicates which source fields are returned for matching documents. These
fields are returned in the hits._source property of the search response.
- ///
- public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + public MultisearchBodyDescriptor PostFilter(QueryDsl.QueryDescriptor descriptor) { - SourceValue = source; + PostFilterValue = null; + PostFilterDescriptorAction = null; + PostFilterDescriptor = descriptor; return Self; } - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public MultisearchBodyDescriptor Explain(bool? explain = true) + public MultisearchBodyDescriptor PostFilter(Action configure) { - ExplainValue = explain; + PostFilterValue = null; + PostFilterDescriptor = null; + PostFilterDescriptorAction = configure; return Self; } - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor Profile(bool? profile = true) { - ExtValue = selector?.Invoke(new FluentDictionary()); + ProfileValue = profile; return Self; } /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// Defines the search definition using the Query DSL. ///
- public MultisearchBodyDescriptor From(int? from) + public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) { - FromValue = from; + QueryDescriptor = null; + QueryDescriptorAction = null; + QueryValue = query; return Self; } - /// - /// Boosts the _score of documents from specified indices. - /// - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + public MultisearchBodyDescriptor Query(QueryDsl.QueryDescriptor descriptor) { - IndicesBoostValue = indicesBoost; + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptor = descriptor; return Self; } - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public MultisearchBodyDescriptor MinScore(double? minScore) + public MultisearchBodyDescriptor Query(Action configure) { - MinScoreValue = minScore; + QueryValue = null; + QueryDescriptor = null; + QueryDescriptorAction = configure; return Self; } - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) + public MultisearchBodyDescriptor Rescore(ICollection? rescore) { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; + RescoreDescriptor = null; + RescoreDescriptorAction = null; + RescoreDescriptorActions = null; + RescoreValue = rescore; return Self; } - public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + public MultisearchBodyDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; + RescoreValue = null; + RescoreDescriptorAction = null; + RescoreDescriptorActions = null; + RescoreDescriptor = descriptor; return Self; } - public MultisearchBodyDescriptor Pit(Action configure) + public MultisearchBodyDescriptor Rescore(Action configure) { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; + RescoreValue = null; + RescoreDescriptor = null; + RescoreDescriptorActions = null; + RescoreDescriptorAction = configure; return Self; } - public MultisearchBodyDescriptor Profile(bool? profile = true) + public MultisearchBodyDescriptor Rescore(params Action[] configure) { - ProfileValue = profile; + RescoreValue = null; + RescoreDescriptor = null; + RescoreDescriptorAction = null; + RescoreDescriptorActions = configure; return Self; } @@ -2035,6 +1990,51 @@ public MultisearchBodyDescriptor Size(int? size) return Self; } + public MultisearchBodyDescriptor Sort(ICollection? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; + return Self; + } + + public MultisearchBodyDescriptor Sort(SortOptionsDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; + return Self; + } + + public MultisearchBodyDescriptor Sort(Action configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; + return Self; + } + + public MultisearchBodyDescriptor Sort(params Action[] configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; + return Self; + } + + /// + /// Indicates which source fields are returned for matching documents. These
fields are returned in the hits._source property of the search response.
+ ///
+ public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
@@ -2188,6 +2188,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -2219,6 +2231,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -2235,6 +2253,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -2264,6 +2288,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -2280,6 +2326,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -2325,6 +2377,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -2360,88 +2442,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs index d8f4f6ea9df..5b89224ec23 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs @@ -116,14 +116,14 @@ public MultiTermVectorsOperationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } - private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } + private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } private Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } private bool? PositionsValue { get; set; } @@ -132,24 +132,6 @@ public MultiTermVectorsOperationDescriptor() : base() private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - /// - /// The ID of the document. - /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// The index of the document. - /// - public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - /// /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. /// @@ -160,20 +142,20 @@ public MultiTermVectorsOperationDescriptor Doc(object? doc) } /// - /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
///
- public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) + public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) { - FieldStatisticsValue = fieldStatistics; + FieldsValue = fields; return Self; } /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
+ /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. ///
- public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) + public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) { - FieldsValue = fields; + FieldStatisticsValue = fieldStatistics; return Self; } @@ -204,6 +186,24 @@ public MultiTermVectorsOperationDescriptor Filter(Action + /// The ID of the document. + /// + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) + { + IdValue = id; + return Self; + } + + /// + /// The index of the document. + /// + public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) + { + IndexValue = index; + return Self; + } + /// /// If `true`, the response includes term offsets. /// @@ -270,32 +270,24 @@ public MultiTermVectorsOperationDescriptor VersionType(Elastic.Client protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); JsonSerializer.Serialize(writer, DocValue, options); } - if (FieldStatisticsValue.HasValue) - { - writer.WritePropertyName("field_statistics"); - writer.WriteBooleanValue(FieldStatisticsValue.Value); - } - if (FieldsValue is not null) { writer.WritePropertyName("fields"); JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FieldStatisticsValue.HasValue) + { + writer.WritePropertyName("field_statistics"); + writer.WriteBooleanValue(FieldStatisticsValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -312,6 +304,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (OffsetsValue.HasValue) { writer.WritePropertyName("offsets"); @@ -366,14 +366,14 @@ public MultiTermVectorsOperationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } - private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } + private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } private Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } private bool? PositionsValue { get; set; } @@ -382,24 +382,6 @@ public MultiTermVectorsOperationDescriptor() : base() private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - /// - /// The ID of the document. - /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// The index of the document. - /// - public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - /// /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. /// @@ -410,20 +392,20 @@ public MultiTermVectorsOperationDescriptor Doc(object? doc) } /// - /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
///
- public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) + public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) { - FieldStatisticsValue = fieldStatistics; + FieldsValue = fields; return Self; } /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
+ /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. ///
- public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) + public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) { - FieldsValue = fields; + FieldStatisticsValue = fieldStatistics; return Self; } @@ -454,6 +436,24 @@ public MultiTermVectorsOperationDescriptor Filter(Action + /// The ID of the document. + /// + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) + { + IdValue = id; + return Self; + } + + /// + /// The index of the document. + /// + public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) + { + IndexValue = index; + return Self; + } + /// /// If `true`, the response includes term offsets. /// @@ -520,32 +520,24 @@ public MultiTermVectorsOperationDescriptor VersionType(Elastic.Clients.Elasticse protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); JsonSerializer.Serialize(writer, DocValue, options); } - if (FieldStatisticsValue.HasValue) - { - writer.WritePropertyName("field_statistics"); - writer.WriteBooleanValue(FieldStatisticsValue.Value); - } - if (FieldsValue is not null) { writer.WritePropertyName("fields"); JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FieldStatisticsValue.HasValue) + { + writer.WritePropertyName("field_statistics"); + writer.WriteBooleanValue(FieldStatisticsValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -562,6 +554,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (OffsetsValue.HasValue) { writer.WritePropertyName("offsets"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs index 184db8e7612..bacc446ae95 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs @@ -68,44 +68,17 @@ public RankEvalRequestItemDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? RequestValue { get; set; } - private RankEvalQueryDescriptor RequestDescriptor { get; set; } - private Action> RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } private IDictionary? ParamsValue { get; set; } private ICollection RatingsValue { get; set; } private DocumentRatingDescriptor RatingsDescriptor { get; set; } private Action RatingsDescriptorAction { get; set; } private Action[] RatingsDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? RequestValue { get; set; } + private RankEvalQueryDescriptor RequestDescriptor { get; set; } + private Action> RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id? TemplateIdValue { get; set; } - /// - /// The query being evaluated. - /// - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? request) - { - RequestDescriptor = null; - RequestDescriptorAction = null; - RequestValue = request; - return Self; - } - - public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) - { - RequestValue = null; - RequestDescriptorAction = null; - RequestDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Action> configure) - { - RequestValue = null; - RequestDescriptor = null; - RequestDescriptorAction = configure; - return Self; - } - /// /// The search request’s ID, used to group result details later. /// @@ -163,6 +136,33 @@ public RankEvalRequestItemDescriptor Ratings(params Action + /// The query being evaluated. + /// + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? request) + { + RequestDescriptor = null; + RequestDescriptorAction = null; + RequestValue = request; + return Self; + } + + public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) + { + RequestValue = null; + RequestDescriptorAction = null; + RequestDescriptor = descriptor; + return Self; + } + + public RankEvalRequestItemDescriptor Request(Action> configure) + { + RequestValue = null; + RequestDescriptor = null; + RequestDescriptorAction = configure; + return Self; + } + /// /// The search template Id /// @@ -175,22 +175,6 @@ public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elast protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (RequestDescriptor is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestDescriptor, options); - } - else if (RequestDescriptorAction is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); - } - else if (RequestValue is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestValue, options); - } - writer.WritePropertyName("id"); JsonSerializer.Serialize(writer, IdValue, options); if (ParamsValue is not null) @@ -230,6 +214,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RatingsValue, options); } + if (RequestDescriptor is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestDescriptor, options); + } + else if (RequestDescriptorAction is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); + } + else if (RequestValue is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestValue, options); + } + if (TemplateIdValue is not null) { writer.WritePropertyName("template_id"); @@ -248,44 +248,17 @@ public RankEvalRequestItemDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? RequestValue { get; set; } - private RankEvalQueryDescriptor RequestDescriptor { get; set; } - private Action RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } private IDictionary? ParamsValue { get; set; } private ICollection RatingsValue { get; set; } private DocumentRatingDescriptor RatingsDescriptor { get; set; } private Action RatingsDescriptorAction { get; set; } private Action[] RatingsDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? RequestValue { get; set; } + private RankEvalQueryDescriptor RequestDescriptor { get; set; } + private Action RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id? TemplateIdValue { get; set; } - /// - /// The query being evaluated. - /// - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? request) - { - RequestDescriptor = null; - RequestDescriptorAction = null; - RequestValue = request; - return Self; - } - - public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) - { - RequestValue = null; - RequestDescriptorAction = null; - RequestDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Action configure) - { - RequestValue = null; - RequestDescriptor = null; - RequestDescriptorAction = configure; - return Self; - } - /// /// The search request’s ID, used to group result details later. /// @@ -343,6 +316,33 @@ public RankEvalRequestItemDescriptor Ratings(params Action + /// The query being evaluated. + /// + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? request) + { + RequestDescriptor = null; + RequestDescriptorAction = null; + RequestValue = request; + return Self; + } + + public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) + { + RequestValue = null; + RequestDescriptorAction = null; + RequestDescriptor = descriptor; + return Self; + } + + public RankEvalRequestItemDescriptor Request(Action configure) + { + RequestValue = null; + RequestDescriptor = null; + RequestDescriptorAction = configure; + return Self; + } + /// /// The search template Id /// @@ -355,22 +355,6 @@ public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elasticsearch.Se protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (RequestDescriptor is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestDescriptor, options); - } - else if (RequestDescriptorAction is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); - } - else if (RequestValue is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestValue, options); - } - writer.WritePropertyName("id"); JsonSerializer.Serialize(writer, IdValue, options); if (ParamsValue is not null) @@ -410,6 +394,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RatingsValue, options); } + if (RequestDescriptor is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestDescriptor, options); + } + else if (RequestDescriptorAction is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); + } + else if (RequestValue is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestValue, options); + } + if (TemplateIdValue is not null) { writer.WritePropertyName("template_id"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs index 1028fb67b43..a3a7316cb5c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs @@ -66,7 +66,8 @@ public sealed partial class Source /// [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] public ICollection? Sort { get; set; } } @@ -78,9 +79,15 @@ public SourceDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Indices IndexValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? RemoteValue { get; set; } + private RemoteSourceDescriptor RemoteDescriptor { get; set; } + private Action RemoteDescriptorAction { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } @@ -89,12 +96,15 @@ public SourceDescriptor() : base() private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? RemoteValue { get; set; } - private RemoteSourceDescriptor RemoteDescriptor { get; set; } - private Action RemoteDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } + + /// + /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
+ ///
+ public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Indices index) + { + IndexValue = index; + return Self; + } /// /// Specifies the documents to reindex using the Query DSL. @@ -123,6 +133,48 @@ public SourceDescriptor Query(Action + /// A remote instance of Elasticsearch that you want to index from. + /// + public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? remote) + { + RemoteDescriptor = null; + RemoteDescriptorAction = null; + RemoteValue = remote; + return Self; + } + + public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) + { + RemoteValue = null; + RemoteDescriptorAction = null; + RemoteDescriptor = descriptor; + return Self; + } + + public SourceDescriptor Remote(Action configure) + { + RemoteValue = null; + RemoteDescriptor = null; + RemoteDescriptorAction = configure; + return Self; + } + + public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
+ ///
+ public SourceDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// Slice the reindex request manually using the provided slice ID and total number of slices. /// @@ -195,60 +247,11 @@ public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Se return Self; } - /// - /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
- ///
- public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Indices index) - { - IndexValue = index; - return Self; - } - - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? remote) - { - RemoteDescriptor = null; - RemoteDescriptorAction = null; - RemoteValue = remote; - return Self; - } - - public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) - { - RemoteValue = null; - RemoteDescriptorAction = null; - RemoteDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Remote(Action configure) - { - RemoteValue = null; - RemoteDescriptor = null; - RemoteDescriptorAction = configure; - return Self; - } - - public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
- ///
- public SourceDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -265,6 +268,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (RemoteDescriptor is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteDescriptor, options); + } + else if (RemoteDescriptorAction is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); + } + else if (RemoteValue is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteValue, options); + } + + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -316,36 +347,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceFieldsValue, options); } - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (RemoteDescriptor is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteDescriptor, options); - } - else if (RemoteDescriptorAction is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); - } - else if (RemoteValue is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); } } @@ -358,9 +359,15 @@ public SourceDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Indices IndexValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? RemoteValue { get; set; } + private RemoteSourceDescriptor RemoteDescriptor { get; set; } + private Action RemoteDescriptorAction { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } @@ -369,12 +376,15 @@ public SourceDescriptor() : base() private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? RemoteValue { get; set; } - private RemoteSourceDescriptor RemoteDescriptor { get; set; } - private Action RemoteDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } + + /// + /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
+ ///
+ public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Indices index) + { + IndexValue = index; + return Self; + } /// /// Specifies the documents to reindex using the Query DSL. @@ -403,6 +413,48 @@ public SourceDescriptor Query(Action configure) return Self; } + /// + /// A remote instance of Elasticsearch that you want to index from. + /// + public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? remote) + { + RemoteDescriptor = null; + RemoteDescriptorAction = null; + RemoteValue = remote; + return Self; + } + + public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) + { + RemoteValue = null; + RemoteDescriptorAction = null; + RemoteDescriptor = descriptor; + return Self; + } + + public SourceDescriptor Remote(Action configure) + { + RemoteValue = null; + RemoteDescriptor = null; + RemoteDescriptorAction = configure; + return Self; + } + + public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
+ ///
+ public SourceDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// Slice the reindex request manually using the provided slice ID and total number of slices. /// @@ -475,60 +527,11 @@ public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Serverless.Fi return Self; } - /// - /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
- ///
- public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Indices index) - { - IndexValue = index; - return Self; - } - - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? remote) - { - RemoteDescriptor = null; - RemoteDescriptorAction = null; - RemoteValue = remote; - return Self; - } - - public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) - { - RemoteValue = null; - RemoteDescriptorAction = null; - RemoteDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Remote(Action configure) - { - RemoteValue = null; - RemoteDescriptor = null; - RemoteDescriptorAction = configure; - return Self; - } - - public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
- ///
- public SourceDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -545,6 +548,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (RemoteDescriptor is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteDescriptor, options); + } + else if (RemoteDescriptorAction is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); + } + else if (RemoteValue is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteValue, options); + } + + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -596,36 +627,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceFieldsValue, options); } - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (RemoteDescriptor is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteDescriptor, options); - } - else if (RemoteDescriptorAction is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); - } - else if (RemoteValue is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs index 1e48890222e..642267f0206 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs @@ -41,7 +41,8 @@ public sealed partial class FieldCollapse /// /// The number of inner hits and their sort order /// - [JsonInclude, JsonPropertyName("inner_hits"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits))] + [JsonInclude, JsonPropertyName("inner_hits")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits))] public ICollection? InnerHits { get; set; } /// @@ -62,11 +63,11 @@ public FieldCollapseDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } private Action> CollapseDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private ICollection? InnerHitsValue { get; set; } private InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } private Action>[] InnerHitsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private int? MaxConcurrentGroupSearchesValue { get; set; } public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) @@ -93,6 +94,24 @@ public FieldCollapseDescriptor Collapse(Action + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// The number of inner hits and their sort order /// @@ -132,24 +151,6 @@ public FieldCollapseDescriptor InnerHits(params Action - /// The field to collapse the result set on - ///
- public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The number of concurrent requests allowed to retrieve the inner_hits per group /// @@ -178,6 +179,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollapseValue, options); } + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -207,8 +210,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(InnerHitsValue, writer, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (MaxConcurrentGroupSearchesValue.HasValue) { writer.WritePropertyName("max_concurrent_group_searches"); @@ -230,11 +231,11 @@ public FieldCollapseDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } private Action CollapseDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private ICollection? InnerHitsValue { get; set; } private InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } private Action[] InnerHitsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private int? MaxConcurrentGroupSearchesValue { get; set; } public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) @@ -261,6 +262,33 @@ public FieldCollapseDescriptor Collapse(Action configur return Self; } + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// The number of inner hits and their sort order /// @@ -300,33 +328,6 @@ public FieldCollapseDescriptor InnerHits(params Action[] co return Self; } - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The number of concurrent requests allowed to retrieve the inner_hits per group /// @@ -355,6 +356,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollapseValue, options); } + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -384,8 +387,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(InnerHitsValue, writer, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (MaxConcurrentGroupSearchesValue.HasValue) { writer.WritePropertyName("max_concurrent_group_searches"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs index a6e8853ae97..9c05a902154 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs @@ -85,9 +85,6 @@ public HighlightDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action> HighlightQueryDescriptorAction { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } @@ -95,9 +92,12 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? EncoderValue { get; set; } private IDictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } - private int? FragmentSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } + private int? FragmentSizeValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action> HighlightQueryDescriptorAction { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } private int? NoMatchSizeValue { get; set; } @@ -111,30 +111,6 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightDescriptor HighlightQuery(Action> configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightDescriptor BoundaryChars(string? boundaryChars) { BoundaryCharsValue = boundaryChars; @@ -177,15 +153,15 @@ public HighlightDescriptor ForceSource(bool? forceSource = true) return Self; } - public HighlightDescriptor FragmentSize(int? fragmentSize) + public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) { - FragmentSizeValue = fragmentSize; + FragmenterValue = fragmenter; return Self; } - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightDescriptor FragmentSize(int? fragmentSize) { - FragmenterValue = fragmenter; + FragmentSizeValue = fragmentSize; return Self; } @@ -195,6 +171,30 @@ public HighlightDescriptor HighlightFilter(bool? highlightFilter = tr return Self; } + public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) + { + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightDescriptor HighlightQuery(Action> configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; + return Self; + } + public HighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) { MaxAnalyzedOffsetValue = maxAnalyzedOffset; @@ -270,22 +270,6 @@ public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Serverl protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (!string.IsNullOrEmpty(BoundaryCharsValue)) { writer.WritePropertyName("boundary_chars"); @@ -324,24 +308,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - if (FragmenterValue is not null) { writer.WritePropertyName("fragmenter"); JsonSerializer.Serialize(writer, FragmenterValue, options); } + if (FragmentSizeValue.HasValue) + { + writer.WritePropertyName("fragment_size"); + writer.WriteNumberValue(FragmentSizeValue.Value); + } + if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MaxAnalyzedOffsetValue.HasValue) { writer.WritePropertyName("max_analyzed_offset"); @@ -426,9 +426,6 @@ public HighlightDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action HighlightQueryDescriptorAction { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } @@ -436,9 +433,12 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? EncoderValue { get; set; } private IDictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } - private int? FragmentSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } + private int? FragmentSizeValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action HighlightQueryDescriptorAction { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } private int? NoMatchSizeValue { get; set; } @@ -452,30 +452,6 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightDescriptor HighlightQuery(Action configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightDescriptor BoundaryChars(string? boundaryChars) { BoundaryCharsValue = boundaryChars; @@ -518,15 +494,15 @@ public HighlightDescriptor ForceSource(bool? forceSource = true) return Self; } - public HighlightDescriptor FragmentSize(int? fragmentSize) + public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) { - FragmentSizeValue = fragmentSize; + FragmenterValue = fragmenter; return Self; } - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightDescriptor FragmentSize(int? fragmentSize) { - FragmenterValue = fragmenter; + FragmentSizeValue = fragmentSize; return Self; } @@ -536,6 +512,30 @@ public HighlightDescriptor HighlightFilter(bool? highlightFilter = true) return Self; } + public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) + { + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightDescriptor HighlightQuery(Action configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; + return Self; + } + public HighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) { MaxAnalyzedOffsetValue = maxAnalyzedOffset; @@ -611,22 +611,6 @@ public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Core.Se protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (!string.IsNullOrEmpty(BoundaryCharsValue)) { writer.WritePropertyName("boundary_chars"); @@ -665,24 +649,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - if (FragmenterValue is not null) { writer.WritePropertyName("fragmenter"); JsonSerializer.Serialize(writer, FragmenterValue, options); } + if (FragmentSizeValue.HasValue) + { + writer.WritePropertyName("fragment_size"); + writer.WriteNumberValue(FragmentSizeValue.Value); + } + if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MaxAnalyzedOffsetValue.HasValue) { writer.WritePropertyName("max_analyzed_offset"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs index ae1ddce56b4..6a035b506d2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs @@ -87,19 +87,19 @@ public HighlightFieldDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action> HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? AnalyzerValue { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } private bool? ForceSourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private int? FragmentOffsetValue { get; set; } private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action> HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? MatchedFieldsValue { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } @@ -114,30 +114,6 @@ public HighlightFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Action> configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightFieldDescriptor Analyzer(Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? analyzer) { AnalyzerValue = analyzer; @@ -174,6 +150,12 @@ public HighlightFieldDescriptor ForceSource(bool? forceSource = true) return Self; } + public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) + { + FragmenterValue = fragmenter; + return Self; + } + public HighlightFieldDescriptor FragmentOffset(int? fragmentOffset) { FragmentOffsetValue = fragmentOffset; @@ -186,15 +168,33 @@ public HighlightFieldDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) { - FragmenterValue = fragmenter; + HighlightFilterValue = highlightFilter; return Self; } - public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) + public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) { - HighlightFilterValue = highlightFilter; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(Action> configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; return Self; } @@ -279,22 +279,6 @@ public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Se protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (AnalyzerValue is not null) { writer.WritePropertyName("analyzer"); @@ -331,6 +315,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } + if (FragmenterValue is not null) + { + writer.WritePropertyName("fragmenter"); + JsonSerializer.Serialize(writer, FragmenterValue, options); + } + if (FragmentOffsetValue.HasValue) { writer.WritePropertyName("fragment_offset"); @@ -343,18 +333,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(FragmentSizeValue.Value); } - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MatchedFieldsValue is not null) { writer.WritePropertyName("matched_fields"); @@ -445,19 +445,19 @@ public HighlightFieldDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? AnalyzerValue { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } private bool? ForceSourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private int? FragmentOffsetValue { get; set; } private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? MatchedFieldsValue { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } @@ -472,30 +472,6 @@ public HighlightFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Action configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightFieldDescriptor Analyzer(Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? analyzer) { AnalyzerValue = analyzer; @@ -532,6 +508,12 @@ public HighlightFieldDescriptor ForceSource(bool? forceSource = true) return Self; } + public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) + { + FragmenterValue = fragmenter; + return Self; + } + public HighlightFieldDescriptor FragmentOffset(int? fragmentOffset) { FragmentOffsetValue = fragmentOffset; @@ -544,15 +526,33 @@ public HighlightFieldDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) { - FragmenterValue = fragmenter; + HighlightFilterValue = highlightFilter; return Self; } - public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) + public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) { - HighlightFilterValue = highlightFilter; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(Action configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; return Self; } @@ -637,22 +637,6 @@ public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Co protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (AnalyzerValue is not null) { writer.WritePropertyName("analyzer"); @@ -689,6 +673,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } + if (FragmenterValue is not null) + { + writer.WritePropertyName("fragmenter"); + JsonSerializer.Serialize(writer, FragmenterValue, options); + } + if (FragmentOffsetValue.HasValue) { writer.WritePropertyName("fragment_offset"); @@ -701,18 +691,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(FragmentSizeValue.Value); } - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MatchedFieldsValue is not null) { writer.WritePropertyName("matched_fields"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs index 717eb90479a..a151f13c01f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs @@ -69,7 +69,8 @@ public sealed partial class InnerHits /// /// How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
///
- [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] public ICollection? Sort { get; set; } [JsonInclude, JsonPropertyName("stored_field")] public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredField { get; set; } @@ -94,22 +95,22 @@ public InnerHitsDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } + private HighlightDescriptor HighlightDescriptor { get; set; } + private Action> HighlightDescriptorAction { get; set; } private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } @@ -174,6 +175,27 @@ public InnerHitsDescriptor DocvalueFields(params Action Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) + { + FieldsValue = fields; + return Self; + } + + /// + /// Inner hit starting document offset. + /// + public InnerHitsDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -198,6 +220,42 @@ public InnerHitsDescriptor Highlight(Action IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + /// + /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
+ ///
+ public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) + { + NameValue = name; + return Self; + } + + public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The maximum number of hits to return per `inner_hits`. + /// + public InnerHitsDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
///
@@ -243,63 +301,6 @@ public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Serve return Self; } - public InnerHitsDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// Inner hit starting document offset. - /// - public InnerHitsDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
- ///
- public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The maximum number of hits to return per `inner_hits`. - /// - public InnerHitsDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - public InnerHitsDescriptor StoredField(Elastic.Clients.Elasticsearch.Serverless.Fields? storedField) { StoredFieldValue = storedField; @@ -368,6 +369,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -384,6 +403,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -419,54 +468,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StoredFieldValue is not null) { writer.WritePropertyName("stored_field"); @@ -504,22 +505,22 @@ public InnerHitsDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } + private HighlightDescriptor HighlightDescriptor { get; set; } + private Action HighlightDescriptorAction { get; set; } private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } @@ -584,6 +585,27 @@ public InnerHitsDescriptor DocvalueFields(params Action + /// Inner hit starting document offset. + /// + public InnerHitsDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -608,6 +630,42 @@ public InnerHitsDescriptor Highlight(Action configure) return Self; } + public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + /// + /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
+ ///
+ public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) + { + NameValue = name; + return Self; + } + + public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The maximum number of hits to return per `inner_hits`. + /// + public InnerHitsDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
///
@@ -653,63 +711,6 @@ public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core. return Self; } - public InnerHitsDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// Inner hit starting document offset. - /// - public InnerHitsDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
- ///
- public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The maximum number of hits to return per `inner_hits`. - /// - public InnerHitsDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - public InnerHitsDescriptor StoredField(Elastic.Clients.Elasticsearch.Serverless.Fields? storedField) { StoredFieldValue = storedField; @@ -778,6 +779,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -794,6 +813,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -829,54 +878,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StoredFieldValue is not null) { writer.WritePropertyName("stored_field"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs index 121397cb19b..52c0fe591f5 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs @@ -117,15 +117,15 @@ public PhraseSuggesterDescriptor() : base() { } - private ICollection? DirectGeneratorValue { get; set; } - private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } - private Action> DirectGeneratorDescriptorAction { get; set; } - private Action>[] DirectGeneratorDescriptorActions { get; set; } private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } private PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } private Action CollateDescriptorAction { get; set; } private double? ConfidenceValue { get; set; } + private ICollection? DirectGeneratorValue { get; set; } + private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } + private Action> DirectGeneratorDescriptorAction { get; set; } + private Action>[] DirectGeneratorDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private bool? ForceUnigramsValue { get; set; } private int? GramSizeValue { get; set; } @@ -143,45 +143,6 @@ public PhraseSuggesterDescriptor() : base() private string? TextValue { get; set; } private int? TokenLimitValue { get; set; } - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) - { - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorValue = directGenerator; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Action> configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptorAction = configure; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(params Action>[] configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = configure; - return Self; - } - public PhraseSuggesterDescriptor Analyzer(string? analyzer) { AnalyzerValue = analyzer; @@ -224,6 +185,45 @@ public PhraseSuggesterDescriptor Confidence(double? confidence) return Self; } + /// + /// A list of candidate generators that produce a list of possible terms per term in the given text. + /// + public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) + { + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorValue = directGenerator; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptor = descriptor; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(Action> configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptorAction = configure; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(params Action>[] configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = configure; + return Self; + } + public PhraseSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) { FieldValue = field; @@ -365,6 +365,34 @@ public PhraseSuggesterDescriptor TokenLimit(int? tokenLimit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(AnalyzerValue)) + { + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); + } + + if (CollateDescriptor is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateDescriptor, options); + } + else if (CollateDescriptorAction is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); + } + else if (CollateValue is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateValue, options); + } + + if (ConfidenceValue.HasValue) + { + writer.WritePropertyName("confidence"); + writer.WriteNumberValue(ConfidenceValue.Value); + } + if (DirectGeneratorDescriptor is not null) { writer.WritePropertyName("direct_generator"); @@ -396,34 +424,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DirectGeneratorValue, options); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CollateDescriptor is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateDescriptor, options); - } - else if (CollateDescriptorAction is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); - } - else if (CollateValue is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateValue, options); - } - - if (ConfidenceValue.HasValue) - { - writer.WritePropertyName("confidence"); - writer.WriteNumberValue(ConfidenceValue.Value); - } - writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (ForceUnigramsValue.HasValue) @@ -524,15 +524,15 @@ public PhraseSuggesterDescriptor() : base() { } - private ICollection? DirectGeneratorValue { get; set; } - private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } - private Action DirectGeneratorDescriptorAction { get; set; } - private Action[] DirectGeneratorDescriptorActions { get; set; } private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } private PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } private Action CollateDescriptorAction { get; set; } private double? ConfidenceValue { get; set; } + private ICollection? DirectGeneratorValue { get; set; } + private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } + private Action DirectGeneratorDescriptorAction { get; set; } + private Action[] DirectGeneratorDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private bool? ForceUnigramsValue { get; set; } private int? GramSizeValue { get; set; } @@ -550,45 +550,6 @@ public PhraseSuggesterDescriptor() : base() private string? TextValue { get; set; } private int? TokenLimitValue { get; set; } - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) - { - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorValue = directGenerator; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Action configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptorAction = configure; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(params Action[] configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = configure; - return Self; - } - public PhraseSuggesterDescriptor Analyzer(string? analyzer) { AnalyzerValue = analyzer; @@ -631,6 +592,45 @@ public PhraseSuggesterDescriptor Confidence(double? confidence) return Self; } + /// + /// A list of candidate generators that produce a list of possible terms per term in the given text. + /// + public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) + { + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorValue = directGenerator; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptor = descriptor; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(Action configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptorAction = configure; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(params Action[] configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = configure; + return Self; + } + public PhraseSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) { FieldValue = field; @@ -778,6 +778,34 @@ public PhraseSuggesterDescriptor TokenLimit(int? tokenLimit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(AnalyzerValue)) + { + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); + } + + if (CollateDescriptor is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateDescriptor, options); + } + else if (CollateDescriptorAction is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); + } + else if (CollateValue is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateValue, options); + } + + if (ConfidenceValue.HasValue) + { + writer.WritePropertyName("confidence"); + writer.WriteNumberValue(ConfidenceValue.Value); + } + if (DirectGeneratorDescriptor is not null) { writer.WritePropertyName("direct_generator"); @@ -809,34 +837,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DirectGeneratorValue, options); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CollateDescriptor is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateDescriptor, options); - } - else if (CollateDescriptorAction is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); - } - else if (CollateValue is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateValue, options); - } - - if (ConfidenceValue.HasValue) - { - writer.WritePropertyName("confidence"); - writer.WriteNumberValue(ConfidenceValue.Value); - } - writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (ForceUnigramsValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs index 8f9db3547de..a0099d7c4d4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs @@ -53,55 +53,55 @@ public FieldSortDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action> NestedDescriptorAction { get; set; } private string? FormatValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } + private NestedSortValueDescriptor NestedDescriptor { get; set; } + private Action> NestedDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? NumericTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? UnmappedTypeValue { get; set; } - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) + public FieldSortDescriptor Format(string? format) { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; + FormatValue = format; return Self; } - public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) + public FieldSortDescriptor Missing(FieldValue? missing) { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; + MissingValue = missing; return Self; } - public FieldSortDescriptor Nested(Action> configure) + public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; + ModeValue = mode; return Self; } - public FieldSortDescriptor Format(string? format) + public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) { - FormatValue = format; + NestedDescriptor = null; + NestedDescriptorAction = null; + NestedValue = nested; return Self; } - public FieldSortDescriptor Missing(FieldValue? missing) + public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) { - MissingValue = missing; + NestedValue = null; + NestedDescriptorAction = null; + NestedDescriptor = descriptor; return Self; } - public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) + public FieldSortDescriptor Nested(Action> configure) { - ModeValue = mode; + NestedValue = null; + NestedDescriptor = null; + NestedDescriptorAction = configure; return Self; } @@ -126,22 +126,6 @@ public FieldSortDescriptor UnmappedType(Elastic.Clients.Elasticsearch protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -160,6 +144,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } + if (NestedDescriptor is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedDescriptor, options); + } + else if (NestedDescriptorAction is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); + } + else if (NestedValue is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedValue, options); + } + if (NumericTypeValue is not null) { writer.WritePropertyName("numeric_type"); @@ -190,55 +190,55 @@ public FieldSortDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action NestedDescriptorAction { get; set; } private string? FormatValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } + private NestedSortValueDescriptor NestedDescriptor { get; set; } + private Action NestedDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? NumericTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? UnmappedTypeValue { get; set; } - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) + public FieldSortDescriptor Format(string? format) { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; + FormatValue = format; return Self; } - public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) + public FieldSortDescriptor Missing(FieldValue? missing) { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; + MissingValue = missing; return Self; } - public FieldSortDescriptor Nested(Action configure) + public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; + ModeValue = mode; return Self; } - public FieldSortDescriptor Format(string? format) + public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) { - FormatValue = format; + NestedDescriptor = null; + NestedDescriptorAction = null; + NestedValue = nested; return Self; } - public FieldSortDescriptor Missing(FieldValue? missing) + public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) { - MissingValue = missing; + NestedValue = null; + NestedDescriptorAction = null; + NestedDescriptor = descriptor; return Self; } - public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) + public FieldSortDescriptor Nested(Action configure) { - ModeValue = mode; + NestedValue = null; + NestedDescriptor = null; + NestedDescriptorAction = configure; return Self; } @@ -263,22 +263,6 @@ public FieldSortDescriptor UnmappedType(Elastic.Clients.Elasticsearch.Serverless protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -297,6 +281,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } + if (NestedDescriptor is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedDescriptor, options); + } + else if (NestedDescriptorAction is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); + } + else if (NestedValue is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedValue, options); + } + if (NumericTypeValue is not null) { writer.WritePropertyName("numeric_type"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs index dd5bf5af9df..b4725e5e5cc 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs @@ -38,7 +38,8 @@ public sealed partial class AddAction /// /// Aliases for the action.
Index alias names support date math.
///
- [JsonInclude, JsonPropertyName("aliases"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexAlias))] + [JsonInclude, JsonPropertyName("aliases")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexAlias))] public ICollection? Aliases { get; set; } /// @@ -106,11 +107,11 @@ public AddActionDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } + private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } @@ -120,6 +121,24 @@ public AddActionDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } + /// + /// Alias for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + /// + /// Aliases for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Aliases(ICollection? aliases) + { + AliasesValue = aliases; + return Self; + } + /// /// Query used to limit documents the alias can access. /// @@ -147,24 +166,6 @@ public AddActionDescriptor Filter(Action - /// Alias for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// Aliases for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - /// /// Data stream or index for the action.
Supports wildcards (`*`).
///
@@ -240,6 +241,18 @@ public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -256,18 +269,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - if (IndexValue is not null) { writer.WritePropertyName("index"); @@ -328,11 +329,11 @@ public AddActionDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } + private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } @@ -342,6 +343,24 @@ public AddActionDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } + /// + /// Alias for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + /// + /// Aliases for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Aliases(ICollection? aliases) + { + AliasesValue = aliases; + return Self; + } + /// /// Query used to limit documents the alias can access. /// @@ -369,24 +388,6 @@ public AddActionDescriptor Filter(Action configure) return Self; } - /// - /// Alias for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// Aliases for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - /// /// Data stream or index for the action.
Supports wildcards (`*`).
///
@@ -462,6 +463,18 @@ public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverles protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -478,18 +491,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - if (IndexValue is not null) { writer.WritePropertyName("index"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs index 767ac3a9ebd..60d46b0787e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs @@ -77,6 +77,18 @@ public sealed partial class DataStream [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } + /// + /// Name of the lifecycle system that'll manage the next generation of the data stream. + /// + [JsonInclude, JsonPropertyName("next_generation_managed_by")] + public string NextGenerationManagedBy { get; init; } + + /// + /// Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream. + /// + [JsonInclude, JsonPropertyName("prefer_ilm")] + public bool PreferIlm { get; init; } + /// /// If `true`, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings. /// diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs index 6ddc93885f7..92d12ade58f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs @@ -29,6 +29,12 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class DataStreamIndex { + /// + /// Name of the current ILM lifecycle policy configured for this backing index. + /// + [JsonInclude, JsonPropertyName("ilm_policy")] + public string? IlmPolicy { get; init; } + /// /// Name of the backing index. /// @@ -40,4 +46,16 @@ public sealed partial class DataStreamIndex /// [JsonInclude, JsonPropertyName("index_uuid")] public string IndexUuid { get; init; } + + /// + /// Name of the lifecycle system that's currently managing this backing index. + /// + [JsonInclude, JsonPropertyName("managed_by")] + public string ManagedBy { get; init; } + + /// + /// Indicates if ILM should take precedence over DSL in case both are configured to manage this index. + /// + [JsonInclude, JsonPropertyName("prefer_ilm")] + public bool PreferIlm { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs index 549d66a5f79..f49fefd83c8 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs @@ -31,11 +31,14 @@ public sealed partial class IndexSegmentSort { [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Fields? Field { get; set; } - [JsonInclude, JsonPropertyName("missing"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortMissing))] + [JsonInclude, JsonPropertyName("missing")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortMissing))] public ICollection? Missing { get; set; } - [JsonInclude, JsonPropertyName("mode"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortMode))] + [JsonInclude, JsonPropertyName("mode")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortMode))] public ICollection? Mode { get; set; } - [JsonInclude, JsonPropertyName("order"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortOrder))] + [JsonInclude, JsonPropertyName("order")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortOrder))] public ICollection? Order { get; set; } } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs index aa1e809f7dd..c80731663b4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -316,12 +316,6 @@ public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "shards") - { - variant.Shards = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "similarity") { variant.Similarity = JsonSerializer.Deserialize(ref reader, options); @@ -680,12 +674,6 @@ public override void Write(Utf8JsonWriter writer, IndexSettings value, JsonSeria JsonSerializer.Serialize(writer, value.Settings, options); } - if (value.Shards.HasValue) - { - writer.WritePropertyName("shards"); - writer.WriteNumberValue(value.Shards.Value); - } - if (value.Similarity is not null) { writer.WritePropertyName("similarity"); @@ -814,7 +802,6 @@ public sealed partial class IndexSettings public ICollection? RoutingPath { get; set; } public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? Search { get; set; } public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; } - public int? Shards { get; set; } /// /// Configure custom similarity settings to customize how search results are scored. @@ -843,15 +830,6 @@ public IndexSettingsDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; } - private IndexSettingsDescriptor IndexDescriptor { get; set; } - private Action> IndexDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; } - private IndexSegmentSortDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; } private IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; } private Action AnalysisDescriptorAction { get; set; } @@ -874,6 +852,9 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? HighlightValue { get; set; } private SettingsHighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; } + private IndexSettingsDescriptor IndexDescriptor { get; set; } + private Action> IndexDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; } private IndexingPressureDescriptor IndexingPressureDescriptor { get; set; } private Action IndexingPressureDescriptorAction { get; set; } @@ -923,13 +904,18 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? SearchValue { get; set; } private SettingsSearchDescriptor SearchDescriptor { get; set; } private Action SearchDescriptorAction { get; set; } - private int? ShardsValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } + private IndexSettingsDescriptor SettingsDescriptor { get; set; } + private Action> SettingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarity? SimilarityValue { get; set; } private SettingsSimilarityDescriptor SimilarityDescriptor { get; set; } private Action SimilarityDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; } private SoftDeletesDescriptor SoftDeletesDescriptor { get; set; } private Action SoftDeletesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; } + private IndexSegmentSortDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? StoreValue { get; set; } private StorageDescriptor StoreDescriptor { get; set; } private Action StoreDescriptorAction { get; set; } @@ -946,78 +932,6 @@ public IndexSettingsDescriptor() : base() private IndexVersioningDescriptor VersionDescriptor { get; set; } private Action VersionDescriptorAction { get; set; } - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Index(Action> configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? analysis) { AnalysisDescriptor = null; @@ -1177,6 +1091,30 @@ public IndexSettingsDescriptor Highlight(Action Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index) + { + IndexDescriptor = null; + IndexDescriptorAction = null; + IndexValue = index; + return Self; + } + + public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) + { + IndexValue = null; + IndexDescriptorAction = null; + IndexDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Index(Action> configure) + { + IndexValue = null; + IndexDescriptor = null; + IndexDescriptorAction = configure; + return Self; + } + /// /// Configure indexing back pressure limits. /// @@ -1531,9 +1469,27 @@ public IndexSettingsDescriptor Search(Action Shards(int? shards) + public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) { - ShardsValue = shards; + SettingsDescriptor = null; + SettingsDescriptorAction = null; + SettingsValue = settings; + return Self; + } + + public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) + { + SettingsValue = null; + SettingsDescriptorAction = null; + SettingsDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Settings(Action> configure) + { + SettingsValue = null; + SettingsDescriptor = null; + SettingsDescriptorAction = configure; return Self; } @@ -1588,6 +1544,30 @@ public IndexSettingsDescriptor SoftDeletes(Action Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortValue = sort; + return Self; + } + + public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Sort(Action> configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = configure; + return Self; + } + /// /// The store module allows you to control how index data is stored and accessed on disk. /// @@ -1708,54 +1688,6 @@ public IndexSettingsDescriptor Version(Action(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - if (AnalysisDescriptor is not null) { writer.WritePropertyName("analysis"); @@ -1880,6 +1812,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndexDescriptor is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexDescriptor, options); + } + else if (IndexDescriptorAction is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(IndexDescriptorAction), options); + } + else if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (IndexingPressureDescriptor is not null) { writer.WritePropertyName("indexing_pressure"); @@ -2150,10 +2098,20 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SearchValue, options); } - if (ShardsValue.HasValue) + if (SettingsDescriptor is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsDescriptor, options); + } + else if (SettingsDescriptorAction is not null) { - writer.WritePropertyName("shards"); - writer.WriteNumberValue(ShardsValue.Value); + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); + } + else if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); } if (SimilarityDescriptor is not null) @@ -2188,6 +2146,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SoftDeletesValue, options); } + if (SortDescriptor is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortDescriptor, options); + } + else if (SortDescriptorAction is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); + } + else if (SortValue is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortValue, options); + } + if (StoreDescriptor is not null) { writer.WritePropertyName("store"); @@ -2291,15 +2265,6 @@ public IndexSettingsDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; } - private IndexSettingsDescriptor IndexDescriptor { get; set; } - private Action IndexDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; } - private IndexSegmentSortDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; } private IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; } private Action AnalysisDescriptorAction { get; set; } @@ -2322,6 +2287,9 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? HighlightValue { get; set; } private SettingsHighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; } + private IndexSettingsDescriptor IndexDescriptor { get; set; } + private Action IndexDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; } private IndexingPressureDescriptor IndexingPressureDescriptor { get; set; } private Action IndexingPressureDescriptorAction { get; set; } @@ -2371,13 +2339,18 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? SearchValue { get; set; } private SettingsSearchDescriptor SearchDescriptor { get; set; } private Action SearchDescriptorAction { get; set; } - private int? ShardsValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } + private IndexSettingsDescriptor SettingsDescriptor { get; set; } + private Action SettingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarity? SimilarityValue { get; set; } private SettingsSimilarityDescriptor SimilarityDescriptor { get; set; } private Action SimilarityDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; } private SoftDeletesDescriptor SoftDeletesDescriptor { get; set; } private Action SoftDeletesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; } + private IndexSegmentSortDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? StoreValue { get; set; } private StorageDescriptor StoreDescriptor { get; set; } private Action StoreDescriptorAction { get; set; } @@ -2394,78 +2367,6 @@ public IndexSettingsDescriptor() : base() private IndexVersioningDescriptor VersionDescriptor { get; set; } private Action VersionDescriptorAction { get; set; } - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Index(Action configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? analysis) { AnalysisDescriptor = null; @@ -2625,6 +2526,30 @@ public IndexSettingsDescriptor Highlight(Action con return Self; } + public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index) + { + IndexDescriptor = null; + IndexDescriptorAction = null; + IndexValue = index; + return Self; + } + + public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) + { + IndexValue = null; + IndexDescriptorAction = null; + IndexDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Index(Action configure) + { + IndexValue = null; + IndexDescriptor = null; + IndexDescriptorAction = configure; + return Self; + } + /// /// Configure indexing back pressure limits. /// @@ -2979,9 +2904,27 @@ public IndexSettingsDescriptor Search(Action configure return Self; } - public IndexSettingsDescriptor Shards(int? shards) + public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) + { + SettingsDescriptor = null; + SettingsDescriptorAction = null; + SettingsValue = settings; + return Self; + } + + public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) + { + SettingsValue = null; + SettingsDescriptorAction = null; + SettingsDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Settings(Action configure) { - ShardsValue = shards; + SettingsValue = null; + SettingsDescriptor = null; + SettingsDescriptorAction = configure; return Self; } @@ -3036,6 +2979,30 @@ public IndexSettingsDescriptor SoftDeletes(Action configu return Self; } + public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortValue = sort; + return Self; + } + + public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Sort(Action configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = configure; + return Self; + } + /// /// The store module allows you to control how index data is stored and accessed on disk. /// @@ -3156,54 +3123,6 @@ public IndexSettingsDescriptor Version(Action configu protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - if (AnalysisDescriptor is not null) { writer.WritePropertyName("analysis"); @@ -3328,6 +3247,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndexDescriptor is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexDescriptor, options); + } + else if (IndexDescriptorAction is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(IndexDescriptorAction), options); + } + else if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (IndexingPressureDescriptor is not null) { writer.WritePropertyName("indexing_pressure"); @@ -3598,10 +3533,20 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SearchValue, options); } - if (ShardsValue.HasValue) + if (SettingsDescriptor is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsDescriptor, options); + } + else if (SettingsDescriptorAction is not null) { - writer.WritePropertyName("shards"); - writer.WriteNumberValue(ShardsValue.Value); + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); + } + else if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); } if (SimilarityDescriptor is not null) @@ -3636,6 +3581,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SoftDeletesValue, options); } + if (SortDescriptor is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortDescriptor, options); + } + else if (SortDescriptorAction is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); + } + else if (SortValue is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortValue, options); + } + if (StoreDescriptor is not null) { writer.WritePropertyName("store"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs index e6801cd9312..5a657e6ff1c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs @@ -51,8 +51,8 @@ public IndexSettingsAnalysisDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? AnalyzersValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.CharFilters? CharFiltersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFilters? TokenFiltersValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.Normalizers? NormalizersValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFilters? TokenFiltersValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Analysis.Tokenizers? TokenizersValue { get; set; } public IndexSettingsAnalysisDescriptor Analyzers(Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? analyzers) @@ -95,43 +95,43 @@ public IndexSettingsAnalysisDescriptor CharFilters(Action configure) + public IndexSettingsAnalysisDescriptor Normalizers(Action configure) { - var descriptor = new Analysis.TokenFiltersDescriptor(); + var descriptor = new Analysis.NormalizersDescriptor(); configure?.Invoke(descriptor); - TokenFiltersValue = descriptor.PromisedValue; + NormalizersValue = descriptor.PromisedValue; return Self; } - public IndexSettingsAnalysisDescriptor Normalizers(Elastic.Clients.Elasticsearch.Serverless.Analysis.Normalizers? normalizers) + public IndexSettingsAnalysisDescriptor TokenFilters(Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFilters? tokenFilters) { - NormalizersValue = normalizers; + TokenFiltersValue = tokenFilters; return Self; } - public IndexSettingsAnalysisDescriptor Normalizers(Analysis.NormalizersDescriptor descriptor) + public IndexSettingsAnalysisDescriptor TokenFilters(Analysis.TokenFiltersDescriptor descriptor) { - NormalizersValue = descriptor.PromisedValue; + TokenFiltersValue = descriptor.PromisedValue; return Self; } - public IndexSettingsAnalysisDescriptor Normalizers(Action configure) + public IndexSettingsAnalysisDescriptor TokenFilters(Action configure) { - var descriptor = new Analysis.NormalizersDescriptor(); + var descriptor = new Analysis.TokenFiltersDescriptor(); configure?.Invoke(descriptor); - NormalizersValue = descriptor.PromisedValue; + TokenFiltersValue = descriptor.PromisedValue; return Self; } @@ -170,18 +170,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CharFiltersValue, options); } - if (TokenFiltersValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, TokenFiltersValue, options); - } - if (NormalizersValue is not null) { writer.WritePropertyName("normalizer"); JsonSerializer.Serialize(writer, NormalizersValue, options); } + if (TokenFiltersValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, TokenFiltersValue, options); + } + if (TokenizersValue is not null) { writer.WritePropertyName("tokenizer"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs index 6657a582ce1..0a4b0e65ea2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs @@ -59,20 +59,32 @@ public IndexStateDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? DefaultsValue { get; set; } private IndexSettingsDescriptor DefaultsDescriptor { get; set; } private Action> DefaultsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action> MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action> SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + public IndexStateDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName? dataStream) + { + DataStreamValue = dataStream; + return Self; + } /// /// Default settings, included when the request's `include_default` is `true`. @@ -101,6 +113,33 @@ public IndexStateDescriptor Defaults(Action + /// Data lifecycle applicable if this is a data stream. + /// + public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexStateDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) { MappingsDescriptor = null; @@ -149,48 +188,21 @@ public IndexStateDescriptor Settings(Action Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName? dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// Data lifecycle applicable if this is a data stream. - /// - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + if (DefaultsDescriptor is not null) { writer.WritePropertyName("defaults"); @@ -207,6 +219,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DefaultsValue, options); } + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -239,34 +267,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } @@ -279,20 +279,32 @@ public IndexStateDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? DefaultsValue { get; set; } private IndexSettingsDescriptor DefaultsDescriptor { get; set; } private Action DefaultsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + public IndexStateDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName? dataStream) + { + DataStreamValue = dataStream; + return Self; + } /// /// Default settings, included when the request's `include_default` is `true`. @@ -321,6 +333,33 @@ public IndexStateDescriptor Defaults(Action configure) return Self; } + /// + /// Data lifecycle applicable if this is a data stream. + /// + public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexStateDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) { MappingsDescriptor = null; @@ -369,48 +408,21 @@ public IndexStateDescriptor Settings(Action configure) return Self; } - public IndexStateDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName? dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// Data lifecycle applicable if this is a data stream. - /// - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + if (DefaultsDescriptor is not null) { writer.WritePropertyName("defaults"); @@ -427,6 +439,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DefaultsValue, options); } + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -459,34 +487,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs index 0967ddf9688..32f35e3ec59 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs @@ -58,16 +58,49 @@ public IndexTemplateMappingDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action> MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action> SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + /// + /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
+ ///
+ public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } /// /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
@@ -123,42 +156,31 @@ public IndexTemplateMappingDescriptor Settings(Action - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -191,28 +213,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } @@ -225,16 +225,49 @@ public IndexTemplateMappingDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + /// + /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
+ ///
+ public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } /// /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
@@ -290,42 +323,31 @@ public IndexTemplateMappingDescriptor Settings(Action c return Self; } - /// - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -358,28 +380,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs index 893a7f51121..769b5d6c94d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class MappingLimitSettingsDimensionFields { /// - /// [preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will
apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ /// [preview] This functionality is in technical preview and may be changed or removed in a future release.
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
///
[JsonInclude, JsonPropertyName("limit")] public int? Limit { get; set; } @@ -47,7 +47,7 @@ public MappingLimitSettingsDimensionFieldsDescriptor() : base() private int? LimitValue { get; set; } /// - /// [preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will
apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ /// [preview] This functionality is in technical preview and may be changed or removed in a future release.
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
///
public MappingLimitSettingsDimensionFieldsDescriptor Limit(int? limit) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs index 70a3a3f3bac..af945b1ce56 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs @@ -38,7 +38,8 @@ public sealed partial class RemoveAction /// /// Aliases for the action.
Index alias names support date math.
///
- [JsonInclude, JsonPropertyName("aliases"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexAlias))] + [JsonInclude, JsonPropertyName("aliases")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexAlias))] public ICollection? Aliases { get; set; } /// 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 0a701957079..239e7d48242 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 @@ -68,54 +68,18 @@ public AppendProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private bool? AllowDuplicatesValue { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private ICollection ValueValue { get; set; } - public AppendProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// If `false`, the processor does not append values already present in the field. /// @@ -161,6 +125,42 @@ public AppendProcessorDescriptor IgnoreFailure(bool? ignoreFailure = return Self; } + public AppendProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AppendProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public AppendProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -179,6 +179,32 @@ public AppendProcessorDescriptor Value(ICollection value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowDuplicatesValue.HasValue) + { + writer.WritePropertyName("allow_duplicates"); + writer.WriteBooleanValue(AllowDuplicatesValue.Value); + } + + 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -210,32 +236,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (AllowDuplicatesValue.HasValue) - { - writer.WritePropertyName("allow_duplicates"); - writer.WriteBooleanValue(AllowDuplicatesValue.Value); - } - - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -256,54 +256,18 @@ public AppendProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private bool? AllowDuplicatesValue { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private ICollection ValueValue { get; set; } - public AppendProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// If `false`, the processor does not append values already present in the field. /// @@ -358,6 +322,42 @@ public AppendProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public AppendProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AppendProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public AppendProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -376,6 +376,32 @@ public AppendProcessorDescriptor Value(ICollection value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowDuplicatesValue.HasValue) + { + writer.WritePropertyName("allow_duplicates"); + writer.WriteBooleanValue(AllowDuplicatesValue.Value); + } + + 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -407,32 +433,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (AllowDuplicatesValue.HasValue) - { - writer.WritePropertyName("allow_duplicates"); - writer.WriteBooleanValue(AllowDuplicatesValue.Value); - } - - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs index a35aeb9fa1e..9a9f0bbdf17 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs @@ -93,10 +93,6 @@ public AttachmentProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? IfValue { get; set; } @@ -104,47 +100,15 @@ public AttachmentProcessorDescriptor() : base() private bool? IgnoreMissingValue { get; set; } private long? IndexedCharsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? IndexedCharsFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? ResourceNameValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public AttachmentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -217,6 +181,42 @@ public AttachmentProcessorDescriptor IndexedCharsField(Expres return Self; } + public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Array of properties to select to be stored.
Can be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`.
///
@@ -262,37 +262,6 @@ public AttachmentProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -331,6 +300,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexedCharsFieldValue, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -367,10 +367,6 @@ public AttachmentProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? IfValue { get; set; } @@ -378,47 +374,15 @@ public AttachmentProcessorDescriptor() : base() private bool? IgnoreMissingValue { get; set; } private long? IndexedCharsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? IndexedCharsFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? ResourceNameValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public AttachmentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -509,6 +473,42 @@ public AttachmentProcessorDescriptor IndexedCharsField(Expression? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Array of properties to select to be stored.
Can be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`.
///
@@ -563,37 +563,6 @@ public AttachmentProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public BytesProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public BytesProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public BytesProcessorDescriptor IgnoreMissing(bool? ignoreMissing = t return Self; } + public BytesProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public BytesProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public BytesProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public BytesProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public BytesProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public BytesProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public BytesProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public BytesProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public BytesProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public BytesProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public BytesProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private double ErrorDistanceValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType ShapeTypeValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public CircleProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CircleProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -185,6 +149,42 @@ public CircleProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public CircleProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CircleProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Which field mapping type is to be used when processing the circle: `geo_shape` or `shape`. /// @@ -221,6 +221,34 @@ public CircleProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private double ErrorDistanceValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType ShapeTypeValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public CircleProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CircleProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -419,6 +383,42 @@ public CircleProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public CircleProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CircleProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Which field mapping type is to be used when processing the circle: `geo_shape` or `shape`. /// @@ -464,6 +464,34 @@ public CircleProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType TypeValue { get; set; } - public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public ConvertProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -169,6 +133,42 @@ public ConvertProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public ConvertProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -205,6 +205,32 @@ public ConvertProcessorDescriptor Type(Elastic.Clients.Elasticsearch. 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"); @@ -236,32 +262,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -288,55 +288,19 @@ public ConvertProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType TypeValue { get; set; } - public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public ConvertProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -391,6 +355,42 @@ public ConvertProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public ConvertProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -436,6 +436,32 @@ public ConvertProcessorDescriptor Type(Elastic.Clients.Elasticsearch.Serverless. 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"); @@ -467,32 +493,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs index 44f2cd59dbd..b423088b643 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs @@ -93,58 +93,22 @@ public CsvProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private object? EmptyValueValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? QuoteValue { get; set; } private string? SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields TargetFieldsValue { get; set; } private bool? TrimValue { get; set; } - public CsvProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CsvProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -199,6 +163,42 @@ public CsvProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tru return Self; } + public CsvProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CsvProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Quote used in CSV, has to be single character string. /// @@ -244,37 +244,6 @@ public CsvProcessorDescriptor Trim(bool? trim = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -307,6 +276,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(QuoteValue)) { writer.WritePropertyName("quote"); @@ -345,58 +345,22 @@ public CsvProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private object? EmptyValueValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? QuoteValue { get; set; } private string? SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields TargetFieldsValue { get; set; } private bool? TrimValue { get; set; } - public CsvProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CsvProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -460,6 +424,42 @@ public CsvProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public CsvProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CsvProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Quote used in CSV, has to be single character string. /// @@ -505,37 +505,6 @@ public CsvProcessorDescriptor Trim(bool? trim = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -568,6 +537,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(QuoteValue)) { writer.WritePropertyName("quote"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs index dcef482bf91..590a07e6d29 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs @@ -92,10 +92,6 @@ public DateIndexNameProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private ICollection DateFormatsValue { get; set; } private string DateRoundingValue { get; set; } private string? DescriptionValue { get; set; } @@ -105,45 +101,13 @@ public DateIndexNameProcessorDescriptor() : base() private string? IndexNameFormatValue { get; set; } private string? IndexNamePrefixValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private string? TimezoneValue { get; set; } - public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.
Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
///
@@ -225,6 +189,42 @@ public DateIndexNameProcessorDescriptor Locale(string? locale) return Self; } + public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateIndexNameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -243,37 +243,6 @@ public DateIndexNameProcessorDescriptor Timezone(string? timezone) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - writer.WritePropertyName("date_formats"); JsonSerializer.Serialize(writer, DateFormatsValue, options); writer.WritePropertyName("date_rounding"); @@ -316,6 +285,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(LocaleValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -340,10 +340,6 @@ public DateIndexNameProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private ICollection DateFormatsValue { get; set; } private string DateRoundingValue { get; set; } private string? DescriptionValue { get; set; } @@ -353,45 +349,13 @@ public DateIndexNameProcessorDescriptor() : base() private string? IndexNameFormatValue { get; set; } private string? IndexNamePrefixValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private string? TimezoneValue { get; set; } - public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.
Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
///
@@ -482,6 +446,42 @@ public DateIndexNameProcessorDescriptor Locale(string? locale) return Self; } + public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateIndexNameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -500,37 +500,6 @@ public DateIndexNameProcessorDescriptor Timezone(string? timezone) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - writer.WritePropertyName("date_formats"); JsonSerializer.Serialize(writer, DateFormatsValue, options); writer.WritePropertyName("date_rounding"); @@ -573,6 +542,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(LocaleValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs index 00787268799..8b45d759fd0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs @@ -81,56 +81,20 @@ public DateProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private ICollection FormatsValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } private string? TimezoneValue { get; set; } - public DateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DateProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -185,6 +149,42 @@ public DateProcessorDescriptor Locale(string? locale) return Self; } + public DateProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -221,6 +221,34 @@ public DateProcessorDescriptor Timezone(string? timezone) 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); + writer.WritePropertyName("formats"); + JsonSerializer.Serialize(writer, FormatsValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (!string.IsNullOrEmpty(LocaleValue)) + { + writer.WritePropertyName("locale"); + writer.WriteStringValue(LocaleValue); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -252,34 +280,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("formats"); - JsonSerializer.Serialize(writer, FormatsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -310,56 +310,20 @@ public DateProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private ICollection FormatsValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } private string? TimezoneValue { get; set; } - public DateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DateProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -423,6 +387,42 @@ public DateProcessorDescriptor Locale(string? locale) return Self; } + public DateProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -468,6 +468,34 @@ public DateProcessorDescriptor Timezone(string? timezone) 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); + writer.WritePropertyName("formats"); + JsonSerializer.Serialize(writer, FormatsValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (!string.IsNullOrEmpty(LocaleValue)) + { + writer.WritePropertyName("locale"); + writer.WriteStringValue(LocaleValue); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -499,34 +527,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("formats"); - JsonSerializer.Serialize(writer, FormatsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs index 8e420f2db42..2278a6b1264 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs @@ -74,55 +74,19 @@ public DissectProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? AppendSeparatorValue { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string? TagValue { get; set; } - public DissectProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The character(s) that separate the appended fields. /// @@ -177,6 +141,42 @@ public DissectProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public DissectProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DissectProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to apply to the field. /// @@ -195,37 +195,6 @@ public DissectProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(AppendSeparatorValue)) { writer.WritePropertyName("append_separator"); @@ -258,6 +227,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + writer.WritePropertyName("pattern"); writer.WriteStringValue(PatternValue); if (!string.IsNullOrEmpty(TagValue)) @@ -278,55 +278,19 @@ public DissectProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? AppendSeparatorValue { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string? TagValue { get; set; } - public DissectProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The character(s) that separate the appended fields. /// @@ -390,6 +354,42 @@ public DissectProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public DissectProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DissectProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to apply to the field. /// @@ -408,37 +408,6 @@ public DissectProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(AppendSeparatorValue)) { writer.WritePropertyName("append_separator"); @@ -471,6 +440,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + writer.WritePropertyName("pattern"); writer.WriteStringValue(PatternValue); if (!string.IsNullOrEmpty(TagValue)) 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 98c5f14a939..ec7a6b1d997 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 @@ -63,53 +63,17 @@ public DotExpanderProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } - public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DotExpanderProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public DotExpanderProcessorDescriptor IgnoreFailure(bool? ignoreFailu return Self; } + public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The field that contains the field to expand.
Only required if the field to expand is part another object field, because the `field` option can only understand leaf fields.
///
@@ -164,6 +164,26 @@ public DotExpanderProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -195,26 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); @@ -239,53 +239,17 @@ public DotExpanderProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } - public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DotExpanderProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -331,6 +295,42 @@ public DotExpanderProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The field that contains the field to expand.
Only required if the field to expand is part another object field, because the `field` option can only understand leaf fields.
///
@@ -349,6 +349,26 @@ public DotExpanderProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -380,26 +400,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs index b99a91a7621..54a8b26b901 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs @@ -51,15 +51,33 @@ public DropProcessorDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } private string? TagValue { get; set; } + public DropProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public DropProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + public DropProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -96,24 +114,6 @@ public DropProcessorDescriptor OnFailure(params Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public DropProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - public DropProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -123,6 +123,24 @@ public DropProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -154,24 +172,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -190,15 +190,33 @@ public DropProcessorDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } private string? TagValue { get; set; } + public DropProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public DropProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + public DropProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -235,24 +253,6 @@ public DropProcessorDescriptor OnFailure(params Action[] co return Self; } - public DropProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public DropProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - public DropProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -262,6 +262,24 @@ public DropProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -293,24 +311,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs index bd015ff6bdb..8680169880a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs @@ -93,58 +93,22 @@ public EnrichProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 int? MaxMatchesValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string PolicyNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? ShapeRelationValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public EnrichProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -199,6 +163,42 @@ public EnrichProcessorDescriptor MaxMatches(int? maxMatches) return Self; } + public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -253,37 +253,6 @@ public EnrichProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -316,6 +285,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxMatchesValue.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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (OverrideValue.HasValue) { writer.WritePropertyName("override"); @@ -350,58 +350,22 @@ public EnrichProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 int? MaxMatchesValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string PolicyNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? ShapeRelationValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public EnrichProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -465,6 +429,42 @@ public EnrichProcessorDescriptor MaxMatches(int? maxMatches) return Self; } + public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -528,37 +528,6 @@ public EnrichProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string MessageValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } + public FailProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public FailProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// The error message thrown by the processor.
Supports template snippets.
+ ///
+ public FailProcessorDescriptor Message(string message) + { + MessageValue = message; + return Self; + } + public FailProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -103,33 +130,6 @@ public FailProcessorDescriptor OnFailure(params Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public FailProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The error message thrown by the processor.
Supports template snippets.
- ///
- public FailProcessorDescriptor Message(string message) - { - MessageValue = message; - return Self; - } - public FailProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -139,6 +139,26 @@ public FailProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + writer.WritePropertyName("message"); + writer.WriteStringValue(MessageValue); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -170,26 +190,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - writer.WritePropertyName("message"); - writer.WriteStringValue(MessageValue); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -208,16 +208,43 @@ public FailProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string MessageValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } + public FailProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public FailProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// The error message thrown by the processor.
Supports template snippets.
+ ///
+ public FailProcessorDescriptor Message(string message) + { + MessageValue = message; + return Self; + } + public FailProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -254,33 +281,6 @@ public FailProcessorDescriptor OnFailure(params Action[] co return Self; } - public FailProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public FailProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The error message thrown by the processor.
Supports template snippets.
- ///
- public FailProcessorDescriptor Message(string message) - { - MessageValue = message; - return Self; - } - public FailProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -290,6 +290,26 @@ public FailProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + writer.WritePropertyName("message"); + writer.WriteStringValue(MessageValue); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -321,26 +341,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - writer.WritePropertyName("message"); - writer.WriteStringValue(MessageValue); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs index 2d932d7be58..ab2477b9fdd 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs @@ -69,6 +69,11 @@ public ForeachProcessorDescriptor() : 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 ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } @@ -76,13 +81,53 @@ public ForeachProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor ProcessorValue { get; set; } private ProcessorDescriptor ProcessorDescriptor { get; set; } private Action> ProcessorDescriptorAction { get; set; } - 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 string? TagValue { get; set; } + public ForeachProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public ForeachProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. + /// + public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + public ForeachProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -146,51 +191,6 @@ public ForeachProcessorDescriptor Processor(Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ForeachProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. - /// - public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - public ForeachProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -200,6 +200,32 @@ public ForeachProcessorDescriptor Tag(string? tag) 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"); @@ -247,32 +273,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -291,6 +291,11 @@ public ForeachProcessorDescriptor() : 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 ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } @@ -298,13 +303,62 @@ public ForeachProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor ProcessorValue { get; set; } private ProcessorDescriptor ProcessorDescriptor { get; set; } private Action ProcessorDescriptorAction { get; set; } - 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 string? TagValue { get; set; } + public ForeachProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public ForeachProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. + /// + public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + public ForeachProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -368,60 +422,6 @@ public ForeachProcessorDescriptor Processor(Action configur return Self; } - public ForeachProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ForeachProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. - /// - public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - public ForeachProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -431,6 +431,32 @@ public ForeachProcessorDescriptor Tag(string? tag) 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"); @@ -478,32 +504,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); 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 34b4636da11..00a7e6099fa 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 @@ -86,10 +86,6 @@ public GeoIpProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -97,46 +93,14 @@ public GeoIpProcessorDescriptor() : base() private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. /// @@ -200,6 +164,42 @@ public GeoIpProcessorDescriptor IgnoreMissing(bool? ignoreMissing = t return Self; } + public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what properties are added to the `target_field` based on the geoip lookup. /// @@ -236,37 +236,6 @@ public GeoIpProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DatabaseFileValue)) { writer.WritePropertyName("database_file"); @@ -305,6 +274,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -335,10 +335,6 @@ public GeoIpProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -346,46 +342,14 @@ public GeoIpProcessorDescriptor() : base() private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. /// @@ -458,6 +422,42 @@ public GeoIpProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what properties are added to the `target_field` based on the geoip lookup. /// @@ -503,37 +503,6 @@ public GeoIpProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 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? TagValue { get; set; } private bool? TraceMatchValue { get; set; } - public GrokProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GrokProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -176,6 +140,42 @@ public GrokProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tr return Self; } + public GrokProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GrokProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor.
Patterns matching existing names will override the pre-existing definition.
///
@@ -212,6 +212,32 @@ public GrokProcessorDescriptor TraceMatch(bool? traceMatch = true) 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"); @@ -243,32 +269,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PatternDefinitionsValue is not null) { writer.WritePropertyName("pattern_definitions"); @@ -301,56 +301,20 @@ public GrokProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 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? TagValue { get; set; } private bool? TraceMatchValue { get; set; } - public GrokProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GrokProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -405,6 +369,42 @@ public GrokProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public GrokProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GrokProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor.
Patterns matching existing names will override the pre-existing definition.
///
@@ -441,6 +441,32 @@ public GrokProcessorDescriptor TraceMatch(bool? traceMatch = true) 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"); @@ -472,32 +498,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PatternDefinitionsValue is not null) { writer.WritePropertyName("pattern_definitions"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs index e3aa0bb2dd3..9b91faa96e1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs @@ -81,56 +81,20 @@ public GsubProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string ReplacementValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public GsubProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GsubProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -176,6 +140,42 @@ public GsubProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tr return Self; } + public GsubProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GsubProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to be replaced. /// @@ -221,6 +221,32 @@ public GsubProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string ReplacementValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public GsubProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GsubProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -410,6 +374,42 @@ public GsubProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public GsubProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GsubProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to be replaced. /// @@ -464,6 +464,32 @@ public GsubProcessorDescriptor TargetField(Expression? FieldMapValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? InferenceConfigValue { get; set; } private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action> InferenceConfigDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id ModelIdValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? FieldMapValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id ModelIdValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } + public InferenceProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
+ ///
+ public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) + { + FieldMapValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InferenceProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -117,6 +144,15 @@ public InferenceProcessorDescriptor InferenceConfig(Action + /// The ID or alias for the trained model, or the ID of the deployment. + /// + public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) + { + ModelIdValue = modelId; + return Self; + } + public InferenceProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -153,42 +189,6 @@ public InferenceProcessorDescriptor OnFailure(params Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
- ///
- public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) - { - FieldMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InferenceProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - ModelIdValue = modelId; - return Self; - } - public InferenceProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -216,6 +216,30 @@ public InferenceProcessorDescriptor TargetField(Expression? FieldMapValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? InferenceConfigValue { get; set; } private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action InferenceConfigDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id ModelIdValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? FieldMapValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id ModelIdValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } + public InferenceProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
+ ///
+ public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) + { + FieldMapValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InferenceProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -355,6 +382,15 @@ public InferenceProcessorDescriptor InferenceConfig(Action + /// The ID or alias for the trained model, or the ID of the deployment. + /// + public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) + { + ModelIdValue = modelId; + return Self; + } + public InferenceProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -391,42 +427,6 @@ public InferenceProcessorDescriptor OnFailure(params Action return Self; } - public InferenceProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
- ///
- public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) - { - FieldMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InferenceProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - ModelIdValue = modelId; - return Self; - } - public InferenceProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -463,6 +463,30 @@ public InferenceProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public JoinProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public JoinProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -153,6 +117,42 @@ public JoinProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public JoinProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JoinProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The separator character. /// @@ -189,6 +189,26 @@ public JoinProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public JoinProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public JoinProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -359,6 +323,42 @@ public JoinProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public JoinProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JoinProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The separator character. /// @@ -404,6 +404,26 @@ public JoinProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private bool? AddToRootValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategyValue { get; set; } private bool? AllowDuplicateKeysValue { get; set; } @@ -91,45 +87,13 @@ public JsonProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public JsonProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// Flag that forces the parsed JSON to be added at the top level of the document.
`target_field` must not be set when this option is chosen.
///
@@ -193,6 +157,42 @@ public JsonProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public JsonProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JsonProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public JsonProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -220,37 +220,6 @@ public JsonProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (AddToRootValue.HasValue) { writer.WritePropertyName("add_to_root"); @@ -289,6 +258,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreFailureValue.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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -313,10 +313,6 @@ public JsonProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private bool? AddToRootValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategyValue { get; set; } private bool? AllowDuplicateKeysValue { get; set; } @@ -324,45 +320,13 @@ public JsonProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public JsonProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// Flag that forces the parsed JSON to be added at the top level of the document.
`target_field` must not be set when this option is chosen.
///
@@ -435,6 +399,42 @@ public JsonProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public JsonProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JsonProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public JsonProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -471,37 +471,6 @@ public JsonProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private ICollection? ExcludeKeysValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -129,6 +125,10 @@ public KeyValueProcessorDescriptor() : base() private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } private ICollection? IncludeKeysValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? PrefixValue { get; set; } private bool? StripBracketsValue { get; set; } private string? TagValue { get; set; } @@ -137,42 +137,6 @@ public KeyValueProcessorDescriptor() : base() private string? TrimValueValue { get; set; } private string ValueSplitValue { get; set; } - public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public KeyValueProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -245,6 +209,42 @@ public KeyValueProcessorDescriptor IncludeKeys(ICollection? i return Self; } + public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Prefix to be added to extracted keys. /// @@ -317,37 +317,6 @@ public KeyValueProcessorDescriptor ValueSplit(string valueSplit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -388,6 +357,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeKeysValue, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(PrefixValue)) { writer.WritePropertyName("prefix"); @@ -438,10 +438,6 @@ public KeyValueProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private ICollection? ExcludeKeysValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -450,6 +446,10 @@ public KeyValueProcessorDescriptor() : base() private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } private ICollection? IncludeKeysValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? PrefixValue { get; set; } private bool? StripBracketsValue { get; set; } private string? TagValue { get; set; } @@ -458,42 +458,6 @@ public KeyValueProcessorDescriptor() : base() private string? TrimValueValue { get; set; } private string ValueSplitValue { get; set; } - public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public KeyValueProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -575,6 +539,42 @@ public KeyValueProcessorDescriptor IncludeKeys(ICollection? includeKeys) return Self; } + public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Prefix to be added to extracted keys. /// @@ -656,37 +656,6 @@ public KeyValueProcessorDescriptor ValueSplit(string valueSplit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -727,6 +696,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeKeysValue, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(PrefixValue)) { writer.WritePropertyName("prefix"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs index 57864149d50..c0feb30dfb0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs @@ -69,54 +69,18 @@ public LowercaseProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public LowercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public LowercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public LowercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public LowercaseProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public LowercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public LowercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public LowercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public LowercaseProcessorDescriptor TargetField(Expression + /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. + /// + [JsonInclude, JsonPropertyName("_meta")] + public IDictionary Meta { get; set; } + /// /// Description of the ingest pipeline. /// @@ -62,6 +68,8 @@ public PipelineDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private IDictionary MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } @@ -70,9 +78,26 @@ public PipelineDescriptor() : base() private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action> ProcessorsDescriptorAction { get; set; } private Action>[] ProcessorsDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PipelineDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. + /// + public PipelineDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. /// @@ -151,15 +176,6 @@ public PipelineDescriptor Processors(params Action - /// Description of the ingest pipeline. - /// - public PipelineDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. /// @@ -172,6 +188,14 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -234,12 +258,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -258,6 +276,8 @@ public PipelineDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private IDictionary MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } @@ -266,9 +286,26 @@ public PipelineDescriptor() : base() private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action ProcessorsDescriptorAction { get; set; } private Action[] ProcessorsDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PipelineDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. + /// + public PipelineDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. /// @@ -347,15 +384,6 @@ public PipelineDescriptor Processors(params Action[] config return Self; } - /// - /// Description of the ingest pipeline. - /// - public PipelineDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. /// @@ -368,6 +396,14 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -430,12 +466,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs index 1bfb1a1d643..0f3fd55d05e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs @@ -63,53 +63,17 @@ public PipelineProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingPipelineValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public PipelineProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public PipelineProcessorDescriptor Name(Elastic.Clients.Elasticsearch return Self; } + public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public PipelineProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -155,6 +155,32 @@ public PipelineProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingPipelineValue.HasValue) + { + writer.WritePropertyName("ignore_missing_pipeline"); + writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); + } + + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -186,32 +212,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingPipelineValue.HasValue) - { - writer.WritePropertyName("ignore_missing_pipeline"); - writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -230,53 +230,17 @@ public PipelineProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingPipelineValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public PipelineProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -313,6 +277,42 @@ public PipelineProcessorDescriptor Name(Elastic.Clients.Elasticsearch.Serverless return Self; } + public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public PipelineProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -322,6 +322,32 @@ public PipelineProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingPipelineValue.HasValue) + { + writer.WritePropertyName("ignore_missing_pipeline"); + writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); + } + + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -353,32 +379,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingPipelineValue.HasValue) - { - writer.WritePropertyName("ignore_missing_pipeline"); - writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); 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 72fb9d37b61..1729718a598 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 @@ -70,6 +70,7 @@ internal Processor(string variantName, object variant) public static Processor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => new Processor("pipeline", pipelineProcessor); 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); public static Processor Set(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetProcessor setProcessor) => new Processor("set", setProcessor); public static Processor SetSecurityUser(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetSecurityUserProcessor setSecurityUserProcessor) => new Processor("set_security_user", setSecurityUserProcessor); public static Processor Sort(Elastic.Clients.Elasticsearch.Serverless.Ingest.SortProcessor sortProcessor) => new Processor("sort", sortProcessor); @@ -272,6 +273,13 @@ public override Processor Read(ref Utf8JsonReader reader, Type typeToConvert, Js return new Processor(propertyName, variant); } + if (propertyName == "reroute") + { + var variant = JsonSerializer.Deserialize(ref reader, options); + reader.Read(); + return new Processor(propertyName, variant); + } + if (propertyName == "set") { var variant = JsonSerializer.Deserialize(ref reader, options); @@ -414,6 +422,9 @@ public override void Write(Utf8JsonWriter writer, Processor value, JsonSerialize case "rename": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor)value.Variant, options); break; + case "reroute": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RerouteProcessor)value.Variant, options); + break; case "set": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.SetProcessor)value.Variant, options); break; @@ -526,6 +537,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Remove(Action> configure) => Set(configure, "remove"); public ProcessorDescriptor Rename(RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); public ProcessorDescriptor Rename(Action> configure) => Set(configure, "rename"); + public ProcessorDescriptor Reroute(RerouteProcessor rerouteProcessor) => Set(rerouteProcessor, "reroute"); + public ProcessorDescriptor Reroute(Action> configure) => Set(configure, "reroute"); public ProcessorDescriptor Set(SetProcessor setProcessor) => Set(setProcessor, "set"); public ProcessorDescriptor Set(Action> configure) => Set(configure, "set"); public ProcessorDescriptor SetSecurityUser(SetSecurityUserProcessor setSecurityUserProcessor) => Set(setSecurityUserProcessor, "set_security_user"); @@ -671,6 +684,9 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Rename(RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); public ProcessorDescriptor Rename(Action configure) => Set(configure, "rename"); public ProcessorDescriptor Rename(Action> configure) => Set(configure, "rename"); + public ProcessorDescriptor Reroute(RerouteProcessor rerouteProcessor) => Set(rerouteProcessor, "reroute"); + public ProcessorDescriptor Reroute(Action configure) => Set(configure, "reroute"); + public ProcessorDescriptor Reroute(Action> configure) => Set(configure, "reroute"); public ProcessorDescriptor Set(SetProcessor setProcessor) => Set(setProcessor, "set"); public ProcessorDescriptor Set(Action configure) => Set(configure, "set"); public ProcessorDescriptor Set(Action> configure) => Set(configure, "set"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs index cd9cab16103..3504455066b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs @@ -63,53 +63,17 @@ public RemoveProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RemoveProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public RemoveProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RemoveProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -155,6 +155,32 @@ public RemoveProcessorDescriptor Tag(string? tag) 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"); @@ -186,32 +212,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -230,53 +230,17 @@ public RemoveProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RemoveProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -313,6 +277,42 @@ public RemoveProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RemoveProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -322,6 +322,32 @@ public RemoveProcessorDescriptor Tag(string? tag) 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"); @@ -353,32 +379,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs index 15cf0b342c0..de1ea2cb0ed 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs @@ -69,54 +69,18 @@ public RenameProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - public RenameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RenameProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public RenameProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public RenameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RenameProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RenameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public RenameProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - public RenameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RenameProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -368,6 +332,42 @@ public RenameProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public RenameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RenameProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RenameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -404,6 +404,32 @@ public RenameProcessorDescriptor TargetField(Expression + /// Field references or a static value for the dataset part of the data stream name.
In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
Example values are nginx.access and nginx.error.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.dataset}} + /// + [JsonInclude, JsonPropertyName("dataset")] + [SingleOrManyCollectionConverter(typeof(string))] + public ICollection? Dataset { get; set; } + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// A static value for the target. Can’t be set when the dataset or namespace option is set. + /// + [JsonInclude, JsonPropertyName("destination")] + public string? Destination { get; set; } + [JsonInclude, JsonPropertyName("if")] + public string? If { get; set; } + [JsonInclude, JsonPropertyName("ignore_failure")] + public bool? IgnoreFailure { get; set; } + + /// + /// Field references or a static value for the namespace part of the data stream name. See the criteria for
index names for allowed characters. Must be no longer than 100 characters.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.namespace}} + ///
+ [JsonInclude, JsonPropertyName("namespace")] + [SingleOrManyCollectionConverter(typeof(string))] + public ICollection? Namespace { get; set; } + [JsonInclude, JsonPropertyName("on_failure")] + public ICollection? OnFailure { get; set; } + [JsonInclude, JsonPropertyName("tag")] + public string? Tag { get; set; } + + public static implicit operator Processor(RerouteProcessor rerouteProcessor) => Ingest.Processor.Reroute(rerouteProcessor); +} + +public sealed partial class RerouteProcessorDescriptor : SerializableDescriptor> +{ + internal RerouteProcessorDescriptor(Action> configure) => configure.Invoke(this); + + public RerouteProcessorDescriptor() : base() + { + } + + private ICollection? DatasetValue { get; set; } + private string? DescriptionValue { get; set; } + private string? DestinationValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private ICollection? NamespaceValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } + private string? TagValue { get; set; } + + /// + /// Field references or a static value for the dataset part of the data stream name.
In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
Example values are nginx.access and nginx.error.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.dataset}} + ///
+ public RerouteProcessorDescriptor Dataset(ICollection? dataset) + { + DatasetValue = dataset; + return Self; + } + + public RerouteProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// A static value for the target. Can’t be set when the dataset or namespace option is set. + /// + public RerouteProcessorDescriptor Destination(string? destination) + { + DestinationValue = destination; + return Self; + } + + public RerouteProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public RerouteProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// Field references or a static value for the namespace part of the data stream name. See the criteria for
index names for allowed characters. Must be no longer than 100 characters.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.namespace}} + ///
+ public RerouteProcessorDescriptor Namespace(ICollection? @namespace) + { + NamespaceValue = @namespace; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RerouteProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DatasetValue is not null) + { + writer.WritePropertyName("dataset"); + SingleOrManySerializationHelper.Serialize(DatasetValue, writer, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(DestinationValue)) + { + writer.WritePropertyName("destination"); + writer.WriteStringValue(DestinationValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (NamespaceValue is not null) + { + writer.WritePropertyName("namespace"); + SingleOrManySerializationHelper.Serialize(NamespaceValue, writer, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class RerouteProcessorDescriptor : SerializableDescriptor +{ + internal RerouteProcessorDescriptor(Action configure) => configure.Invoke(this); + + public RerouteProcessorDescriptor() : base() + { + } + + private ICollection? DatasetValue { get; set; } + private string? DescriptionValue { get; set; } + private string? DestinationValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private ICollection? NamespaceValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } + private string? TagValue { get; set; } + + /// + /// Field references or a static value for the dataset part of the data stream name.
In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
Example values are nginx.access and nginx.error.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.dataset}} + ///
+ public RerouteProcessorDescriptor Dataset(ICollection? dataset) + { + DatasetValue = dataset; + return Self; + } + + public RerouteProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// A static value for the target. Can’t be set when the dataset or namespace option is set. + /// + public RerouteProcessorDescriptor Destination(string? destination) + { + DestinationValue = destination; + return Self; + } + + public RerouteProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public RerouteProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// Field references or a static value for the namespace part of the data stream name. See the criteria for
index names for allowed characters. Must be no longer than 100 characters.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.namespace}} + ///
+ public RerouteProcessorDescriptor Namespace(ICollection? @namespace) + { + NamespaceValue = @namespace; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RerouteProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DatasetValue is not null) + { + writer.WritePropertyName("dataset"); + SingleOrManySerializationHelper.Serialize(DatasetValue, writer, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(DestinationValue)) + { + writer.WritePropertyName("destination"); + writer.WriteStringValue(DestinationValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (NamespaceValue is not null) + { + writer.WritePropertyName("namespace"); + SingleOrManySerializationHelper.Serialize(NamespaceValue, writer, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs index b8996821696..8081472ac34 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs @@ -86,10 +86,6 @@ public SetProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? CopyFromValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -97,46 +93,14 @@ public SetProcessorDescriptor() : base() private bool? IgnoreEmptyValueValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? MediaTypeValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string? TagValue { get; set; } private object? ValueValue { get; set; } - public SetProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
Supported data types are `boolean`, `number`, `array`, `object`, `string`, `date`, etc.
///
@@ -209,6 +173,42 @@ public SetProcessorDescriptor MediaType(string? mediaType) return Self; } + public SetProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If `true` processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -236,37 +236,6 @@ public SetProcessorDescriptor Value(object? value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (CopyFromValue is not null) { writer.WritePropertyName("copy_from"); @@ -305,6 +274,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(MediaTypeValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (OverrideValue.HasValue) { writer.WritePropertyName("override"); @@ -335,10 +335,6 @@ public SetProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? CopyFromValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -346,46 +342,14 @@ public SetProcessorDescriptor() : base() private bool? IgnoreEmptyValueValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? MediaTypeValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string? TagValue { get; set; } private object? ValueValue { get; set; } - public SetProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
Supported data types are `boolean`, `number`, `array`, `object`, `string`, `date`, etc.
///
@@ -476,6 +440,42 @@ public SetProcessorDescriptor MediaType(string? mediaType) return Self; } + public SetProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If `true` processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -503,37 +503,6 @@ public SetProcessorDescriptor Value(object? value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (CopyFromValue is not null) { writer.WritePropertyName("copy_from"); @@ -572,6 +541,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(MediaTypeValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (OverrideValue.HasValue) { writer.WritePropertyName("override"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs index 4713858c2c9..464dc7255e4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs @@ -63,53 +63,17 @@ public SetSecurityUserProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } - public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SetSecurityUserProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public SetSecurityUserProcessorDescriptor IgnoreFailure(bool? ignoreF return Self; } + public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what user related properties are added to the field. /// @@ -164,6 +164,26 @@ public SetSecurityUserProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -195,26 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -239,53 +239,17 @@ public SetSecurityUserProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } - public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SetSecurityUserProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -331,6 +295,42 @@ public SetSecurityUserProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what user related properties are added to the field. /// @@ -349,6 +349,26 @@ public SetSecurityUserProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -380,26 +400,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PropertiesValue is not null) { writer.WritePropertyName("properties"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs index d1c91dd5829..36bc5e9520a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs @@ -69,54 +69,18 @@ public SortProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public SortProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SortProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SortProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SortProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -153,6 +117,42 @@ public SortProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public SortProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SortProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SortProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The sort order to use.
Accepts `"asc"` or `"desc"`.
///
@@ -189,6 +189,26 @@ public SortProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public SortProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SortProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SortProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SortProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -363,6 +327,42 @@ public SortProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public SortProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SortProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SortProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The sort order to use.
Accepts `"asc"` or `"desc"`.
///
@@ -408,6 +408,26 @@ public SortProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private bool? PreserveTrailingValue { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public SplitProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SplitProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -176,6 +140,42 @@ public SplitProcessorDescriptor IgnoreMissing(bool? ignoreMissing = t return Self; } + public SplitProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SplitProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Preserves empty trailing fields, if any. /// @@ -221,6 +221,32 @@ public SplitProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private bool? PreserveTrailingValue { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public SplitProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SplitProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -414,6 +378,42 @@ public SplitProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public SplitProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SplitProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Preserves empty trailing fields, if any. /// @@ -468,6 +468,32 @@ public SplitProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public TrimProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public TrimProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public TrimProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tr return Self; } + public TrimProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public TrimProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public TrimProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public TrimProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public TrimProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public TrimProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public TrimProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public TrimProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public TrimProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public TrimProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public TrimProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UppercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public UppercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UppercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public UppercaseProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UppercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public UppercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UppercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public UppercaseProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UrlDecodeProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public UrlDecodeProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UrlDecodeProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public UrlDecodeProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UrlDecodeProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public UrlDecodeProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UrlDecodeProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public UrlDecodeProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? OptionsValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UserAgentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -172,6 +136,42 @@ public UserAgentProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UserAgentProcessorDescriptor Options(ICollection? options) { OptionsValue = options; @@ -214,6 +214,32 @@ public UserAgentProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? OptionsValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UserAgentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -411,6 +375,42 @@ public UserAgentProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UserAgentProcessorDescriptor Options(ICollection? options) { OptionsValue = options; @@ -462,6 +462,32 @@ public UserAgentProcessorDescriptor TargetField(Expression /// Filters for the kNN search query /// - [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? Filter { get; set; } /// @@ -86,12 +87,12 @@ public KnnQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private long kValue { get; set; } private long NumCandidatesValue { get; set; } private ICollection? QueryVectorValue { get; set; } @@ -100,6 +101,33 @@ public KnnQueryDescriptor() : base() private Action QueryVectorBuilderDescriptorAction { get; set; } private float? SimilarityValue { get; set; } + /// + /// Boost value to apply to kNN scores + /// + public KnnQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// Filters for the kNN search query /// @@ -139,33 +167,6 @@ public KnnQueryDescriptor Filter(params Action - /// Boost value to apply to kNN scores - /// - public KnnQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The final number of nearest neighbors to return as top hits /// @@ -232,6 +233,14 @@ public KnnQueryDescriptor Similarity(float? similarity) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -261,14 +270,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WritePropertyName("k"); writer.WriteNumberValue(kValue); writer.WritePropertyName("num_candidates"); @@ -313,12 +314,12 @@ public KnnQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private long kValue { get; set; } private long NumCandidatesValue { get; set; } private ICollection? QueryVectorValue { get; set; } @@ -327,6 +328,42 @@ public KnnQueryDescriptor() : base() private Action QueryVectorBuilderDescriptorAction { get; set; } private float? SimilarityValue { get; set; } + /// + /// Boost value to apply to kNN scores + /// + public KnnQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// Filters for the kNN search query /// @@ -366,42 +403,6 @@ public KnnQueryDescriptor Filter(params Action[] confi return Self; } - /// - /// Boost value to apply to kNN scores - /// - public KnnQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The final number of nearest neighbors to return as top hits /// @@ -468,6 +469,14 @@ public KnnQueryDescriptor Similarity(float? similarity) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -497,14 +506,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WritePropertyName("k"); writer.WriteNumberValue(kValue); writer.WritePropertyName("num_candidates"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs index b487e4e7fa4..314811f77f6 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -72,11 +72,11 @@ public CompletionPropertyDescriptor() : base() { } + private string? AnalyzerValue { get; set; } private ICollection? ContextsValue { get; set; } private SuggestContextDescriptor ContextsDescriptor { get; set; } private Action> ContextsDescriptorAction { get; set; } private Action>[] ContextsDescriptorActions { get; set; } - private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } private bool? DocValuesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } @@ -91,6 +91,12 @@ public CompletionPropertyDescriptor() : base() private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + public CompletionPropertyDescriptor Analyzer(string? analyzer) + { + AnalyzerValue = analyzer; + return Self; + } + public CompletionPropertyDescriptor Contexts(ICollection? contexts) { ContextsDescriptor = null; @@ -127,12 +133,6 @@ public CompletionPropertyDescriptor Contexts(params Action Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - public CompletionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) { CopyToValue = copyTo; @@ -242,6 +242,12 @@ public CompletionPropertyDescriptor Store(bool? store = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(AnalyzerValue)) + { + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); + } + if (ContextsDescriptor is not null) { writer.WritePropertyName("contexts"); @@ -273,12 +279,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ContextsValue, options); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - if (CopyToValue is not null) { writer.WritePropertyName("copy_to"); @@ -390,11 +390,11 @@ public CompletionPropertyDescriptor() : base() { } + private string? AnalyzerValue { get; set; } private ICollection? ContextsValue { get; set; } private SuggestContextDescriptor ContextsDescriptor { get; set; } private Action ContextsDescriptorAction { get; set; } private Action[] ContextsDescriptorActions { get; set; } - private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } private bool? DocValuesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } @@ -409,6 +409,12 @@ public CompletionPropertyDescriptor() : base() private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + public CompletionPropertyDescriptor Analyzer(string? analyzer) + { + AnalyzerValue = analyzer; + return Self; + } + public CompletionPropertyDescriptor Contexts(ICollection? contexts) { ContextsDescriptor = null; @@ -445,12 +451,6 @@ public CompletionPropertyDescriptor Contexts(params Action ShortNumber(PropertyName propertyName, ShortNumberProperty shortNumberProperty) => AssignVariant(propertyName, shortNumberProperty); public PropertiesDescriptor ShortNumber(Expression> propertyName) => AssignVariant, ShortNumberProperty>(propertyName, null); public PropertiesDescriptor ShortNumber(Expression> propertyName, Action> configure) => AssignVariant, ShortNumberProperty>(propertyName, configure); + public PropertiesDescriptor SparseVector(PropertyName propertyName) => AssignVariant, SparseVectorProperty>(propertyName, null); + public PropertiesDescriptor SparseVector(PropertyName propertyName, Action> configure) => AssignVariant, SparseVectorProperty>(propertyName, configure); + public PropertiesDescriptor SparseVector(PropertyName propertyName, SparseVectorProperty sparseVectorProperty) => AssignVariant(propertyName, sparseVectorProperty); + public PropertiesDescriptor SparseVector(Expression> propertyName) => AssignVariant, SparseVectorProperty>(propertyName, null); + public PropertiesDescriptor SparseVector(Expression> propertyName, Action> configure) => AssignVariant, SparseVectorProperty>(propertyName, configure); public PropertiesDescriptor Text(PropertyName propertyName) => AssignVariant, TextProperty>(propertyName, null); public PropertiesDescriptor Text(PropertyName propertyName, Action> configure) => AssignVariant, TextProperty>(propertyName, configure); public PropertiesDescriptor Text(PropertyName propertyName, TextProperty textProperty) => AssignVariant(propertyName, textProperty); @@ -370,6 +375,8 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "flattened": return JsonSerializer.Deserialize(ref reader, options); + case "sparse_vector": + return JsonSerializer.Deserialize(ref reader, options); case "dense_vector": return JsonSerializer.Deserialize(ref reader, options); case "aggregate_metric_double": @@ -509,6 +516,9 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "flattened": JsonSerializer.Serialize(writer, value, typeof(FlattenedProperty), options); return; + case "sparse_vector": + JsonSerializer.Serialize(writer, value, typeof(SparseVectorProperty), options); + return; case "dense_vector": JsonSerializer.Serialize(writer, value, typeof(DenseVectorProperty), options); return; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs new file mode 100644 index 00000000000..25969bd0f28 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs @@ -0,0 +1,285 @@ +// 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 SparseVectorProperty : IProperty +{ + [JsonInclude, JsonPropertyName("dynamic")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } + [JsonInclude, JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } + [JsonInclude, JsonPropertyName("ignore_above")] + public int? IgnoreAbove { get; set; } + [JsonInclude, JsonPropertyName("meta")] + public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("properties")] + public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "sparse_vector"; +} + +public sealed partial class SparseVectorPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor +{ + internal SparseVectorPropertyDescriptor(Action> configure) => configure.Invoke(this); + + public SparseVectorPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } + + public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + public SparseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("sparse_vector"); + writer.WriteEndObject(); + } + + SparseVectorProperty IBuildableDescriptor.Build() => new() + { + Dynamic = DynamicValue, + Fields = FieldsValue, + IgnoreAbove = IgnoreAboveValue, + Meta = MetaValue, + Properties = PropertiesValue + }; +} + +public sealed partial class SparseVectorPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SparseVectorPropertyDescriptor(Action configure) => configure.Invoke(this); + + public SparseVectorPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } + + public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + public SparseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("sparse_vector"); + writer.WriteEndObject(); + } + + SparseVectorProperty IBuildableDescriptor.Build() => new() + { + Dynamic = DynamicValue, + Fields = FieldsValue, + IgnoreAbove = IgnoreAboveValue, + Meta = MetaValue, + Properties = PropertiesValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs index c4bb339f44f..1c528966cdb 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs @@ -71,285 +71,301 @@ public TypeMappingDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllFieldValue { get; set; } + private AllFieldDescriptor AllFieldDescriptor { get; set; } + private Action AllFieldDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? DataStreamTimestampValue { get; set; } private DataStreamTimestampDescriptor DataStreamTimestampDescriptor { get; set; } private Action DataStreamTimestampDescriptorAction { get; set; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } + private bool? EnabledValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } private FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexFieldValue { get; set; } + private IndexFieldDescriptor IndexFieldDescriptor { get; set; } + private Action IndexFieldDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } private RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? SizeValue { get; set; } private SizeFieldDescriptor SizeDescriptor { get; set; } private Action SizeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } private SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllFieldValue { get; set; } - private AllFieldDescriptor AllFieldDescriptor { get; set; } - private Action AllFieldDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexFieldValue { get; set; } - private IndexFieldDescriptor IndexFieldDescriptor { get; set; } - private Action IndexFieldDescriptorAction { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? dataStreamTimestamp) + public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? allField) { - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampValue = dataStreamTimestamp; + AllFieldDescriptor = null; + AllFieldDescriptorAction = null; + AllFieldValue = allField; return Self; } - public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) + public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampDescriptor = descriptor; + AllFieldValue = null; + AllFieldDescriptorAction = null; + AllFieldDescriptor = descriptor; return Self; } - public TypeMappingDescriptor DataStreamTimestamp(Action configure) + public TypeMappingDescriptor AllField(Action configure) { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = configure; + AllFieldValue = null; + AllFieldDescriptor = null; + AllFieldDescriptorAction = configure; return Self; } - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) + public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? dataStreamTimestamp) { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampValue = dataStreamTimestamp; return Self; } - public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) + public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampDescriptor = descriptor; return Self; } - public TypeMappingDescriptor FieldNames(Action configure) + public TypeMappingDescriptor DataStreamTimestamp(Action configure) { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) + public TypeMappingDescriptor DateDetection(bool? dateDetection = true) { - MetaValue = selector?.Invoke(new FluentDictionary()); + DateDetectionValue = dateDetection; return Self; } - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) + public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; + DynamicValue = dynamic; return Self; } - public TypeMappingDescriptor Routing(RoutingFieldDescriptor descriptor) + public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } - public TypeMappingDescriptor Routing(Action configure) + public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; + DynamicTemplatesValue = dynamicTemplates; return Self; } - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? size) + public TypeMappingDescriptor Enabled(bool? enabled = true) { - SizeDescriptor = null; - SizeDescriptorAction = null; - SizeValue = size; + EnabledValue = enabled; return Self; } - public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) + public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) { - SizeValue = null; - SizeDescriptorAction = null; - SizeDescriptor = descriptor; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - public TypeMappingDescriptor Size(Action configure) + public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) { - SizeValue = null; - SizeDescriptor = null; - SizeDescriptorAction = configure; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) + public TypeMappingDescriptor FieldNames(Action configure) { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) + public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? indexField) { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; + IndexFieldDescriptor = null; + IndexFieldDescriptorAction = null; + IndexFieldValue = indexField; return Self; } - public TypeMappingDescriptor Source(Action configure) + public TypeMappingDescriptor IndexField(IndexFieldDescriptor descriptor) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + IndexFieldValue = null; + IndexFieldDescriptorAction = null; + IndexFieldDescriptor = descriptor; return Self; } - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? allField) + public TypeMappingDescriptor IndexField(Action configure) { - AllFieldDescriptor = null; - AllFieldDescriptorAction = null; - AllFieldValue = allField; + IndexFieldValue = null; + IndexFieldDescriptor = null; + IndexFieldDescriptorAction = configure; return Self; } - public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) + public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) { - AllFieldValue = null; - AllFieldDescriptorAction = null; - AllFieldDescriptor = descriptor; + MetaValue = selector?.Invoke(new FluentDictionary()); return Self; } - public TypeMappingDescriptor AllField(Action configure) + public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) { - AllFieldValue = null; - AllFieldDescriptor = null; - AllFieldDescriptorAction = configure; + NumericDetectionValue = numericDetection; return Self; } - public TypeMappingDescriptor DateDetection(bool? dateDetection = true) + public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) { - DateDetectionValue = dateDetection; + PropertiesValue = properties; return Self; } - public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + public TypeMappingDescriptor Properties(PropertiesDescriptor descriptor) { - DynamicValue = dynamic; + PropertiesValue = descriptor.PromisedValue; return Self; } - public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public TypeMappingDescriptor Properties(Action> configure) { - DynamicDateFormatsValue = dynamicDateFormats; + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; return Self; } - public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) { - DynamicTemplatesValue = dynamicTemplates; + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; return Self; } - public TypeMappingDescriptor Enabled(bool? enabled = true) + public TypeMappingDescriptor Routing(RoutingFieldDescriptor descriptor) { - EnabledValue = enabled; + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; return Self; } - public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? indexField) + public TypeMappingDescriptor Routing(Action configure) { - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = null; - IndexFieldValue = indexField; + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; return Self; } - public TypeMappingDescriptor IndexField(IndexFieldDescriptor descriptor) + public TypeMappingDescriptor Runtime(Func, FluentDictionary> selector) { - IndexFieldValue = null; - IndexFieldDescriptorAction = null; - IndexFieldDescriptor = descriptor; + RuntimeValue = selector?.Invoke(new FluentDictionary()); return Self; } - public TypeMappingDescriptor IndexField(Action configure) + public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? size) { - IndexFieldValue = null; - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = configure; + SizeDescriptor = null; + SizeDescriptorAction = null; + SizeValue = size; return Self; } - public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) + public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) { - NumericDetectionValue = numericDetection; + SizeValue = null; + SizeDescriptorAction = null; + SizeDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) + public TypeMappingDescriptor Size(Action configure) { - PropertiesValue = properties; + SizeValue = null; + SizeDescriptor = null; + SizeDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Properties(PropertiesDescriptor descriptor) + public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) { - PropertiesValue = descriptor.PromisedValue; + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; return Self; } - public TypeMappingDescriptor Properties(Action> configure) + public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) { - var descriptor = new PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Runtime(Func, FluentDictionary> selector) + public TypeMappingDescriptor Source(Action configure) { - RuntimeValue = selector?.Invoke(new FluentDictionary()); + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (DataStreamTimestampDescriptor is not null) + if (AllFieldDescriptor is not null) { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, DataStreamTimestampDescriptor, options); + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldDescriptor, options); } - else if (DataStreamTimestampDescriptorAction is not null) + else if (AllFieldDescriptorAction is not null) { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, new DataStreamTimestampDescriptor(DataStreamTimestampDescriptorAction), options); + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); + } + else if (AllFieldValue is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldValue, options); + } + + if (DataStreamTimestampDescriptor is not null) + { + writer.WritePropertyName("_data_stream_timestamp"); + JsonSerializer.Serialize(writer, DataStreamTimestampDescriptor, options); + } + else if (DataStreamTimestampDescriptorAction is not null) + { + writer.WritePropertyName("_data_stream_timestamp"); + JsonSerializer.Serialize(writer, new DataStreamTimestampDescriptor(DataStreamTimestampDescriptorAction), options); } else if (DataStreamTimestampValue is not null) { @@ -357,6 +373,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamTimestampValue, options); } + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); + } + + if (EnabledValue.HasValue) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(EnabledValue.Value); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -373,12 +419,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldNamesValue, options); } + if (IndexFieldDescriptor is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); + } + else if (IndexFieldDescriptorAction is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); + } + else if (IndexFieldValue is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldValue, options); + } + if (MetaValue is not null) { writer.WritePropertyName("_meta"); JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -395,6 +469,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SizeDescriptor is not null) { writer.WritePropertyName("_size"); @@ -427,86 +507,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (AllFieldDescriptor is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldDescriptor, options); - } - else if (AllFieldDescriptorAction is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); - } - else if (AllFieldValue is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldValue, options); - } - - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (IndexFieldDescriptor is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); - } - else if (IndexFieldDescriptorAction is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); - } - else if (IndexFieldValue is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - writer.WriteEndObject(); } } @@ -519,214 +519,136 @@ public TypeMappingDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllFieldValue { get; set; } + private AllFieldDescriptor AllFieldDescriptor { get; set; } + private Action AllFieldDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? DataStreamTimestampValue { get; set; } private DataStreamTimestampDescriptor DataStreamTimestampDescriptor { get; set; } private Action DataStreamTimestampDescriptorAction { get; set; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } + private bool? EnabledValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } private FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexFieldValue { get; set; } + private IndexFieldDescriptor IndexFieldDescriptor { get; set; } + private Action IndexFieldDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } private RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? SizeValue { get; set; } private SizeFieldDescriptor SizeDescriptor { get; set; } private Action SizeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } private SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllFieldValue { get; set; } - private AllFieldDescriptor AllFieldDescriptor { get; set; } - private Action AllFieldDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexFieldValue { get; set; } - private IndexFieldDescriptor IndexFieldDescriptor { get; set; } - private Action IndexFieldDescriptorAction { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } - - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? dataStreamTimestamp) - { - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampValue = dataStreamTimestamp; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Action configure) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor FieldNames(Action configure) - { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public TypeMappingDescriptor Routing(RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? size) + public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? allField) { - SizeDescriptor = null; - SizeDescriptorAction = null; - SizeValue = size; + AllFieldDescriptor = null; + AllFieldDescriptorAction = null; + AllFieldValue = allField; return Self; } - public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) + public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) { - SizeValue = null; - SizeDescriptorAction = null; - SizeDescriptor = descriptor; + AllFieldValue = null; + AllFieldDescriptorAction = null; + AllFieldDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Size(Action configure) + public TypeMappingDescriptor AllField(Action configure) { - SizeValue = null; - SizeDescriptor = null; - SizeDescriptorAction = configure; + AllFieldValue = null; + AllFieldDescriptor = null; + AllFieldDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) + public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? dataStreamTimestamp) { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampValue = dataStreamTimestamp; return Self; } - public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) + public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Source(Action configure) + public TypeMappingDescriptor DataStreamTimestamp(Action configure) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = configure; return Self; } - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? allField) + public TypeMappingDescriptor DateDetection(bool? dateDetection = true) { - AllFieldDescriptor = null; - AllFieldDescriptorAction = null; - AllFieldValue = allField; + DateDetectionValue = dateDetection; return Self; } - public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) + public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) { - AllFieldValue = null; - AllFieldDescriptorAction = null; - AllFieldDescriptor = descriptor; + DynamicValue = dynamic; return Self; } - public TypeMappingDescriptor AllField(Action configure) + public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - AllFieldValue = null; - AllFieldDescriptor = null; - AllFieldDescriptorAction = configure; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } - public TypeMappingDescriptor DateDetection(bool? dateDetection = true) + public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - DateDetectionValue = dateDetection; + DynamicTemplatesValue = dynamicTemplates; return Self; } - public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) + public TypeMappingDescriptor Enabled(bool? enabled = true) { - DynamicValue = dynamic; + EnabledValue = enabled; return Self; } - public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) { - DynamicDateFormatsValue = dynamicDateFormats; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) { - DynamicTemplatesValue = dynamicTemplates; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Enabled(bool? enabled = true) + public TypeMappingDescriptor FieldNames(Action configure) { - EnabledValue = enabled; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } @@ -754,6 +676,12 @@ public TypeMappingDescriptor IndexField(Action configure) return Self; } + public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) { NumericDetectionValue = numericDetection; @@ -780,15 +708,103 @@ public TypeMappingDescriptor Properties(Action configure) + { + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; + return Self; + } + public TypeMappingDescriptor Runtime(Func, FluentDictionary> selector) { RuntimeValue = selector?.Invoke(new FluentDictionary()); return Self; } + public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? size) + { + SizeDescriptor = null; + SizeDescriptorAction = null; + SizeValue = size; + return Self; + } + + public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) + { + SizeValue = null; + SizeDescriptorAction = null; + SizeDescriptor = descriptor; + return Self; + } + + public TypeMappingDescriptor Size(Action configure) + { + SizeValue = null; + SizeDescriptor = null; + SizeDescriptorAction = configure; + return Self; + } + + public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public TypeMappingDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllFieldDescriptor is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldDescriptor, options); + } + else if (AllFieldDescriptorAction is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); + } + else if (AllFieldValue is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldValue, options); + } + if (DataStreamTimestampDescriptor is not null) { writer.WritePropertyName("_data_stream_timestamp"); @@ -805,6 +821,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamTimestampValue, options); } + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); + } + + if (EnabledValue.HasValue) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(EnabledValue.Value); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -821,12 +867,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldNamesValue, options); } + if (IndexFieldDescriptor is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); + } + else if (IndexFieldDescriptorAction is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); + } + else if (IndexFieldValue is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldValue, options); + } + if (MetaValue is not null) { writer.WritePropertyName("_meta"); JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -843,6 +917,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SizeDescriptor is not null) { writer.WritePropertyName("_size"); @@ -875,86 +955,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (AllFieldDescriptor is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldDescriptor, options); - } - else if (AllFieldDescriptorAction is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); - } - else if (AllFieldValue is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldValue, options); - } - - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (IndexFieldDescriptor is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); - } - else if (IndexFieldDescriptorAction is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); - } - else if (IndexFieldValue is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs index 983a4e7dd6f..5ebfb0894ed 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs @@ -50,10 +50,10 @@ public NestedSortValueDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action> NestedDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) @@ -80,6 +80,12 @@ public NestedSortValueDescriptor Filter(Action MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) { NestedDescriptor = null; @@ -104,12 +110,6 @@ public NestedSortValueDescriptor Nested(Action MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - public NestedSortValueDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) { PathValue = path; @@ -141,6 +141,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -157,12 +163,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - writer.WritePropertyName("path"); JsonSerializer.Serialize(writer, PathValue, options); writer.WriteEndObject(); @@ -180,10 +180,10 @@ public NestedSortValueDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action NestedDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) @@ -210,6 +210,12 @@ public NestedSortValueDescriptor Filter(Action configu return Self; } + public NestedSortValueDescriptor MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) { NestedDescriptor = null; @@ -234,12 +240,6 @@ public NestedSortValueDescriptor Nested(Action config return Self; } - public NestedSortValueDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - public NestedSortValueDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) { PathValue = path; @@ -277,6 +277,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -293,12 +299,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - writer.WritePropertyName("path"); JsonSerializer.Serialize(writer, PathValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs index a331dc7d266..838cfc89731 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs @@ -37,7 +37,8 @@ public sealed partial class BoolQuery : SearchQuery /// /// The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
///
- [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? Filter { get; set; } /// @@ -49,19 +50,22 @@ public sealed partial class BoolQuery : SearchQuery /// /// The clause (query) must appear in matching documents and will contribute to the score. /// - [JsonInclude, JsonPropertyName("must"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("must")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? Must { get; set; } /// /// The clause (query) must not appear in the matching documents.
Because scoring is ignored, a score of `0` is returned for all documents.
///
- [JsonInclude, JsonPropertyName("must_not"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("must_not")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? MustNot { get; set; } /// /// The clause (query) should appear in the matching document. /// - [JsonInclude, JsonPropertyName("should"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("should")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? Should { get; set; } public static implicit operator Query(BoolQuery boolQuery) => QueryDsl.Query.Bool(boolQuery); @@ -77,10 +81,12 @@ public BoolQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private ICollection? MustValue { get; set; } private QueryDescriptor MustDescriptor { get; set; } private Action> MustDescriptorAction { get; set; } @@ -89,13 +95,17 @@ public BoolQueryDescriptor() : base() private QueryDescriptor MustNotDescriptor { get; set; } private Action> MustNotDescriptorAction { get; set; } private Action>[] MustNotDescriptorActions { get; set; } + private string? QueryNameValue { get; set; } private ICollection? ShouldValue { get; set; } private QueryDescriptor ShouldDescriptor { get; set; } private Action> ShouldDescriptorAction { get; set; } private Action>[] ShouldDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } + + public BoolQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
@@ -136,6 +146,15 @@ public BoolQueryDescriptor Filter(params Action + /// Specifies the number or percentage of `should` clauses returned documents must match. + ///
+ public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The clause (query) must appear in matching documents and will contribute to the score. /// @@ -214,6 +233,12 @@ public BoolQueryDescriptor MustNot(params Action QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// The clause (query) should appear in the matching document. /// @@ -253,30 +278,15 @@ public BoolQueryDescriptor Should(params Action QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public BoolQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Specifies the number or percentage of `should` clauses returned documents must match. - /// - public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -306,6 +316,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MustDescriptor is not null) { writer.WritePropertyName("must"); @@ -364,6 +380,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MustNotValue, writer, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ShouldDescriptor is not null) { writer.WritePropertyName("should"); @@ -393,24 +415,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(ShouldValue, writer, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - writer.WriteEndObject(); } } @@ -423,10 +427,12 @@ public BoolQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private ICollection? MustValue { get; set; } private QueryDescriptor MustDescriptor { get; set; } private Action MustDescriptorAction { get; set; } @@ -435,13 +441,17 @@ public BoolQueryDescriptor() : base() private QueryDescriptor MustNotDescriptor { get; set; } private Action MustNotDescriptorAction { get; set; } private Action[] MustNotDescriptorActions { get; set; } + private string? QueryNameValue { get; set; } private ICollection? ShouldValue { get; set; } private QueryDescriptor ShouldDescriptor { get; set; } private Action ShouldDescriptorAction { get; set; } private Action[] ShouldDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } + + public BoolQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
@@ -482,6 +492,15 @@ public BoolQueryDescriptor Filter(params Action[] configure) return Self; } + /// + /// Specifies the number or percentage of `should` clauses returned documents must match. + /// + public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The clause (query) must appear in matching documents and will contribute to the score. /// @@ -560,6 +579,12 @@ public BoolQueryDescriptor MustNot(params Action[] configure) return Self; } + public BoolQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// The clause (query) should appear in the matching document. /// @@ -599,30 +624,15 @@ public BoolQueryDescriptor Should(params Action[] configure) return Self; } - public BoolQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public BoolQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Specifies the number or percentage of `should` clauses returned documents must match. - /// - public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -652,6 +662,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MustDescriptor is not null) { writer.WritePropertyName("must"); @@ -710,6 +726,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MustNotValue, writer, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ShouldDescriptor is not null) { writer.WritePropertyName("should"); @@ -739,24 +761,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(ShouldValue, writer, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs index 1a8afc0fd43..4ffc12d58e4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs @@ -65,15 +65,21 @@ public BoostingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query NegativeValue { get; set; } private QueryDescriptor NegativeDescriptor { get; set; } private Action> NegativeDescriptorAction { get; set; } + private double NegativeBoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query PositiveValue { get; set; } private QueryDescriptor PositiveDescriptor { get; set; } private Action> PositiveDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private double NegativeBoostValue { get; set; } + + public BoostingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Query used to decrease the relevance score of matching documents. @@ -102,6 +108,15 @@ public BoostingQueryDescriptor Negative(Action + /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. + /// + public BoostingQueryDescriptor NegativeBoost(double negativeBoost) + { + NegativeBoostValue = negativeBoost; + return Self; + } + /// /// Any returned documents must match this query. /// @@ -135,24 +150,15 @@ public BoostingQueryDescriptor QueryName(string? queryName) return Self; } - public BoostingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. - /// - public BoostingQueryDescriptor NegativeBoost(double negativeBoost) - { - NegativeBoostValue = negativeBoost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (NegativeDescriptor is not null) { writer.WritePropertyName("negative"); @@ -169,6 +175,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NegativeValue, options); } + writer.WritePropertyName("negative_boost"); + writer.WriteNumberValue(NegativeBoostValue); if (PositiveDescriptor is not null) { writer.WritePropertyName("positive"); @@ -191,14 +199,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("negative_boost"); - writer.WriteNumberValue(NegativeBoostValue); writer.WriteEndObject(); } } @@ -211,15 +211,21 @@ public BoostingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query NegativeValue { get; set; } private QueryDescriptor NegativeDescriptor { get; set; } private Action NegativeDescriptorAction { get; set; } + private double NegativeBoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query PositiveValue { get; set; } private QueryDescriptor PositiveDescriptor { get; set; } private Action PositiveDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private double NegativeBoostValue { get; set; } + + public BoostingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Query used to decrease the relevance score of matching documents. @@ -248,6 +254,15 @@ public BoostingQueryDescriptor Negative(Action configure) return Self; } + /// + /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. + /// + public BoostingQueryDescriptor NegativeBoost(double negativeBoost) + { + NegativeBoostValue = negativeBoost; + return Self; + } + /// /// Any returned documents must match this query. /// @@ -281,24 +296,15 @@ public BoostingQueryDescriptor QueryName(string? queryName) return Self; } - public BoostingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. - /// - public BoostingQueryDescriptor NegativeBoost(double negativeBoost) - { - NegativeBoostValue = negativeBoost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (NegativeDescriptor is not null) { writer.WritePropertyName("negative"); @@ -315,6 +321,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NegativeValue, options); } + writer.WritePropertyName("negative_boost"); + writer.WriteNumberValue(NegativeBoostValue); if (PositiveDescriptor is not null) { writer.WritePropertyName("positive"); @@ -337,14 +345,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("negative_boost"); - writer.WriteNumberValue(NegativeBoostValue); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs index 3db426f64fd..bdb63b3bf87 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs @@ -83,21 +83,15 @@ public CombinedFieldsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Fields FieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? OperatorValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQueryValue { get; set; } - public CombinedFieldsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If true, match phrase queries are automatically created for multi-term synonyms. /// @@ -149,6 +143,12 @@ public CombinedFieldsQueryDescriptor Query(string query) return Self; } + public CombinedFieldsQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter. /// @@ -161,12 +161,6 @@ public CombinedFieldsQueryDescriptor ZeroTermsQuery(Elastic.Clients.E protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -195,6 +189,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); @@ -213,21 +213,15 @@ public CombinedFieldsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Fields FieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? OperatorValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQueryValue { get; set; } - public CombinedFieldsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If true, match phrase queries are automatically created for multi-term synonyms. /// @@ -279,6 +273,12 @@ public CombinedFieldsQueryDescriptor Query(string query) return Self; } + public CombinedFieldsQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter. /// @@ -291,12 +291,6 @@ public CombinedFieldsQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -325,6 +319,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs index 88316ed570a..6eebdf41c7d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs @@ -53,11 +53,17 @@ public ConstantScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public ConstantScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Filter query you wish to run. Any returned documents must match this query.
Filter queries do not calculate relevance scores.
To speed up performance, Elasticsearch automatically caches frequently used filter queries.
@@ -92,15 +98,15 @@ public ConstantScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ConstantScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -123,12 +129,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -141,11 +141,17 @@ public ConstantScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public ConstantScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Filter query you wish to run. Any returned documents must match this query.
Filter queries do not calculate relevance scores.
To speed up performance, Elasticsearch automatically caches frequently used filter queries.
@@ -180,15 +186,15 @@ public ConstantScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ConstantScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -211,12 +217,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs index bfb0e44e904..a135bcc8bf4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs @@ -42,12 +42,6 @@ public override DateRangeQuery Read(ref Utf8JsonReader reader, Type typeToConver if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -90,6 +84,12 @@ public override DateRangeQuery Read(ref Utf8JsonReader reader, Type typeToConver continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "relation") { variant.Relation = JsonSerializer.Deserialize(ref reader, options); @@ -123,12 +123,6 @@ public override void Write(Utf8JsonWriter writer, DateRangeQuery value, JsonSeri writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -171,6 +165,12 @@ public override void Write(Utf8JsonWriter writer, DateRangeQuery value, JsonSeri JsonSerializer.Serialize(writer, value.Lte, options); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Relation is not null) { writer.WritePropertyName("relation"); @@ -272,7 +272,6 @@ public DateRangeQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? FormatValue { get; set; } @@ -281,16 +280,11 @@ public DateRangeQueryDescriptor(Expression> field) private Elastic.Clients.Elasticsearch.Serverless.DateMath? GteValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.DateMath? LtValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.DateMath? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.DateMath? ToValue { get; set; } - public DateRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public DateRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -360,6 +354,12 @@ public DateRangeQueryDescriptor Lte(Elastic.Clients.Elasticsearch.Ser return Self; } + public DateRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public DateRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -388,12 +388,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -436,6 +430,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LteValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); @@ -474,7 +474,6 @@ public DateRangeQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? FormatValue { get; set; } @@ -483,16 +482,11 @@ public DateRangeQueryDescriptor(Field field) private Elastic.Clients.Elasticsearch.Serverless.DateMath? GteValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.DateMath? LtValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.DateMath? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.DateMath? ToValue { get; set; } - public DateRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public DateRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -568,6 +562,12 @@ public DateRangeQueryDescriptor Lte(Elastic.Clients.Elasticsearch.Serverless.Dat return Self; } + public DateRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public DateRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -596,12 +596,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -644,6 +638,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LteValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs index bd9aa307dc6..3d9e603b538 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs @@ -59,14 +59,20 @@ public DisMaxQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection QueriesValue { get; set; } private QueryDescriptor QueriesDescriptor { get; set; } private Action> QueriesDescriptorAction { get; set; } private Action>[] QueriesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private double? TieBreakerValue { get; set; } + public DisMaxQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// One or more query clauses.
Returned documents must match one or more of these queries.
If a document matches multiple queries, Elasticsearch uses the highest relevance score.
///
@@ -112,12 +118,6 @@ public DisMaxQueryDescriptor QueryName(string? queryName) return Self; } - public DisMaxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. /// @@ -130,6 +130,12 @@ public DisMaxQueryDescriptor TieBreaker(double? tieBreaker) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (QueriesDescriptor is not null) { writer.WritePropertyName("queries"); @@ -167,12 +173,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (TieBreakerValue.HasValue) { writer.WritePropertyName("tie_breaker"); @@ -191,14 +191,20 @@ public DisMaxQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection QueriesValue { get; set; } private QueryDescriptor QueriesDescriptor { get; set; } private Action QueriesDescriptorAction { get; set; } private Action[] QueriesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private double? TieBreakerValue { get; set; } + public DisMaxQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// One or more query clauses.
Returned documents must match one or more of these queries.
If a document matches multiple queries, Elasticsearch uses the highest relevance score.
///
@@ -244,12 +250,6 @@ public DisMaxQueryDescriptor QueryName(string? queryName) return Self; } - public DisMaxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. /// @@ -262,6 +262,12 @@ public DisMaxQueryDescriptor TieBreaker(double? tieBreaker) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (QueriesDescriptor is not null) { writer.WritePropertyName("queries"); @@ -299,12 +305,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (TieBreakerValue.HasValue) { writer.WritePropertyName("tie_breaker"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs index d8838554be7..0e1012e0092 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs @@ -53,15 +53,9 @@ public ExistsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - public ExistsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public ExistsQueryDescriptor Boost(float? boost) { @@ -87,15 +81,15 @@ public ExistsQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -104,6 +98,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } @@ -116,15 +116,9 @@ public ExistsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - public ExistsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public ExistsQueryDescriptor Boost(float? boost) { @@ -159,15 +153,15 @@ public ExistsQueryDescriptor Field(Expression return Self; } + public ExistsQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -176,6 +170,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs index f34b077887b..98c8dc192f1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs @@ -83,20 +83,35 @@ public FunctionScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } private ICollection? FunctionsValue { get; set; } private FunctionScoreDescriptor FunctionsDescriptor { get; set; } private Action> FunctionsDescriptorAction { get; set; } private Action>[] FunctionsDescriptorActions { get; set; } + private double? MaxBoostValue { get; set; } + private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } - private double? MaxBoostValue { get; set; } - private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? ScoreModeValue { get; set; } + public FunctionScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Defines how he newly computed score is combined with the score of the query + /// + public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? boostMode) + { + BoostModeValue = boostMode; + return Self; + } + /// /// One or more functions that compute a new score for each document returned by the query. /// @@ -136,6 +151,24 @@ public FunctionScoreQueryDescriptor Functions(params Action + /// Restricts the new score to not exceed the provided limit. + ///
+ public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) + { + MaxBoostValue = maxBoost; + return Self; + } + + /// + /// Excludes documents that do not meet the provided score threshold. + /// + public FunctionScoreQueryDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// A query that determines the documents for which a new score is computed. /// @@ -169,39 +202,6 @@ public FunctionScoreQueryDescriptor QueryName(string? queryName) return Self; } - public FunctionScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Defines how he newly computed score is combined with the score of the query - /// - public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? boostMode) - { - BoostModeValue = boostMode; - return Self; - } - - /// - /// Restricts the new score to not exceed the provided limit. - /// - public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) - { - MaxBoostValue = maxBoost; - return Self; - } - - /// - /// Excludes documents that do not meet the provided score threshold. - /// - public FunctionScoreQueryDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Specifies how the computed scores are combined /// @@ -214,6 +214,18 @@ public FunctionScoreQueryDescriptor ScoreMode(Elastic.Clients.Elastic protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (BoostModeValue is not null) + { + writer.WritePropertyName("boost_mode"); + JsonSerializer.Serialize(writer, BoostModeValue, options); + } + if (FunctionsDescriptor is not null) { writer.WritePropertyName("functions"); @@ -245,6 +257,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FunctionsValue, options); } + if (MaxBoostValue.HasValue) + { + writer.WritePropertyName("max_boost"); + writer.WriteNumberValue(MaxBoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -267,30 +291,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostModeValue is not null) - { - writer.WritePropertyName("boost_mode"); - JsonSerializer.Serialize(writer, BoostModeValue, options); - } - - if (MaxBoostValue.HasValue) - { - writer.WritePropertyName("max_boost"); - writer.WriteNumberValue(MaxBoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); @@ -309,20 +309,35 @@ public FunctionScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } private ICollection? FunctionsValue { get; set; } private FunctionScoreDescriptor FunctionsDescriptor { get; set; } private Action FunctionsDescriptorAction { get; set; } private Action[] FunctionsDescriptorActions { get; set; } + private double? MaxBoostValue { get; set; } + private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } - private double? MaxBoostValue { get; set; } - private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? ScoreModeValue { get; set; } + public FunctionScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Defines how he newly computed score is combined with the score of the query + /// + public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? boostMode) + { + BoostModeValue = boostMode; + return Self; + } + /// /// One or more functions that compute a new score for each document returned by the query. /// @@ -362,6 +377,24 @@ public FunctionScoreQueryDescriptor Functions(params Action + /// Restricts the new score to not exceed the provided limit. + ///
+ public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) + { + MaxBoostValue = maxBoost; + return Self; + } + + /// + /// Excludes documents that do not meet the provided score threshold. + /// + public FunctionScoreQueryDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// A query that determines the documents for which a new score is computed. /// @@ -395,39 +428,6 @@ public FunctionScoreQueryDescriptor QueryName(string? queryName) return Self; } - public FunctionScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Defines how he newly computed score is combined with the score of the query - /// - public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? boostMode) - { - BoostModeValue = boostMode; - return Self; - } - - /// - /// Restricts the new score to not exceed the provided limit. - /// - public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) - { - MaxBoostValue = maxBoost; - return Self; - } - - /// - /// Excludes documents that do not meet the provided score threshold. - /// - public FunctionScoreQueryDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Specifies how the computed scores are combined /// @@ -440,6 +440,18 @@ public FunctionScoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serv protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (BoostModeValue is not null) + { + writer.WritePropertyName("boost_mode"); + JsonSerializer.Serialize(writer, BoostModeValue, options); + } + if (FunctionsDescriptor is not null) { writer.WritePropertyName("functions"); @@ -471,6 +483,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FunctionsValue, options); } + if (MaxBoostValue.HasValue) + { + writer.WritePropertyName("max_boost"); + writer.WriteNumberValue(MaxBoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -493,30 +517,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostModeValue is not null) - { - writer.WritePropertyName("boost_mode"); - JsonSerializer.Serialize(writer, BoostModeValue, options); - } - - if (MaxBoostValue.HasValue) - { - writer.WritePropertyName("max_boost"); - writer.WriteNumberValue(MaxBoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs index 21a945a9b86..c35a9134d65 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs @@ -42,12 +42,6 @@ public override FuzzyQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -72,6 +66,12 @@ public override FuzzyQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -105,12 +105,6 @@ public override void Write(Utf8JsonWriter writer, FuzzyQuery value, JsonSerializ writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -135,6 +129,12 @@ public override void Write(Utf8JsonWriter writer, FuzzyQuery value, JsonSerializ writer.WriteNumberValue(value.PrefixLength.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -229,22 +229,16 @@ public FuzzyQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } private int? MaxExpansionsValue { get; set; } private int? PrefixLengthValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private bool? TranspositionsValue { get; set; } private object ValueValue { get; set; } - public FuzzyQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public FuzzyQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -290,6 +284,12 @@ public FuzzyQueryDescriptor PrefixLength(int? prefixLength) return Self; } + public FuzzyQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Number of beginning characters left unchanged when creating expansions. /// @@ -324,12 +324,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -354,6 +348,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PrefixLengthValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -388,22 +388,16 @@ public FuzzyQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } private int? MaxExpansionsValue { get; set; } private int? PrefixLengthValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private bool? TranspositionsValue { get; set; } private object ValueValue { get; set; } - public FuzzyQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public FuzzyQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -455,6 +449,12 @@ public FuzzyQueryDescriptor PrefixLength(int? prefixLength) return Self; } + public FuzzyQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Number of beginning characters left unchanged when creating expansions. /// @@ -489,12 +489,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -519,6 +513,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PrefixLengthValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs index 2105a92c0b7..06fa0d93d7e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs @@ -39,12 +39,6 @@ public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToC if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -57,6 +51,12 @@ public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToC continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "validation_method") { variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, GeoBoundingBoxQuery value, Jso JsonSerializer.Serialize(writer, value.BoundingBox, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -105,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, GeoBoundingBoxQuery value, Jso writer.WriteBooleanValue(value.IgnoreUnmapped.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ValidationMethod is not null) { writer.WritePropertyName("validation_method"); @@ -146,18 +146,12 @@ public GeoBoundingBoxQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoBounds BoundingBoxValue { get; set; } - - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } public GeoBoundingBoxQueryDescriptor Boost(float? boost) { @@ -174,6 +168,12 @@ public GeoBoundingBoxQueryDescriptor IgnoreUnmapped(bool? ignoreUnmap return Self; } + public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -211,12 +211,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BoundingBoxValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -229,6 +223,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); @@ -247,18 +247,12 @@ public GeoBoundingBoxQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoBounds BoundingBoxValue { get; set; } - - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } public GeoBoundingBoxQueryDescriptor Boost(float? boost) { @@ -275,6 +269,12 @@ public GeoBoundingBoxQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) return Self; } + public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -318,12 +318,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BoundingBoxValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -336,6 +330,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs index d89e4d3b977..dbb8b244607 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs @@ -39,12 +39,6 @@ public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConv if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -63,6 +57,18 @@ public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConv continue; } + if (property == "ignore_unmapped") + { + variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "validation_method") { variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); @@ -93,12 +99,6 @@ public override void Write(Utf8JsonWriter writer, GeoDistanceQuery value, JsonSe JsonSerializer.Serialize(writer, value.Location, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -113,6 +113,18 @@ public override void Write(Utf8JsonWriter writer, GeoDistanceQuery value, JsonSe JsonSerializer.Serialize(writer, value.DistanceType, options); } + if (value.IgnoreUnmapped.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(value.IgnoreUnmapped.Value); + } + + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ValidationMethod is not null) { writer.WritePropertyName("validation_method"); @@ -139,6 +151,11 @@ public sealed partial class GeoDistanceQuery : SearchQuery ///
public Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceType { get; set; } public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } + + /// + /// Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
+ ///
+ public bool? IgnoreUnmapped { get; set; } public Elastic.Clients.Elasticsearch.Serverless.GeoLocation Location { get; set; } /// @@ -159,20 +176,15 @@ public GeoDistanceQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private string DistanceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoLocation LocationValue { get; set; } - public GeoDistanceQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoDistanceQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -197,6 +209,21 @@ public GeoDistanceQueryDescriptor DistanceType(Elastic.Clients.Elasti return Self; } + /// + /// Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
+ ///
+ public GeoDistanceQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + public GeoDistanceQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -234,12 +261,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LocationValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -254,6 +275,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DistanceTypeValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); @@ -272,20 +305,15 @@ public GeoDistanceQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private string DistanceValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoLocation LocationValue { get; set; } - public GeoDistanceQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoDistanceQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -310,6 +338,21 @@ public GeoDistanceQueryDescriptor DistanceType(Elastic.Clients.Elasticsearch.Ser return Self; } + /// + /// Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
+ ///
+ public GeoDistanceQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + public GeoDistanceQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -353,12 +396,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LocationValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -373,6 +410,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DistanceTypeValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs index 775b07edecb..64070fb2317 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs @@ -39,12 +39,6 @@ public override GeoPolygonQuery Read(ref Utf8JsonReader reader, Type typeToConve if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -57,6 +51,12 @@ public override GeoPolygonQuery Read(ref Utf8JsonReader reader, Type typeToConve continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "validation_method") { variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, GeoPolygonQuery value, JsonSer JsonSerializer.Serialize(writer, value.Polygon, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -105,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, GeoPolygonQuery value, JsonSer writer.WriteBooleanValue(value.IgnoreUnmapped.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ValidationMethod is not null) { writer.WritePropertyName("validation_method"); @@ -138,21 +138,15 @@ public GeoPolygonQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoPolygonPoints PolygonValue { get; set; } private GeoPolygonPointsDescriptor PolygonDescriptor { get; set; } private Action PolygonDescriptorAction { get; set; } - public GeoPolygonQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoPolygonQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -165,6 +159,12 @@ public GeoPolygonQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped return Self; } + public GeoPolygonQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public GeoPolygonQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? validationMethod) { ValidationMethodValue = validationMethod; @@ -227,12 +227,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -245,6 +239,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); @@ -263,21 +263,15 @@ public GeoPolygonQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoPolygonPoints PolygonValue { get; set; } private GeoPolygonPointsDescriptor PolygonDescriptor { get; set; } private Action PolygonDescriptorAction { get; set; } - public GeoPolygonQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoPolygonQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -290,6 +284,12 @@ public GeoPolygonQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) return Self; } + public GeoPolygonQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public GeoPolygonQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? validationMethod) { ValidationMethodValue = validationMethod; @@ -358,12 +358,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -376,6 +370,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs index b3de11ad53a..690fe97a5fc 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs @@ -89,20 +89,35 @@ public HasChildQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } + private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private int? MaxChildrenValue { get; set; } - private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } private string TypeValue { get; set; } + public HasChildQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. + /// + public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -130,6 +145,24 @@ public HasChildQueryDescriptor InnerHits(Action + /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + + /// + /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MinChildren(int? minChildren) + { + MinChildrenValue = minChildren; + return Self; + } + /// /// Query you wish to run on child documents of the `type` field.
If a child document matches the search, the query returns the parent document.
///
@@ -163,39 +196,6 @@ public HasChildQueryDescriptor QueryName(string? queryName) return Self; } - public HasChildQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. - /// - public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MinChildren(int? minChildren) - { - MinChildrenValue = minChildren; - return Self; - } - /// /// Indicates how scores for matching child documents affect the root parent document’s relevance score. /// @@ -217,6 +217,18 @@ public HasChildQueryDescriptor Type(string type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -233,6 +245,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + + if (MinChildrenValue.HasValue) + { + writer.WritePropertyName("min_children"); + writer.WriteNumberValue(MinChildrenValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -255,30 +279,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (MinChildrenValue.HasValue) - { - writer.WritePropertyName("min_children"); - writer.WriteNumberValue(MinChildrenValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); @@ -299,20 +299,35 @@ public HasChildQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } + private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private int? MaxChildrenValue { get; set; } - private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } private string TypeValue { get; set; } + public HasChildQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. + /// + public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -340,6 +355,24 @@ public HasChildQueryDescriptor InnerHits(Action return Self; } + /// + /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + + /// + /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MinChildren(int? minChildren) + { + MinChildrenValue = minChildren; + return Self; + } + /// /// Query you wish to run on child documents of the `type` field.
If a child document matches the search, the query returns the parent document.
///
@@ -373,39 +406,6 @@ public HasChildQueryDescriptor QueryName(string? queryName) return Self; } - public HasChildQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. - /// - public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MinChildren(int? minChildren) - { - MinChildrenValue = minChildren; - return Self; - } - /// /// Indicates how scores for matching child documents affect the root parent document’s relevance score. /// @@ -427,6 +427,18 @@ public HasChildQueryDescriptor Type(string type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -443,6 +455,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + + if (MinChildrenValue.HasValue) + { + writer.WritePropertyName("min_children"); + writer.WriteNumberValue(MinChildrenValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -465,30 +489,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (MinChildrenValue.HasValue) - { - writer.WritePropertyName("min_children"); - writer.WriteNumberValue(MinChildrenValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs index 0fd9ec1821c..92d2f737add 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs @@ -77,18 +77,33 @@ public HasParentQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } + private string ParentTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string ParentTypeValue { get; set; } private bool? ScoreValue { get; set; } + public HasParentQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
+ ///
+ public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -116,6 +131,15 @@ public HasParentQueryDescriptor InnerHits(Action + /// Name of the parent relationship mapped for the `join` field. + ///
+ public HasParentQueryDescriptor ParentType(string parentType) + { + ParentTypeValue = parentType; + return Self; + } + /// /// Query you wish to run on parent documents of the `parent_type` field.
If a parent document matches the search, the query returns its child documents.
///
@@ -149,30 +173,6 @@ public HasParentQueryDescriptor QueryName(string? queryName) return Self; } - public HasParentQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
- ///
- public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Name of the parent relationship mapped for the `join` field. - /// - public HasParentQueryDescriptor ParentType(string parentType) - { - ParentTypeValue = parentType; - return Self; - } - /// /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. /// @@ -185,6 +185,18 @@ public HasParentQueryDescriptor Score(bool? score = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -201,6 +213,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("parent_type"); + JsonSerializer.Serialize(writer, ParentTypeValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -223,20 +237,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("parent_type"); - JsonSerializer.Serialize(writer, ParentTypeValue, options); if (ScoreValue.HasValue) { writer.WritePropertyName("score"); @@ -255,18 +255,33 @@ public HasParentQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } + private string ParentTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string ParentTypeValue { get; set; } private bool? ScoreValue { get; set; } + public HasParentQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
+ ///
+ public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -294,6 +309,15 @@ public HasParentQueryDescriptor InnerHits(Action + /// Name of the parent relationship mapped for the `join` field. + ///
+ public HasParentQueryDescriptor ParentType(string parentType) + { + ParentTypeValue = parentType; + return Self; + } + /// /// Query you wish to run on parent documents of the `parent_type` field.
If a parent document matches the search, the query returns its child documents.
///
@@ -327,30 +351,6 @@ public HasParentQueryDescriptor QueryName(string? queryName) return Self; } - public HasParentQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
- ///
- public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Name of the parent relationship mapped for the `join` field. - /// - public HasParentQueryDescriptor ParentType(string parentType) - { - ParentTypeValue = parentType; - return Self; - } - /// /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. /// @@ -363,6 +363,18 @@ public HasParentQueryDescriptor Score(bool? score = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -379,6 +391,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("parent_type"); + JsonSerializer.Serialize(writer, ParentTypeValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -401,20 +415,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("parent_type"); - JsonSerializer.Serialize(writer, ParentTypeValue, options); if (ScoreValue.HasValue) { writer.WritePropertyName("score"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs index 1d98a7be21c..f9bc940abe6 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs @@ -53,19 +53,19 @@ public IdsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Ids? ValuesValue { get; set; } - public IdsQueryDescriptor QueryName(string? queryName) + public IdsQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public IdsQueryDescriptor Boost(float? boost) + public IdsQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -81,18 +81,18 @@ public IdsQueryDescriptor Values(Elastic.Clients.Elasticsearch.Serverless.Ids? v protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValuesValue is not null) { writer.WritePropertyName("values"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs index d4f828f3ac7..b162b7de11d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs @@ -62,16 +62,43 @@ public IntervalsAllOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action> IntervalsDescriptorAction { get; set; } private Action>[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } private int? MaxGapsValue { get; set; } private bool? OrderedValue { get; set; } + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAllOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. /// @@ -111,33 +138,6 @@ public IntervalsAllOfDescriptor Intervals(params Action - /// Rule used to filter returned intervals. - /// - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Maximum number of positions between the matching terms.
Intervals produced by the rules further apart than this are not considered matches.
///
@@ -159,6 +159,22 @@ public IntervalsAllOfDescriptor Ordered(bool? ordered = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -190,22 +206,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (MaxGapsValue.HasValue) { writer.WritePropertyName("max_gaps"); @@ -230,16 +230,43 @@ public IntervalsAllOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action IntervalsDescriptorAction { get; set; } private Action[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } private int? MaxGapsValue { get; set; } private bool? OrderedValue { get; set; } + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAllOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. /// @@ -279,33 +306,6 @@ public IntervalsAllOfDescriptor Intervals(params Action[] c return Self; } - /// - /// Rule used to filter returned intervals. - /// - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Maximum number of positions between the matching terms.
Intervals produced by the rules further apart than this are not considered matches.
///
@@ -327,6 +327,22 @@ public IntervalsAllOfDescriptor Ordered(bool? ordered = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -358,22 +374,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (MaxGapsValue.HasValue) { writer.WritePropertyName("max_gaps"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs index 3919b38b17f..9968532d45f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs @@ -50,13 +50,40 @@ public IntervalsAnyOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action> IntervalsDescriptorAction { get; set; } private Action>[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } + + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } /// /// An array of rules to match. @@ -97,36 +124,25 @@ public IntervalsAnyOfDescriptor Intervals(params Action - /// Rule used to filter returned intervals. - /// - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -158,22 +174,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - writer.WriteEndObject(); } } @@ -186,13 +186,40 @@ public IntervalsAnyOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action IntervalsDescriptorAction { get; set; } private Action[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } + + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } /// /// An array of rules to match. @@ -233,36 +260,25 @@ public IntervalsAnyOfDescriptor Intervals(params Action[] c return Self; } - /// - /// Rule used to filter returned intervals. - /// - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -294,22 +310,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs index a6f464dd6ab..115e8522daf 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs @@ -261,15 +261,9 @@ private IntervalsQueryDescriptor Set(object variant, string variantNa return Self; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - public IntervalsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public IntervalsQueryDescriptor Boost(float? boost) { @@ -289,6 +283,12 @@ public IntervalsQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public IntervalsQueryDescriptor AllOf(IntervalsAllOf intervalsAllOf) => Set(intervalsAllOf, "all_of"); public IntervalsQueryDescriptor AllOf(Action> configure) => Set(configure, "all_of"); public IntervalsQueryDescriptor AnyOf(IntervalsAnyOf intervalsAnyOf) => Set(intervalsAnyOf, "any_of"); @@ -307,18 +307,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); @@ -376,15 +376,9 @@ private IntervalsQueryDescriptor Set(object variant, string variantName) return Self; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - public IntervalsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public IntervalsQueryDescriptor Boost(float? boost) { @@ -410,6 +404,12 @@ public IntervalsQueryDescriptor Field(Expression Set(intervalsAllOf, "all_of"); public IntervalsQueryDescriptor AllOf(Action configure) => Set(configure, "all_of"); public IntervalsQueryDescriptor AllOf(Action> configure) => Set(configure, "all_of"); @@ -434,18 +434,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs index 95679f8513c..1be042da166 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -66,45 +66,45 @@ public LikeDocumentDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } private Fields? FieldsValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } /// - /// ID of a document. + /// A document not present in the index. /// - public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) + public LikeDocumentDescriptor Doc(object? doc) { - IdValue = id; + DocValue = doc; return Self; } - /// - /// Index of a document. - /// - public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) + public LikeDocumentDescriptor Fields(Fields? fields) { - IndexValue = index; + FieldsValue = fields; return Self; } /// - /// A document not present in the index. + /// ID of a document. /// - public LikeDocumentDescriptor Doc(object? doc) + public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) { - DocValue = doc; + IdValue = id; return Self; } - public LikeDocumentDescriptor Fields(Fields? fields) + /// + /// Index of a document. + /// + public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) { - FieldsValue = fields; + IndexValue = index; return Self; } @@ -135,18 +135,6 @@ public LikeDocumentDescriptor VersionType(Elastic.Clients.Elasticsear protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); @@ -159,6 +147,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); @@ -195,45 +195,45 @@ public LikeDocumentDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } private Fields? FieldsValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } /// - /// ID of a document. + /// A document not present in the index. /// - public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) + public LikeDocumentDescriptor Doc(object? doc) { - IdValue = id; + DocValue = doc; return Self; } - /// - /// Index of a document. - /// - public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) + public LikeDocumentDescriptor Fields(Fields? fields) { - IndexValue = index; + FieldsValue = fields; return Self; } /// - /// A document not present in the index. + /// ID of a document. /// - public LikeDocumentDescriptor Doc(object? doc) + public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) { - DocValue = doc; + IdValue = id; return Self; } - public LikeDocumentDescriptor Fields(Fields? fields) + /// + /// Index of a document. + /// + public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) { - FieldsValue = fields; + IndexValue = index; return Self; } @@ -264,18 +264,6 @@ public LikeDocumentDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverle protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); @@ -288,6 +276,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs index f1b5e1e2fe5..1fc62e8e4be 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs @@ -47,36 +47,36 @@ public MatchAllQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } - public MatchAllQueryDescriptor QueryName(string? queryName) + public MatchAllQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public MatchAllQueryDescriptor Boost(float? boost) + public MatchAllQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs index 2a16d1dde62..bfbac530ec8 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs @@ -42,12 +42,6 @@ public override MatchBoolPrefixQuery Read(ref Utf8JsonReader reader, Type typeTo if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -107,6 +101,12 @@ public override MatchBoolPrefixQuery Read(ref Utf8JsonReader reader, Type typeTo variant.Query = JsonSerializer.Deserialize(ref reader, options); continue; } + + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } } } @@ -123,12 +123,6 @@ public override void Write(Utf8JsonWriter writer, MatchBoolPrefixQuery value, Js writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -185,6 +179,12 @@ public override void Write(Utf8JsonWriter writer, MatchBoolPrefixQuery value, Js writer.WritePropertyName("query"); writer.WriteStringValue(value.Query); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WriteEndObject(); writer.WriteEndObject(); return; @@ -280,7 +280,6 @@ public MatchBoolPrefixQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -292,12 +291,7 @@ public MatchBoolPrefixQueryDescriptor(Expression> field) private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } - - public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } /// /// Analyzer used to convert the text in the query value into tokens. @@ -398,6 +392,12 @@ public MatchBoolPrefixQueryDescriptor Query(string query) return Self; } + public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -405,12 +405,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -467,6 +461,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } @@ -487,7 +487,6 @@ public MatchBoolPrefixQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } @@ -499,12 +498,7 @@ public MatchBoolPrefixQueryDescriptor(Field field) private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } - - public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } /// /// Analyzer used to convert the text in the query value into tokens. @@ -611,6 +605,12 @@ public MatchBoolPrefixQueryDescriptor Query(string query) return Self; } + public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -618,12 +618,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -680,6 +674,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs index 7d149a361d0..c50371fde72 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs @@ -47,36 +47,36 @@ public MatchNoneQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } - public MatchNoneQueryDescriptor QueryName(string? queryName) + public MatchNoneQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public MatchNoneQueryDescriptor Boost(float? boost) + public MatchNoneQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs index 7bcae1745ec..777d87b202c 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs @@ -42,12 +42,6 @@ public override MatchPhrasePrefixQuery Read(ref Utf8JsonReader reader, Type type if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -72,6 +66,12 @@ public override MatchPhrasePrefixQuery Read(ref Utf8JsonReader reader, Type type continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "slop") { variant.Slop = JsonSerializer.Deserialize(ref reader, options); @@ -99,12 +99,6 @@ public override void Write(Utf8JsonWriter writer, MatchPhrasePrefixQuery value, writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -125,6 +119,12 @@ public override void Write(Utf8JsonWriter writer, MatchPhrasePrefixQuery value, writer.WritePropertyName("query"); writer.WriteStringValue(value.Query); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Slop.HasValue) { writer.WritePropertyName("slop"); @@ -212,21 +212,15 @@ public MatchPhrasePrefixQueryDescriptor(Expression> fiel FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private int? MaxExpansionsValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert text in the query value into tokens. /// @@ -272,6 +266,12 @@ public MatchPhrasePrefixQueryDescriptor Query(string query) return Self; } + public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -297,12 +297,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -323,6 +317,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -355,21 +355,15 @@ public MatchPhrasePrefixQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private int? MaxExpansionsValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert text in the query value into tokens. /// @@ -421,6 +415,12 @@ public MatchPhrasePrefixQueryDescriptor Query(string query) return Self; } + public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -446,12 +446,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -472,6 +466,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs index f9880212b74..e660587bfa3 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs @@ -42,12 +42,6 @@ public override MatchPhraseQuery Read(ref Utf8JsonReader reader, Type typeToConv if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -66,6 +60,12 @@ public override MatchPhraseQuery Read(ref Utf8JsonReader reader, Type typeToConv continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "slop") { variant.Slop = JsonSerializer.Deserialize(ref reader, options); @@ -93,12 +93,6 @@ public override void Write(Utf8JsonWriter writer, MatchPhraseQuery value, JsonSe writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -113,6 +107,12 @@ public override void Write(Utf8JsonWriter writer, MatchPhraseQuery value, JsonSe writer.WritePropertyName("query"); writer.WriteStringValue(value.Query); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Slop.HasValue) { writer.WritePropertyName("slop"); @@ -195,20 +195,14 @@ public MatchPhraseQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhraseQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -245,6 +239,12 @@ public MatchPhraseQueryDescriptor Query(string query) return Self; } + public MatchPhraseQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -270,12 +270,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -290,6 +284,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -322,20 +322,14 @@ public MatchPhraseQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhraseQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -378,6 +372,12 @@ public MatchPhraseQueryDescriptor Query(string query) return Self; } + public MatchPhraseQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -403,12 +403,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -423,6 +417,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs index 119f4a9574f..c6886f31af9 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs @@ -42,12 +42,6 @@ public override MatchQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -120,6 +114,12 @@ public override MatchQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "zero_terms_query") { variant.ZeroTermsQuery = JsonSerializer.Deserialize(ref reader, options); @@ -141,12 +141,6 @@ public override void Write(Utf8JsonWriter writer, MatchQuery value, JsonSerializ writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -215,6 +209,12 @@ public override void Write(Utf8JsonWriter writer, MatchQuery value, JsonSerializ writer.WritePropertyName("query"); JsonSerializer.Serialize(writer, value.Query, options); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ZeroTermsQuery is not null) { writer.WritePropertyName("zero_terms_query"); @@ -331,7 +331,6 @@ public MatchQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -345,14 +344,9 @@ public MatchQueryDescriptor(Expression> field) private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -470,6 +464,12 @@ public MatchQueryDescriptor Query(string query) return Self; } + public MatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter. /// @@ -486,12 +486,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -560,6 +554,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); JsonSerializer.Serialize(writer, QueryValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); @@ -586,7 +586,6 @@ public MatchQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -600,14 +599,9 @@ public MatchQueryDescriptor(Field field) private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -731,6 +725,12 @@ public MatchQueryDescriptor Query(string query) return Self; } + public MatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter. /// @@ -747,12 +747,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -821,6 +815,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); JsonSerializer.Serialize(writer, QueryValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs index 7274defe518..a84a8883d6b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -67,7 +67,8 @@ public sealed partial class MoreLikeThisQuery : SearchQuery /// /// Specifies free form text and/or a single or multiple documents for which you want to find similar documents. /// - [JsonInclude, JsonPropertyName("like"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Like))] + [JsonInclude, JsonPropertyName("like")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Like))] public ICollection Like { get; set; } /// @@ -130,7 +131,8 @@ public sealed partial class MoreLikeThisQuery : SearchQuery /// /// Used in combination with `like` to exclude documents that match a set of terms. /// - [JsonInclude, JsonPropertyName("unlike"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Like))] + [JsonInclude, JsonPropertyName("unlike")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Like))] public ICollection? Unlike { get; set; } [JsonInclude, JsonPropertyName("version")] public long? Version { get; set; } @@ -150,7 +152,6 @@ public MoreLikeThisQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private double? BoostTermsValue { get; set; } @@ -162,22 +163,17 @@ public MoreLikeThisQueryDescriptor() : base() private int? MaxQueryTermsValue { get; set; } private int? MaxWordLengthValue { get; set; } private int? MinDocFreqValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } private ICollection? UnlikeValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// The analyzer that is used to analyze the free form text.
Defaults to the analyzer associated with the first field in fields.
///
@@ -274,6 +270,15 @@ public MoreLikeThisQueryDescriptor MinDocFreq(int? minDocFreq) return Self; } + /// + /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// + public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The minimum term frequency below which the terms are ignored from the input document. /// @@ -293,20 +298,17 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) } /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// Overrides the default analyzer. /// - public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { - MinimumShouldMatchValue = minimumShouldMatch; + PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) + public MoreLikeThisQueryDescriptor QueryName(string? queryName) { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); + QueryNameValue = queryName; return Self; } @@ -349,12 +351,6 @@ public MoreLikeThisQueryDescriptor VersionType(Elastic.Clients.Elasti protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -417,6 +413,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinDocFreqValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinTermFreqValue.HasValue) { writer.WritePropertyName("min_term_freq"); @@ -429,18 +431,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); @@ -483,7 +485,6 @@ public MoreLikeThisQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private double? BoostTermsValue { get; set; } @@ -495,22 +496,17 @@ public MoreLikeThisQueryDescriptor() : base() private int? MaxQueryTermsValue { get; set; } private int? MaxWordLengthValue { get; set; } private int? MinDocFreqValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } private ICollection? UnlikeValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// The analyzer that is used to analyze the free form text.
Defaults to the analyzer associated with the first field in fields.
///
@@ -607,6 +603,15 @@ public MoreLikeThisQueryDescriptor MinDocFreq(int? minDocFreq) return Self; } + /// + /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// + public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The minimum term frequency below which the terms are ignored from the input document. /// @@ -626,20 +631,17 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) } /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// Overrides the default analyzer. /// - public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) + public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { - MinimumShouldMatchValue = minimumShouldMatch; + PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) + public MoreLikeThisQueryDescriptor QueryName(string? queryName) { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); + QueryNameValue = queryName; return Self; } @@ -682,12 +684,6 @@ public MoreLikeThisQueryDescriptor VersionType(Elastic.Clients.Elasticsearch.Ser protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -750,6 +746,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinDocFreqValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinTermFreqValue.HasValue) { writer.WritePropertyName("min_term_freq"); @@ -762,18 +764,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs index ef9c922804b..a13f976cf71 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs @@ -143,7 +143,6 @@ public MultiMatchQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -157,17 +156,12 @@ public MultiMatchQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private double? TieBreakerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MultiMatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -282,6 +276,12 @@ public MultiMatchQueryDescriptor Query(string query) return Self; } + public MultiMatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -321,12 +321,6 @@ public MultiMatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elast protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -401,6 +395,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -437,7 +437,6 @@ public MultiMatchQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -451,17 +450,12 @@ public MultiMatchQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private double? TieBreakerValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MultiMatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -576,6 +570,12 @@ public MultiMatchQueryDescriptor Query(string query) return Self; } + public MultiMatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -615,12 +615,6 @@ public MultiMatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Se protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -695,6 +689,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs index 1cd515a37ce..d3854f14b57 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs @@ -77,18 +77,33 @@ public NestedQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } + public NestedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. + /// + public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -116,6 +131,24 @@ public NestedQueryDescriptor InnerHits(Action + /// Path to the nested object you wish to search. + ///
+ public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) + { + PathValue = path; + return Self; + } + + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Expression> path) + { + PathValue = path; + return Self; + } + /// /// Query you wish to run on nested objects in the path. /// @@ -149,39 +182,6 @@ public NestedQueryDescriptor QueryName(string? queryName) return Self; } - public NestedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - /// /// How scores for matching child objects affect the root parent document’s relevance score. /// @@ -194,6 +194,18 @@ public NestedQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -210,6 +222,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("path"); + JsonSerializer.Serialize(writer, PathValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -232,20 +246,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); @@ -264,18 +264,33 @@ public NestedQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } + public NestedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. + /// + public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -303,6 +318,33 @@ public NestedQueryDescriptor InnerHits(Action c return Self; } + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) + { + PathValue = path; + return Self; + } + + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Expression> path) + { + PathValue = path; + return Self; + } + + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Expression> path) + { + PathValue = path; + return Self; + } + /// /// Query you wish to run on nested objects in the path. /// @@ -336,48 +378,6 @@ public NestedQueryDescriptor QueryName(string? queryName) return Self; } - public NestedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - /// /// How scores for matching child objects affect the root parent document’s relevance score. /// @@ -390,6 +390,18 @@ public NestedQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -406,6 +418,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("path"); + JsonSerializer.Serialize(writer, PathValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -428,20 +442,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs index 048522ae823..aad9c272ab4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs @@ -42,12 +42,6 @@ public override NumberRangeQuery Read(ref Utf8JsonReader reader, Type typeToConv if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -84,6 +78,12 @@ public override NumberRangeQuery Read(ref Utf8JsonReader reader, Type typeToConv continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "relation") { variant.Relation = JsonSerializer.Deserialize(ref reader, options); @@ -111,12 +111,6 @@ public override void Write(Utf8JsonWriter writer, NumberRangeQuery value, JsonSe writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -153,6 +147,12 @@ public override void Write(Utf8JsonWriter writer, NumberRangeQuery value, JsonSe writer.WriteNumberValue(value.Lte.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Relation is not null) { writer.WritePropertyName("relation"); @@ -238,7 +238,6 @@ public NumberRangeQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private double? FromValue { get; set; } @@ -246,15 +245,10 @@ public NumberRangeQueryDescriptor(Expression> field) private double? GteValue { get; set; } private double? LtValue { get; set; } private double? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } private double? ToValue { get; set; } - public NumberRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public NumberRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -315,6 +309,12 @@ public NumberRangeQueryDescriptor Lte(double? lte) return Self; } + public NumberRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public NumberRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -334,12 +334,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -376,6 +370,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(LteValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); @@ -408,7 +408,6 @@ public NumberRangeQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private double? FromValue { get; set; } @@ -416,15 +415,10 @@ public NumberRangeQueryDescriptor(Field field) private double? GteValue { get; set; } private double? LtValue { get; set; } private double? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } private double? ToValue { get; set; } - public NumberRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public NumberRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -491,6 +485,12 @@ public NumberRangeQueryDescriptor Lte(double? lte) return Self; } + public NumberRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public NumberRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -510,12 +510,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -552,6 +546,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(LteValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs index f12d935c9ef..c1db6201046 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs @@ -65,18 +65,12 @@ public ParentIdQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private string? TypeValue { get; set; } - public ParentIdQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public ParentIdQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -101,6 +95,12 @@ public ParentIdQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) return Self; } + public ParentIdQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Name of the child relationship mapped for the `join` field. /// @@ -113,12 +113,6 @@ public ParentIdQueryDescriptor Type(string? type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -137,6 +131,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (TypeValue is not null) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs index b697af119c3..df3aa5ecbb1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs @@ -101,7 +101,6 @@ public PercolateQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private object? DocumentValue { get; set; } private ICollection? DocumentsValue { get; set; } @@ -110,15 +109,10 @@ public PercolateQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private string? NameValue { get; set; } private string? PreferenceValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } - public PercolateQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PercolateQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -197,6 +191,12 @@ public PercolateQueryDescriptor Preference(string? preference) return Self; } + public PercolateQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Routing used to fetch document to percolate. /// @@ -218,12 +218,6 @@ public PercolateQueryDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -268,6 +262,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(PreferenceValue); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); @@ -292,7 +292,6 @@ public PercolateQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private object? DocumentValue { get; set; } private ICollection? DocumentsValue { get; set; } @@ -301,15 +300,10 @@ public PercolateQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } private string? NameValue { get; set; } private string? PreferenceValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } - public PercolateQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PercolateQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -397,6 +391,12 @@ public PercolateQueryDescriptor Preference(string? preference) return Self; } + public PercolateQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Routing used to fetch document to percolate. /// @@ -418,12 +418,6 @@ public PercolateQueryDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -468,6 +462,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(PreferenceValue); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs index 4217048f047..efa56f76f31 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs @@ -201,11 +201,17 @@ private PinnedQueryDescriptor Set(object variant, string variantName) return Self; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action> OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public PinnedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. @@ -240,15 +246,15 @@ public PinnedQueryDescriptor QueryName(string? queryName) return Self; } - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -271,12 +277,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); @@ -325,11 +325,17 @@ private PinnedQueryDescriptor Set(object variant, string variantName) return Self; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public PinnedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. @@ -364,15 +370,15 @@ public PinnedQueryDescriptor QueryName(string? queryName) return Self; } - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -395,12 +401,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs index 21bd7720738..646e651c482 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs @@ -42,12 +42,6 @@ public override PrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -60,6 +54,12 @@ public override PrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, PrefixQuery value, JsonSeriali writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -105,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, PrefixQuery value, JsonSeriali writer.WriteBooleanValue(value.CaseInsensitive.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -178,19 +178,13 @@ public PrefixQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public PrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PrefixQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -218,6 +212,12 @@ public PrefixQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -243,12 +243,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -261,6 +255,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -289,19 +289,13 @@ public PrefixQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public PrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PrefixQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -335,6 +329,12 @@ public PrefixQueryDescriptor Field(Expression return Self; } + public PrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -360,12 +360,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -378,6 +372,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs index 0b38f66f05a..c949d269b04 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs @@ -193,10 +193,9 @@ public QueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AllowLeadingWildcardValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? DefaultFieldValue { get; set; } @@ -214,6 +213,7 @@ public QueryStringQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private double? PhraseSlopValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteAnalyzerValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } private string? RewriteValue { get; set; } @@ -221,12 +221,6 @@ public QueryStringQueryDescriptor() : base() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } - public QueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string. /// @@ -237,20 +231,20 @@ public QueryStringQueryDescriptor AllowLeadingWildcard(bool? allowLea } /// - /// If `true`, the query attempts to analyze wildcard terms in the query string. + /// Analyzer used to convert text in the query string into tokens. /// - public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) + public QueryStringQueryDescriptor Analyzer(string? analyzer) { - AnalyzeWildcardValue = analyzeWildcard; + AnalyzerValue = analyzer; return Self; } /// - /// Analyzer used to convert text in the query string into tokens. + /// If `true`, the query attempts to analyze wildcard terms in the query string. /// - public QueryStringQueryDescriptor Analyzer(string? analyzer) + public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) { - AnalyzerValue = analyzer; + AnalyzeWildcardValue = analyzeWildcard; return Self; } @@ -410,6 +404,12 @@ public QueryStringQueryDescriptor Query(string query) return Self; } + public QueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Analyzer used to convert quoted text in the query string into tokens.
For quoted text, this parameter overrides the analyzer specified in the `analyzer` parameter.
///
@@ -467,30 +467,24 @@ public QueryStringQueryDescriptor Type(Elastic.Clients.Elasticsearch. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AllowLeadingWildcardValue.HasValue) { writer.WritePropertyName("allow_leading_wildcard"); writer.WriteBooleanValue(AllowLeadingWildcardValue.Value); } - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); writer.WriteStringValue(AnalyzerValue); } + if (AnalyzeWildcardValue.HasValue) + { + writer.WritePropertyName("analyze_wildcard"); + writer.WriteBooleanValue(AnalyzeWildcardValue.Value); + } + if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -589,6 +583,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteAnalyzerValue)) { writer.WritePropertyName("quote_analyzer"); @@ -637,10 +637,9 @@ public QueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AllowLeadingWildcardValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? DefaultFieldValue { get; set; } @@ -658,6 +657,7 @@ public QueryStringQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private double? PhraseSlopValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteAnalyzerValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } private string? RewriteValue { get; set; } @@ -665,12 +665,6 @@ public QueryStringQueryDescriptor() : base() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } - public QueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string. /// @@ -681,20 +675,20 @@ public QueryStringQueryDescriptor AllowLeadingWildcard(bool? allowLeadingWildcar } /// - /// If `true`, the query attempts to analyze wildcard terms in the query string. + /// Analyzer used to convert text in the query string into tokens. /// - public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) + public QueryStringQueryDescriptor Analyzer(string? analyzer) { - AnalyzeWildcardValue = analyzeWildcard; + AnalyzerValue = analyzer; return Self; } /// - /// Analyzer used to convert text in the query string into tokens. + /// If `true`, the query attempts to analyze wildcard terms in the query string. /// - public QueryStringQueryDescriptor Analyzer(string? analyzer) + public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) { - AnalyzerValue = analyzer; + AnalyzeWildcardValue = analyzeWildcard; return Self; } @@ -863,6 +857,12 @@ public QueryStringQueryDescriptor Query(string query) return Self; } + public QueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Analyzer used to convert quoted text in the query string into tokens.
For quoted text, this parameter overrides the analyzer specified in the `analyzer` parameter.
///
@@ -920,30 +920,24 @@ public QueryStringQueryDescriptor Type(Elastic.Clients.Elasticsearch.Serverless. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AllowLeadingWildcardValue.HasValue) { writer.WritePropertyName("allow_leading_wildcard"); writer.WriteBooleanValue(AllowLeadingWildcardValue.Value); } - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); writer.WriteStringValue(AnalyzerValue); } + if (AnalyzeWildcardValue.HasValue) + { + writer.WritePropertyName("analyze_wildcard"); + writer.WriteBooleanValue(AnalyzeWildcardValue.Value); + } + if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -1042,6 +1036,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteAnalyzerValue)) { writer.WritePropertyName("quote_analyzer"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs index 100d3dfc2b2..dcc33313e31 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs @@ -77,7 +77,6 @@ public RankFeatureQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinear? LinearValue { get; set; } @@ -86,6 +85,7 @@ public RankFeatureQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithm? LogValue { get; set; } private RankFeatureFunctionLogarithmDescriptor LogDescriptor { get; set; } private Action LogDescriptorAction { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? SaturationValue { get; set; } private RankFeatureFunctionSaturationDescriptor SaturationDescriptor { get; set; } private Action SaturationDescriptorAction { get; set; } @@ -93,12 +93,6 @@ public RankFeatureQueryDescriptor() : base() private RankFeatureFunctionSigmoidDescriptor SigmoidDescriptor { get; set; } private Action SigmoidDescriptorAction { get; set; } - public RankFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RankFeatureQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -177,6 +171,12 @@ public RankFeatureQueryDescriptor Log(Action QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Saturation function used to boost relevance scores based on the value of the rank feature `field`. /// @@ -234,12 +234,6 @@ public RankFeatureQueryDescriptor Sigmoid(Action LogDescriptorAction { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? SaturationValue { get; set; } private RankFeatureFunctionSaturationDescriptor SaturationDescriptor { get; set; } private Action SaturationDescriptorAction { get; set; } @@ -340,12 +340,6 @@ public RankFeatureQueryDescriptor() : base() private RankFeatureFunctionSigmoidDescriptor SigmoidDescriptor { get; set; } private Action SigmoidDescriptorAction { get; set; } - public RankFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RankFeatureQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -433,6 +427,12 @@ public RankFeatureQueryDescriptor Log(Action /// Saturation function used to boost relevance scores based on the value of the rank feature `field`. ///
@@ -490,12 +490,6 @@ public RankFeatureQueryDescriptor Sigmoid(Action(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -72,6 +66,12 @@ public override RegexpQuery Read(ref Utf8JsonReader reader, Type typeToConvert, continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -99,12 +99,6 @@ public override void Write(Utf8JsonWriter writer, RegexpQuery value, JsonSeriali writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -129,6 +123,12 @@ public override void Write(Utf8JsonWriter writer, RegexpQuery value, JsonSeriali writer.WriteNumberValue(value.MaxDeterminizedStates.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -212,21 +212,15 @@ public RegexpQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? FlagsValue { get; set; } private int? MaxDeterminizedStatesValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public RegexpQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RegexpQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -272,6 +266,12 @@ public RegexpQueryDescriptor MaxDeterminizedStates(int? maxDeterminiz return Self; } + public RegexpQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -297,12 +297,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -327,6 +321,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -355,21 +355,15 @@ public RegexpQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string? FlagsValue { get; set; } private int? MaxDeterminizedStatesValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public RegexpQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RegexpQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -421,6 +415,12 @@ public RegexpQueryDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) return Self; } + public RegexpQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -446,12 +446,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -476,6 +470,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs index 49a13724b3c..55545a28fe7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs @@ -53,14 +53,26 @@ public RuleQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action> OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id RulesetIdValue { get; set; } + public RuleQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public RuleQueryDescriptor MatchCriteria(object matchCriteria) + { + MatchCriteriaValue = matchCriteria; + return Self; + } + public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organic) { OrganicDescriptor = null; @@ -91,18 +103,6 @@ public RuleQueryDescriptor QueryName(string? queryName) return Self; } - public RuleQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public RuleQueryDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) { RulesetIdValue = rulesetId; @@ -112,6 +112,14 @@ public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Se protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -134,14 +142,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); writer.WritePropertyName("ruleset_id"); JsonSerializer.Serialize(writer, RulesetIdValue, options); writer.WriteEndObject(); @@ -156,14 +156,26 @@ public RuleQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Id RulesetIdValue { get; set; } + public RuleQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public RuleQueryDescriptor MatchCriteria(object matchCriteria) + { + MatchCriteriaValue = matchCriteria; + return Self; + } + public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organic) { OrganicDescriptor = null; @@ -194,18 +206,6 @@ public RuleQueryDescriptor QueryName(string? queryName) return Self; } - public RuleQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public RuleQueryDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) { RulesetIdValue = rulesetId; @@ -215,6 +215,14 @@ public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -237,14 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); writer.WritePropertyName("ruleset_id"); JsonSerializer.Serialize(writer, RulesetIdValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs index 6e5d5682db0..1d7ee1ccb93 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs @@ -53,19 +53,19 @@ public ScriptQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - public ScriptQueryDescriptor QueryName(string? queryName) + public ScriptQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public ScriptQueryDescriptor Boost(float? boost) + public ScriptQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -81,18 +81,18 @@ public ScriptQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Scr protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("script"); JsonSerializer.Serialize(writer, ScriptValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs index bb22433137f..439a8f8f747 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs @@ -65,14 +65,29 @@ public ScriptScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } + public ScriptScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Documents with a score lower than this floating point number are excluded from the search results. + /// + public ScriptScoreQueryDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// Query used to return documents. /// @@ -106,21 +121,6 @@ public ScriptScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ScriptScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - public ScriptScoreQueryDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Script used to compute the score of documents returned by the query.
Important: final relevance scores from the `script_score` query cannot be negative.
///
@@ -133,6 +133,18 @@ public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -155,18 +167,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - writer.WritePropertyName("script"); JsonSerializer.Serialize(writer, ScriptValue, options); writer.WriteEndObject(); @@ -181,14 +181,29 @@ public ScriptScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } + public ScriptScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Documents with a score lower than this floating point number are excluded from the search results. + /// + public ScriptScoreQueryDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// Query used to return documents. /// @@ -222,21 +237,6 @@ public ScriptScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ScriptScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - public ScriptScoreQueryDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Script used to compute the score of documents returned by the query.
Important: final relevance scores from the `script_score` query cannot be negative.
///
@@ -249,6 +249,18 @@ public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverles protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -271,18 +283,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - writer.WritePropertyName("script"); JsonSerializer.Serialize(writer, ScriptValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs index 3b214d98c62..83583f39479 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs @@ -125,9 +125,8 @@ public SimpleQueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperatorValue { get; set; } @@ -139,11 +138,15 @@ public SimpleQueryStringQueryDescriptor() : base() private bool? LenientValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } - public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + /// + /// Analyzer used to convert text in the query string into tokens. + /// + public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) { - QueryNameValue = queryName; + AnalyzerValue = analyzer; return Self; } @@ -156,15 +159,6 @@ public SimpleQueryStringQueryDescriptor AnalyzeWildcard(bool? analyze return Self; } - /// - /// Analyzer used to convert text in the query string into tokens. - /// - public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - /// /// If `true`, the parser creates a match_phrase query for each multi-position token. /// @@ -261,6 +255,12 @@ public SimpleQueryStringQueryDescriptor Query(string query) return Self; } + public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Suffix appended to quoted text in the query string. /// @@ -273,10 +273,10 @@ public SimpleQueryStringQueryDescriptor QuoteFieldSuffix(string? quot protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) + if (!string.IsNullOrEmpty(AnalyzerValue)) { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); } if (AnalyzeWildcardValue.HasValue) @@ -285,12 +285,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(AnalyzeWildcardValue.Value); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -353,6 +347,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) { writer.WritePropertyName("quote_field_suffix"); @@ -371,9 +371,8 @@ public SimpleQueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperatorValue { get; set; } @@ -385,11 +384,15 @@ public SimpleQueryStringQueryDescriptor() : base() private bool? LenientValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } - public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + /// + /// Analyzer used to convert text in the query string into tokens. + /// + public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) { - QueryNameValue = queryName; + AnalyzerValue = analyzer; return Self; } @@ -402,15 +405,6 @@ public SimpleQueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = return Self; } - /// - /// Analyzer used to convert text in the query string into tokens. - /// - public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - /// /// If `true`, the parser creates a match_phrase query for each multi-position token. /// @@ -507,6 +501,12 @@ public SimpleQueryStringQueryDescriptor Query(string query) return Self; } + public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Suffix appended to quoted text in the query string. /// @@ -519,10 +519,10 @@ public SimpleQueryStringQueryDescriptor QuoteFieldSuffix(string? quoteFieldSuffi protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) + if (!string.IsNullOrEmpty(AnalyzerValue)) { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); } if (AnalyzeWildcardValue.HasValue) @@ -531,12 +531,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(AnalyzeWildcardValue.Value); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -599,6 +593,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) { writer.WritePropertyName("quote_field_suffix"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs index 1b11993fcae..a83181f212f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs @@ -60,11 +60,11 @@ public SpanContainingQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } private SpanQueryDescriptor BigDescriptor { get; set; } private Action> BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action> LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
@@ -93,6 +93,12 @@ public SpanContainingQueryDescriptor Big(Action Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
///
@@ -126,12 +132,6 @@ public SpanContainingQueryDescriptor QueryName(string? queryName) return Self; } - public SpanContainingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -151,6 +151,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -173,12 +179,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -194,11 +194,11 @@ public SpanContainingQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } private SpanQueryDescriptor BigDescriptor { get; set; } private Action BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
@@ -227,6 +227,12 @@ public SpanContainingQueryDescriptor Big(Action configure) return Self; } + public SpanContainingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
///
@@ -260,12 +266,6 @@ public SpanContainingQueryDescriptor QueryName(string? queryName) return Self; } - public SpanContainingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -285,6 +285,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -307,12 +313,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs index 7c6c97d6351..c452361bdbb 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs @@ -49,12 +49,30 @@ public SpanFieldMaskingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery QueryValue { get; set; } private SpanQueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + + public SpanFieldMaskingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + public SpanFieldMaskingQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery query) { @@ -86,27 +104,17 @@ public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) return Self; } - public SpanFieldMaskingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -129,14 +137,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WriteEndObject(); } } @@ -149,70 +149,78 @@ public SpanFieldMaskingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery QueryValue { get; set; } private SpanQueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery query) + public SpanFieldMaskingQueryDescriptor Boost(float? boost) { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; + BoostValue = boost; return Self; } - public SpanFieldMaskingQueryDescriptor Query(SpanQueryDescriptor descriptor) + public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; + FieldValue = field; return Self; } - public SpanFieldMaskingQueryDescriptor Query(Action configure) + public SpanFieldMaskingQueryDescriptor Field(Expression> field) { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; + FieldValue = field; return Self; } - public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) + public SpanFieldMaskingQueryDescriptor Field(Expression> field) { - QueryNameValue = queryName; + FieldValue = field; return Self; } - public SpanFieldMaskingQueryDescriptor Boost(float? boost) + public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery query) { - BoostValue = boost; + QueryDescriptor = null; + QueryDescriptorAction = null; + QueryValue = query; return Self; } - public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + public SpanFieldMaskingQueryDescriptor Query(SpanQueryDescriptor descriptor) { - FieldValue = field; + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptor = descriptor; return Self; } - public SpanFieldMaskingQueryDescriptor Field(Expression> field) + public SpanFieldMaskingQueryDescriptor Query(Action configure) { - FieldValue = field; + QueryValue = null; + QueryDescriptor = null; + QueryDescriptorAction = configure; return Self; } - public SpanFieldMaskingQueryDescriptor Field(Expression> field) + public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) { - FieldValue = field; + QueryNameValue = queryName; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -235,14 +243,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs index 713c6ecf51e..03a39e5e31a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs @@ -57,12 +57,27 @@ public SpanFirstQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int EndValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery MatchValue { get; set; } private SpanQueryDescriptor MatchDescriptor { get; set; } private Action> MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int EndValue { get; set; } + + public SpanFirstQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Controls the maximum end position permitted in a match. + /// + public SpanFirstQueryDescriptor End(int end) + { + EndValue = end; + return Self; + } /// /// Can be any other span type query. @@ -97,24 +112,17 @@ public SpanFirstQueryDescriptor QueryName(string? queryName) return Self; } - public SpanFirstQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Controls the maximum end position permitted in a match. - /// - public SpanFirstQueryDescriptor End(int end) - { - EndValue = end; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("end"); + writer.WriteNumberValue(EndValue); if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -137,14 +145,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("end"); - writer.WriteNumberValue(EndValue); writer.WriteEndObject(); } } @@ -157,12 +157,27 @@ public SpanFirstQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int EndValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery MatchValue { get; set; } private SpanQueryDescriptor MatchDescriptor { get; set; } private Action MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int EndValue { get; set; } + + public SpanFirstQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Controls the maximum end position permitted in a match. + /// + public SpanFirstQueryDescriptor End(int end) + { + EndValue = end; + return Self; + } /// /// Can be any other span type query. @@ -197,24 +212,17 @@ public SpanFirstQueryDescriptor QueryName(string? queryName) return Self; } - public SpanFirstQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Controls the maximum end position permitted in a match. - /// - public SpanFirstQueryDescriptor End(int end) - { - EndValue = end; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("end"); + writer.WriteNumberValue(EndValue); if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -237,14 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("end"); - writer.WriteNumberValue(EndValue); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs index dbb606b55f1..3085a3a6a63 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs @@ -51,11 +51,17 @@ public SpanMultiTermQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query MatchValue { get; set; } private QueryDescriptor MatchDescriptor { get; set; } private Action> MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanMultiTermQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Should be a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query). @@ -90,15 +96,15 @@ public SpanMultiTermQueryDescriptor QueryName(string? queryName) return Self; } - public SpanMultiTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -121,12 +127,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -139,11 +139,17 @@ public SpanMultiTermQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query MatchValue { get; set; } private QueryDescriptor MatchDescriptor { get; set; } private Action MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanMultiTermQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Should be a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query). @@ -178,15 +184,15 @@ public SpanMultiTermQueryDescriptor QueryName(string? queryName) return Self; } - public SpanMultiTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -209,12 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs index ffe1247cded..1b91f595d61 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs @@ -63,15 +63,21 @@ public SpanNearQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action> ClausesDescriptorAction { get; set; } private Action>[] ClausesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private bool? InOrderValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } + public SpanNearQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Array of one or more other span type queries. /// @@ -111,18 +117,6 @@ public SpanNearQueryDescriptor Clauses(params Action QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNearQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Controls whether matches are required to be in-order. /// @@ -132,6 +126,12 @@ public SpanNearQueryDescriptor InOrder(bool? inOrder = true) return Self; } + public SpanNearQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Controls the maximum number of intervening unmatched positions permitted. /// @@ -144,6 +144,12 @@ public SpanNearQueryDescriptor Slop(int? slop) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -175,24 +181,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ClausesValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (InOrderValue.HasValue) { writer.WritePropertyName("in_order"); writer.WriteBooleanValue(InOrderValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -211,15 +211,21 @@ public SpanNearQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action ClausesDescriptorAction { get; set; } private Action[] ClausesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private bool? InOrderValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } + public SpanNearQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Array of one or more other span type queries. /// @@ -259,18 +265,6 @@ public SpanNearQueryDescriptor Clauses(params Action[] conf return Self; } - public SpanNearQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNearQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Controls whether matches are required to be in-order. /// @@ -280,6 +274,12 @@ public SpanNearQueryDescriptor InOrder(bool? inOrder = true) return Self; } + public SpanNearQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Controls the maximum number of intervening unmatched positions permitted. /// @@ -292,6 +292,12 @@ public SpanNearQueryDescriptor Slop(int? slop) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -323,24 +329,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ClausesValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (InOrderValue.HasValue) { writer.WritePropertyName("in_order"); writer.WriteBooleanValue(InOrderValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs index b5090047a12..ce2cb4b00bf 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs @@ -75,17 +75,32 @@ public SpanNotQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int? DistValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery ExcludeValue { get; set; } private SpanQueryDescriptor ExcludeDescriptor { get; set; } private Action> ExcludeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery IncludeValue { get; set; } private SpanQueryDescriptor IncludeDescriptor { get; set; } private Action> IncludeDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int? DistValue { get; set; } private int? PostValue { get; set; } private int? PreValue { get; set; } + private string? QueryNameValue { get; set; } + + public SpanNotQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
+ ///
+ public SpanNotQueryDescriptor Dist(int? dist) + { + DistValue = dist; + return Self; + } /// /// Span query whose matches must not overlap those returned. @@ -141,27 +156,6 @@ public SpanNotQueryDescriptor Include(Action QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNotQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
- ///
- public SpanNotQueryDescriptor Dist(int? dist) - { - DistValue = dist; - return Self; - } - /// /// The number of tokens after the include span that can’t have overlap with the exclude span. /// @@ -180,9 +174,27 @@ public SpanNotQueryDescriptor Pre(int? pre) return Self; } + public SpanNotQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (DistValue.HasValue) + { + writer.WritePropertyName("dist"); + writer.WriteNumberValue(DistValue.Value); + } + if (ExcludeDescriptor is not null) { writer.WritePropertyName("exclude"); @@ -215,24 +227,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DistValue.HasValue) - { - writer.WritePropertyName("dist"); - writer.WriteNumberValue(DistValue.Value); - } - if (PostValue.HasValue) { writer.WritePropertyName("post"); @@ -245,6 +239,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PreValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } @@ -257,17 +257,32 @@ public SpanNotQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int? DistValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery ExcludeValue { get; set; } private SpanQueryDescriptor ExcludeDescriptor { get; set; } private Action ExcludeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery IncludeValue { get; set; } private SpanQueryDescriptor IncludeDescriptor { get; set; } private Action IncludeDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int? DistValue { get; set; } private int? PostValue { get; set; } private int? PreValue { get; set; } + private string? QueryNameValue { get; set; } + + public SpanNotQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
+ ///
+ public SpanNotQueryDescriptor Dist(int? dist) + { + DistValue = dist; + return Self; + } /// /// Span query whose matches must not overlap those returned. @@ -323,27 +338,6 @@ public SpanNotQueryDescriptor Include(Action configure) return Self; } - public SpanNotQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNotQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
- ///
- public SpanNotQueryDescriptor Dist(int? dist) - { - DistValue = dist; - return Self; - } - /// /// The number of tokens after the include span that can’t have overlap with the exclude span. /// @@ -362,9 +356,27 @@ public SpanNotQueryDescriptor Pre(int? pre) return Self; } + public SpanNotQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (DistValue.HasValue) + { + writer.WritePropertyName("dist"); + writer.WriteNumberValue(DistValue.Value); + } + if (ExcludeDescriptor is not null) { writer.WritePropertyName("exclude"); @@ -397,24 +409,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DistValue.HasValue) - { - writer.WritePropertyName("dist"); - writer.WriteNumberValue(DistValue.Value); - } - if (PostValue.HasValue) { writer.WritePropertyName("post"); @@ -427,6 +421,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PreValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs index eefff7850d4..f4603d9591d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs @@ -51,12 +51,18 @@ public SpanOrQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action> ClausesDescriptorAction { get; set; } private Action>[] ClausesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanOrQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Array of one or more other span type queries. @@ -103,15 +109,15 @@ public SpanOrQueryDescriptor QueryName(string? queryName) return Self; } - public SpanOrQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -149,12 +155,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -167,12 +167,18 @@ public SpanOrQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action ClausesDescriptorAction { get; set; } private Action[] ClausesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanOrQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Array of one or more other span type queries. @@ -219,15 +225,15 @@ public SpanOrQueryDescriptor QueryName(string? queryName) return Self; } - public SpanOrQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -265,12 +271,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs index 44ef7a02047..4859ffcc5e7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs @@ -42,15 +42,15 @@ public override SpanTermQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") + if (property == "boost") { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + variant.Boost = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "boost") + if (property == "_name") { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -75,18 +75,18 @@ public override void Write(Utf8JsonWriter writer, SpanTermQuery value, JsonSeria writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(value.Boost.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WritePropertyName("value"); writer.WriteStringValue(value.Value); writer.WriteEndObject(); @@ -138,17 +138,11 @@ public SpanTermQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string ValueValue { get; set; } - public SpanTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public SpanTermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -167,6 +161,12 @@ public SpanTermQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public SpanTermQueryDescriptor Value(string value) { ValueValue = value; @@ -180,18 +180,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("value"); writer.WriteStringValue(ValueValue); writer.WriteEndObject(); @@ -214,17 +214,11 @@ public SpanTermQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string ValueValue { get; set; } - public SpanTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public SpanTermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -249,6 +243,12 @@ public SpanTermQueryDescriptor Field(Expression BigDescriptor { get; set; } private Action> BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action> LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
@@ -93,6 +93,12 @@ public SpanWithinQueryDescriptor Big(Action Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
///
@@ -126,12 +132,6 @@ public SpanWithinQueryDescriptor QueryName(string? queryName) return Self; } - public SpanWithinQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -151,6 +151,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -173,12 +179,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -194,11 +194,11 @@ public SpanWithinQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } private SpanQueryDescriptor BigDescriptor { get; set; } private Action BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
@@ -227,6 +227,12 @@ public SpanWithinQueryDescriptor Big(Action configure) return Self; } + public SpanWithinQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
///
@@ -260,12 +266,6 @@ public SpanWithinQueryDescriptor QueryName(string? queryName) return Self; } - public SpanWithinQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -285,6 +285,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -307,12 +313,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs index dbcb560e43b..c2d383c9bbd 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs @@ -42,12 +42,6 @@ public override TermQuery Read(ref Utf8JsonReader reader, Type typeToConvert, Js if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -60,6 +54,12 @@ public override TermQuery Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "value") { variant.Value = JsonSerializer.Deserialize(ref reader, options); @@ -81,12 +81,6 @@ public override void Write(Utf8JsonWriter writer, TermQuery value, JsonSerialize writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -99,6 +93,12 @@ public override void Write(Utf8JsonWriter writer, TermQuery value, JsonSerialize writer.WriteBooleanValue(value.CaseInsensitive.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WritePropertyName("value"); JsonSerializer.Serialize(writer, value.Value, options); writer.WriteEndObject(); @@ -161,18 +161,12 @@ public TermQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue ValueValue { get; set; } - public TermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -200,6 +194,12 @@ public TermQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Term you wish to find in the provided field. /// @@ -216,12 +216,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -234,6 +228,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("value"); JsonSerializer.Serialize(writer, ValueValue, options); writer.WriteEndObject(); @@ -256,18 +256,12 @@ public TermQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue ValueValue { get; set; } - public TermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -301,6 +295,12 @@ public TermQueryDescriptor Field(Expression> return Self; } + public TermQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Term you wish to find in the provided field. /// @@ -317,12 +317,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -335,6 +329,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("value"); JsonSerializer.Serialize(writer, ValueValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs index d222b19f54d..95a4e51473a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs @@ -39,15 +39,15 @@ public override TermsQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") + if (property == "boost") { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + variant.Boost = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "boost") + if (property == "_name") { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -75,18 +75,18 @@ public override void Write(Utf8JsonWriter writer, TermsQuery value, JsonSerializ JsonSerializer.Serialize(writer, value.Terms, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(value.Boost.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WriteEndObject(); } } @@ -112,20 +112,20 @@ public TermsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField TermsValue { get; set; } - public TermsQueryDescriptor QueryName(string? queryName) + public TermsQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public TermsQueryDescriptor Boost(float? boost) + public TermsQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -157,18 +157,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, TermsValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } @@ -181,20 +181,20 @@ public TermsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField TermsValue { get; set; } - public TermsQueryDescriptor QueryName(string? queryName) + public TermsQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public TermsQueryDescriptor Boost(float? boost) + public TermsQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -232,18 +232,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, TermsValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ 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 0f0e0f25cf7..b796f1fbd37 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 @@ -42,12 +42,6 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -66,6 +60,12 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "terms") { variant.Terms = JsonSerializer.Deserialize>(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSeria writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -111,6 +105,12 @@ public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSeria JsonSerializer.Serialize(writer, value.MinimumShouldMatchScript, options); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WritePropertyName("terms"); JsonSerializer.Serialize(writer, value.Terms, options); writer.WriteEndObject(); @@ -178,19 +178,13 @@ public TermsSetQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScriptValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection TermsValue { get; set; } - public TermsSetQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermsSetQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -236,6 +230,12 @@ public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clien return Self; } + public TermsSetQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Array of terms you wish to find in the provided field. /// @@ -252,12 +252,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -276,6 +270,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MinimumShouldMatchScriptValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("terms"); JsonSerializer.Serialize(writer, TermsValue, options); writer.WriteEndObject(); @@ -298,19 +298,13 @@ public TermsSetQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScriptValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection TermsValue { get; set; } - public TermsSetQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermsSetQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -371,6 +365,12 @@ public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clients.Elastics return Self; } + public TermsSetQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Array of terms you wish to find in the provided field. /// @@ -387,12 +387,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -411,6 +405,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MinimumShouldMatchScriptValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("terms"); JsonSerializer.Serialize(writer, TermsValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs index 959510bf036..c3e806ce2ad 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs @@ -42,12 +42,6 @@ public override TextExpansionQuery Read(ref Utf8JsonReader reader, Type typeToCo if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -65,6 +59,12 @@ public override TextExpansionQuery Read(ref Utf8JsonReader reader, Type typeToCo variant.ModelText = JsonSerializer.Deserialize(ref reader, options); continue; } + + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } } } @@ -81,12 +81,6 @@ public override void Write(Utf8JsonWriter writer, TextExpansionQuery value, Json writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -97,6 +91,12 @@ public override void Write(Utf8JsonWriter writer, TextExpansionQuery value, Json writer.WriteStringValue(value.ModelId); writer.WritePropertyName("model_text"); writer.WriteStringValue(value.ModelText); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WriteEndObject(); writer.WriteEndObject(); return; @@ -157,17 +157,11 @@ public TextExpansionQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string ModelIdValue { get; set; } private string ModelTextValue { get; set; } - - public TextExpansionQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public TextExpansionQueryDescriptor Boost(float? boost) { @@ -205,6 +199,12 @@ public TextExpansionQueryDescriptor ModelText(string modelText) return Self; } + public TextExpansionQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -212,12 +212,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -228,6 +222,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(ModelIdValue); writer.WritePropertyName("model_text"); writer.WriteStringValue(ModelTextValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } @@ -248,17 +248,11 @@ public TextExpansionQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private string ModelIdValue { get; set; } private string ModelTextValue { get; set; } - - public TextExpansionQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public TextExpansionQueryDescriptor Boost(float? boost) { @@ -302,6 +296,12 @@ public TextExpansionQueryDescriptor ModelText(string modelText) return Self; } + public TextExpansionQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -309,12 +309,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -325,6 +319,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(ModelIdValue); writer.WritePropertyName("model_text"); writer.WriteStringValue(ModelTextValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs index 6db116334cb..23098f344c5 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs @@ -42,12 +42,6 @@ public override WildcardQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -60,6 +54,12 @@ public override WildcardQuery Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -93,12 +93,6 @@ public override void Write(Utf8JsonWriter writer, WildcardQuery value, JsonSeria writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -111,6 +105,12 @@ public override void Write(Utf8JsonWriter writer, WildcardQuery value, JsonSeria writer.WriteBooleanValue(value.CaseInsensitive.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -199,20 +199,14 @@ public WildcardQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string? ValueValue { get; set; } private string? WildcardValue { get; set; } - public WildcardQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public WildcardQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -240,6 +234,12 @@ public WildcardQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -274,12 +274,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -292,6 +286,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -330,20 +330,14 @@ public WildcardQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string? ValueValue { get; set; } private string? WildcardValue { get; set; } - public WildcardQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public WildcardQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -377,6 +371,12 @@ public WildcardQueryDescriptor Field(Expression /// Method used to rewrite the query. ///
@@ -411,12 +411,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -429,6 +423,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs index 86c6b164f21..336483cb0c0 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs @@ -53,15 +53,9 @@ public WrapperQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private string QueryValue { get; set; } - - public WrapperQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public WrapperQueryDescriptor Boost(float? boost) { @@ -78,15 +72,15 @@ public WrapperQueryDescriptor Query(string query) return Self; } + public WrapperQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -95,6 +89,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs index 8b90703defb..e8efa5f9900 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs @@ -51,14 +51,20 @@ public ScriptSortDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action> NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? TypeValue { get; set; } + public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) + { + ModeValue = mode; + return Self; + } + public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) { NestedDescriptor = null; @@ -83,12 +89,6 @@ public ScriptSortDescriptor Nested(Action Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - public ScriptSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) { OrderValue = order; @@ -110,6 +110,12 @@ public ScriptSortDescriptor Type(Elastic.Clients.Elasticsearch.Server protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ModeValue is not null) + { + writer.WritePropertyName("mode"); + JsonSerializer.Serialize(writer, ModeValue, options); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -126,12 +132,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); @@ -158,14 +158,20 @@ public ScriptSortDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? TypeValue { get; set; } + public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) + { + ModeValue = mode; + return Self; + } + public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) { NestedDescriptor = null; @@ -190,12 +196,6 @@ public ScriptSortDescriptor Nested(Action configure) return Self; } - public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - public ScriptSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) { OrderValue = order; @@ -217,6 +217,12 @@ public ScriptSortDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Script protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ModeValue is not null) + { + writer.WritePropertyName("mode"); + JsonSerializer.Serialize(writer, ModeValue, options); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -233,12 +239,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs index 5300c989e83..b5a329e010c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -21,70 +21,52 @@ namespace Elastic.Clients.Elasticsearch.Requests; internal static class ApiUrlLookup { - internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" }); internal static ApiUrls AsyncSearchDelete = new ApiUrls(new[] { "_async_search/{id}" }); internal static ApiUrls AsyncSearchGet = new ApiUrls(new[] { "_async_search/{id}" }); + internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" }); internal static ApiUrls AsyncSearchSubmit = new ApiUrls(new[] { "_async_search", "{index}/_async_search" }); - internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); - internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); - internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[] { "_cluster/allocation/explain" }); - internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" }); internal static ApiUrls ClusterGetSettings = new ApiUrls(new[] { "_cluster/settings" }); internal static ApiUrls ClusterHealth = new ApiUrls(new[] { "_cluster/health", "_cluster/health/{index}" }); internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[] { "_cluster/pending_tasks" }); - internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); - internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" }); + internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" }); internal static ApiUrls DanglingIndicesListDanglingIndices = new ApiUrls(new[] { "_dangling" }); - internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" }); - internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" }); - internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" }); internal static ApiUrls EnrichDeletePolicy = new ApiUrls(new[] { "_enrich/policy/{name}" }); - internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" }); internal static ApiUrls EnrichExecutePolicy = new ApiUrls(new[] { "_enrich/policy/{name}/_execute" }); internal static ApiUrls EnrichGetPolicy = new ApiUrls(new[] { "_enrich/policy/{name}", "_enrich/policy" }); internal static ApiUrls EnrichPutPolicy = new ApiUrls(new[] { "_enrich/policy/{name}" }); + internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" }); internal static ApiUrls EqlDelete = new ApiUrls(new[] { "_eql/search/{id}" }); internal static ApiUrls EqlGet = new ApiUrls(new[] { "_eql/search/{id}" }); - internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" }); internal static ApiUrls EqlGetStatus = new ApiUrls(new[] { "_eql/search/status/{id}" }); - internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" }); - internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" }); - internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" }); - internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceGetScriptContext = new ApiUrls(new[] { "_script_context" }); - internal static ApiUrls NoNamespaceGetScriptLanguages = new ApiUrls(new[] { "_script_language" }); - internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" }); - internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" }); + internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" }); + internal static ApiUrls EsqlQuery = new ApiUrls(new[] { "_query" }); internal static ApiUrls GraphExplore = new ApiUrls(new[] { "{index}/_graph/explore" }); internal static ApiUrls IndexManagementClone = new ApiUrls(new[] { "{index}/_clone/{target}" }); internal static ApiUrls IndexManagementClose = new ApiUrls(new[] { "{index}/_close" }); - internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); internal static ApiUrls IndexManagementCreate = new ApiUrls(new[] { "{index}" }); + internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); + internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementDeleteAlias = new ApiUrls(new[] { "{index}/_alias/{name}" }); internal static ApiUrls IndexManagementDeleteDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); internal static ApiUrls IndexManagementDeleteDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); - internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementDeleteIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); internal static ApiUrls IndexManagementDeleteTemplate = new ApiUrls(new[] { "_template/{name}" }); + internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementExistsAlias = new ApiUrls(new[] { "_alias/{name}", "{index}/_alias/{name}" }); internal static ApiUrls IndexManagementExistsIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); - internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementExistsTemplate = new ApiUrls(new[] { "_template/{name}" }); internal static ApiUrls IndexManagementExplainDataLifecycle = new ApiUrls(new[] { "{index}/_lifecycle/explain" }); internal static ApiUrls IndexManagementFlush = new ApiUrls(new[] { "_flush", "{index}/_flush" }); internal static ApiUrls IndexManagementForcemerge = new ApiUrls(new[] { "_forcemerge", "{index}/_forcemerge" }); + internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementGetAlias = new ApiUrls(new[] { "_alias", "_alias/{name}", "{index}/_alias/{name}", "{index}/_alias" }); internal static ApiUrls IndexManagementGetDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); internal static ApiUrls IndexManagementGetDataStream = new ApiUrls(new[] { "_data_stream", "_data_stream/{name}" }); internal static ApiUrls IndexManagementGetFieldMapping = new ApiUrls(new[] { "_mapping/field/{fields}", "{index}/_mapping/field/{fields}" }); - internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" }); internal static ApiUrls IndexManagementGetIndexTemplate = new ApiUrls(new[] { "_index_template", "_index_template/{name}" }); internal static ApiUrls IndexManagementGetMapping = new ApiUrls(new[] { "_mapping", "{index}/_mapping" }); internal static ApiUrls IndexManagementGetTemplate = new ApiUrls(new[] { "_template", "_template/{name}" }); - internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" }); internal static ApiUrls IndexManagementMigrateToDataStream = new ApiUrls(new[] { "_data_stream/_migrate/{name}" }); internal static ApiUrls IndexManagementOpen = new ApiUrls(new[] { "{index}/_open" }); internal static ApiUrls IndexManagementPutAlias = new ApiUrls(new[] { "{index}/_alias/{name}" }); @@ -98,15 +80,34 @@ internal static class ApiUrlLookup internal static ApiUrls IndexManagementSimulateIndexTemplate = new ApiUrls(new[] { "_index_template/_simulate_index/{name}" }); internal static ApiUrls IndexManagementSimulateTemplate = new ApiUrls(new[] { "_index_template/_simulate", "_index_template/_simulate/{name}" }); internal static ApiUrls IndexManagementSplit = new ApiUrls(new[] { "{index}/_split/{target}" }); + internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" }); internal static ApiUrls IndexManagementUpdateAliases = new ApiUrls(new[] { "_aliases" }); - internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" }); - internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" }); internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" }); internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "_ingest/geoip/stats" }); internal static ApiUrls IngestGetPipeline = new ApiUrls(new[] { "_ingest/pipeline", "_ingest/pipeline/{id}" }); internal static ApiUrls IngestProcessorGrok = new ApiUrls(new[] { "_ingest/processor/grok" }); internal static ApiUrls IngestPutPipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" }); internal static ApiUrls IngestSimulate = new ApiUrls(new[] { "_ingest/pipeline/_simulate", "_ingest/pipeline/{id}/_simulate" }); + internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); + internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); + internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); + internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); + internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" }); + internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" }); + internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" }); + internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" }); + internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" }); + internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" }); + internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" }); + internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" }); + internal static ApiUrls NoNamespaceGetScriptContext = new ApiUrls(new[] { "_script_context" }); + internal static ApiUrls NoNamespaceGetScriptLanguages = new ApiUrls(new[] { "_script_language" }); + internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" }); + internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" }); + internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" }); internal static ApiUrls NoNamespaceMget = new ApiUrls(new[] { "_mget", "{index}/_mget" }); internal static ApiUrls NoNamespaceMsearch = new ApiUrls(new[] { "_msearch", "{index}/_msearch" }); internal static ApiUrls NoNamespaceMsearchTemplate = new ApiUrls(new[] { "_msearch/template", "{index}/_msearch/template" }); @@ -122,6 +123,11 @@ internal static class ApiUrlLookup internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "_search", "{index}/_search" }); internal static ApiUrls NoNamespaceSearchShards = new ApiUrls(new[] { "_search_shards", "{index}/_search_shards" }); internal static ApiUrls NoNamespaceSearchTemplate = new ApiUrls(new[] { "_search/template", "{index}/_search/template" }); + internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" }); + internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" }); + internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); + internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); + internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); internal static ApiUrls SqlClearCursor = new ApiUrls(new[] { "_sql/close" }); internal static ApiUrls SqlDeleteAsync = new ApiUrls(new[] { "_sql/async/delete/{id}" }); internal static ApiUrls SqlGetAsync = new ApiUrls(new[] { "_sql/async/{id}" }); @@ -130,9 +136,4 @@ internal static class ApiUrlLookup internal static ApiUrls TasksCancel = new ApiUrls(new[] { "_tasks/_cancel", "_tasks/{task_id}/_cancel" }); internal static ApiUrls TasksGet = new ApiUrls(new[] { "_tasks/{task_id}" }); internal static ApiUrls TasksList = new ApiUrls(new[] { "_tasks" }); - internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" }); - internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" }); - internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); - internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); - internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs index 66c67686fc9..00816ab817b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -31,21 +31,6 @@ namespace Elastic.Clients.Elasticsearch.AsyncSearch; public sealed class SubmitAsyncSearchRequestParameters : RequestParameters { - /// - /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
- ///
- public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } - - /// - /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. - /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } - - /// - /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
- ///
- public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -101,6 +86,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters ///
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + /// + /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
+ ///
+ public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + + /// + /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. + /// + public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } + /// /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored /// @@ -122,10 +117,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters ///
public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Specify if request cache should be used for this request or not, defaults to true /// public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// /// A comma-separated list of specific routing values @@ -138,6 +139,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + /// + /// A list of fields to exclude from the returned _source field + /// + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + /// + /// A list of fields to extract and return from the _source field + /// + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + /// /// Specifies which field to use for suggestions. /// @@ -162,22 +173,11 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response ///
public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// A list of fields to exclude from the returned _source field - /// - public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// A list of fields to extract and return from the _source field - /// - public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Query in the Lucene query string syntax + /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } } internal sealed partial class SubmitAsyncSearchRequestConverter : JsonConverter @@ -204,6 +204,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "docvalue_fields") + { + variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "explain") { variant.Explain = JsonSerializer.Deserialize(ref reader, options); @@ -216,21 +222,21 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "from") + if (property == "fields") { - variant.From = JsonSerializer.Deserialize(ref reader, options); + variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); continue; } - if (property == "highlight") + if (property == "from") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.From = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "track_total_hits") + if (property == "highlight") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -240,12 +246,6 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - if (property == "knn") { variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); @@ -258,6 +258,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "pit") + { + variant.Pit = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "post_filter") { variant.PostFilter = JsonSerializer.Deserialize(ref reader, options); @@ -282,6 +288,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "runtime_mappings") + { + variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "script_fields") { variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); @@ -294,6 +306,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } + if (property == "seq_no_primary_term") + { + variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "size") { variant.Size = JsonSerializer.Deserialize(ref reader, options); @@ -318,9 +336,15 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "fields") + if (property == "stats") { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); + variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + + if (property == "stored_fields") + { + variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -348,39 +372,15 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty continue; } - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") + if (property == "track_total_hits") { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "stats") + if (property == "version") { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + variant.Version = JsonSerializer.Deserialize(ref reader, options); continue; } } @@ -404,6 +404,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Collapse, options); } + if (value.DocvalueFields is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, value.DocvalueFields, options); + } + if (value.Explain.HasValue) { writer.WritePropertyName("explain"); @@ -416,6 +422,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Ext, options); } + if (value.Fields is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, value.Fields, options); + } + if (value.From.HasValue) { writer.WritePropertyName("from"); @@ -428,24 +440,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Highlight, options); } - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - if (value.IndicesBoost is not null) { writer.WritePropertyName("indices_boost"); JsonSerializer.Serialize(writer, value.IndicesBoost, options); } - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - if (value.Knn is not null) { writer.WritePropertyName("knn"); @@ -458,6 +458,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value writer.WriteNumberValue(value.MinScore.Value); } + if (value.Pit is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, value.Pit, options); + } + if (value.PostFilter is not null) { writer.WritePropertyName("post_filter"); @@ -482,6 +488,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Rescore, options); } + if (value.RuntimeMappings is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + } + if (value.ScriptFields is not null) { writer.WritePropertyName("script_fields"); @@ -494,6 +506,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.SearchAfter, options); } + if (value.SeqNoPrimaryTerm.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); + } + if (value.Size.HasValue) { writer.WritePropertyName("size"); @@ -518,10 +536,16 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value JsonSerializer.Serialize(writer, value.Source, options); } - if (value.Fields is not null) + if (value.Stats is not null) { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); + writer.WritePropertyName("stats"); + JsonSerializer.Serialize(writer, value.Stats, options); + } + + if (value.StoredFields is not null) + { + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, value.StoredFields, options); } if (value.Suggest is not null) @@ -548,40 +572,16 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value writer.WriteBooleanValue(value.TrackScores.Value); } - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, value.StoredFields, options); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.RuntimeMappings is not null) + if (value.TrackTotalHits is not null) { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + writer.WritePropertyName("track_total_hits"); + JsonSerializer.Serialize(writer, value.TrackTotalHits, options); } - if (value.Stats is not null) + if (value.Version.HasValue) { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); + writer.WritePropertyName("version"); + writer.WriteBooleanValue(value.Version.Value); } writer.WriteEndObject(); @@ -610,24 +610,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) internal override string OperationName => "async_search.submit"; - /// - /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
- ///
- [JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } - - /// - /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. - /// - [JsonIgnore] - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } - - /// - /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
- ///
- [JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -695,17 +677,29 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// - /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
///
[JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } + public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } /// - /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. /// [JsonIgnore] - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - [JsonIgnore] + public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } + + /// + /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + /// + [JsonIgnore] + public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } + + /// + /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + /// + [JsonIgnore] + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + [JsonIgnore] public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } /// @@ -720,11 +714,19 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonIgnore] public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax + /// + [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Specify if request cache should be used for this request or not, defaults to true /// [JsonIgnore] public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + [JsonIgnore] + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// /// A comma-separated list of specific routing values @@ -740,6 +742,18 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonIgnore] public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + /// + /// A list of fields to exclude from the returned _source field + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + /// + /// A list of fields to extract and return from the _source field + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + /// /// Specifies which field to use for suggestions. /// @@ -769,31 +783,23 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) /// [JsonIgnore] public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// A list of fields to exclude from the returned _source field - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// A list of fields to extract and return from the _source field - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Query in the Lucene query string syntax + /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
[JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } [JsonInclude, JsonPropertyName("aggregations")] public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; } [JsonInclude, JsonPropertyName("collapse")] public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } + /// + /// Array of wildcard (*) patterns. The request returns doc values for field
names matching these patterns in the hits.fields property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("docvalue_fields")] + public ICollection? DocvalueFields { get; set; } + /// /// If true, returns detailed information about score computation as part of a hit. /// @@ -806,6 +812,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude, JsonPropertyName("ext")] public IDictionary? Ext { get; set; } + /// + /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("fields")] + public ICollection? Fields { get; set; } + /// /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
///
@@ -814,28 +826,17 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude, JsonPropertyName("highlight")] public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } - /// - /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
- ///
- [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } - /// /// Boosts the _score of documents from specified indices. /// [JsonInclude, JsonPropertyName("indices_boost")] public ICollection>? IndicesBoost { get; set; } - /// - /// Array of wildcard (*) patterns. The request returns doc values for field
names matching these patterns in the hits.fields property of the response.
- ///
- [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - /// /// Defines the approximate kNN search to run. /// - [JsonInclude, JsonPropertyName("knn"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnQuery))] + [JsonInclude, JsonPropertyName("knn")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnQuery))] public ICollection? Knn { get; set; } /// @@ -843,6 +844,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) /// [JsonInclude, JsonPropertyName("min_score")] public double? MinScore { get; set; } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ [JsonInclude, JsonPropertyName("pit")] + public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } [JsonInclude, JsonPropertyName("post_filter")] public Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilter { get; set; } [JsonInclude, JsonPropertyName("profile")] @@ -853,9 +860,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) ///
[JsonInclude, JsonPropertyName("query")] public Elastic.Clients.Elasticsearch.QueryDsl.Query? Query { get; set; } - [JsonInclude, JsonPropertyName("rescore"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.Rescore))] + [JsonInclude, JsonPropertyName("rescore")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.Rescore))] public ICollection? Rescore { get; set; } + /// + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } + /// /// Retrieve a script evaluation (based on different fields) for each hit. /// @@ -864,6 +878,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude, JsonPropertyName("search_after")] public ICollection? SearchAfter { get; set; } + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ [JsonInclude, JsonPropertyName("seq_no_primary_term")] + public bool? SeqNoPrimaryTerm { get; set; } + /// /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
///
@@ -871,7 +891,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) public int? Size { get; set; } [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] public ICollection? Sort { get; set; } /// @@ -881,10 +902,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } /// - /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
+ /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } + [JsonInclude, JsonPropertyName("stats")] + public ICollection? Stats { get; set; } + + /// + /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
+ ///
+ [JsonInclude, JsonPropertyName("stored_fields")] + public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } [JsonInclude, JsonPropertyName("suggest")] public Elastic.Clients.Elasticsearch.Core.Search.Suggester? Suggest { get; set; } @@ -907,40 +934,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) public bool? TrackScores { get; set; } /// - /// If true, returns document version as part of a hit. - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- [JsonInclude, JsonPropertyName("stored_fields")] - public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } - - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- [JsonInclude, JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } - - /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
///
- [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("track_total_hits")] + public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } /// - /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
+ /// If true, returns document version as part of a hit. ///
- [JsonInclude, JsonPropertyName("stats")] - public ICollection? Stats { get; set; } + [JsonInclude, JsonPropertyName("version")] + public bool? Version { get; set; } } /// @@ -962,12 +965,10 @@ public SubmitAsyncSearchRequestDescriptor() internal override string OperationName => "async_search.submit"; - public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -980,14 +981,16 @@ public SubmitAsyncSearchRequestDescriptor() public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Duration? scroll) => Qs("scroll", scroll); public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.SearchType? searchType) => Qs("search_type", searchType); + public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Field? suggestField) => Qs("suggest_field", suggestField); public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -1011,20 +1014,29 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } private Action>[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action> KnnDescriptorAction { get; set; } private Action>[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action> PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } @@ -1032,6 +1044,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } private Action>[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } @@ -1040,20 +1057,6 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } @@ -1152,6 +1155,24 @@ public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Actio return Self; } + /// + /// If true, returns detailed information about score computation as part of a hit. + /// + public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -1191,6 +1212,15 @@ public SubmitAsyncSearchRequestDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -1215,6 +1245,15 @@ public SubmitAsyncSearchRequestDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + ///
+ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -1254,6 +1293,42 @@ public SubmitAsyncSearchRequestDescriptor Knn(params Action + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ ///
+ public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? postFilter) { PostFilterDescriptor = null; @@ -1278,6 +1353,12 @@ public SubmitAsyncSearchRequestDescriptor PostFilter(Action Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -1341,6 +1422,48 @@ public SubmitAsyncSearchRequestDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? slice) { SliceDescriptor = null; @@ -1410,126 +1533,6 @@ public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elas return Self; } - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// Boosts the _score of documents from specified indices. - /// - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
- ///
- public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
@@ -1683,6 +1686,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -1714,6 +1729,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -1730,6 +1751,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -1759,6 +1786,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -1775,6 +1824,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -1820,6 +1875,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -1871,98 +1956,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) + if (StatsValue is not null) { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); + writer.WritePropertyName("stats"); + JsonSerializer.Serialize(writer, StatsValue, options); } - if (ExtValue is not null) + if (StoredFieldsValue is not null) { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, StoredFieldsValue, options); } if (SuggestDescriptor is not null) @@ -2034,12 +2037,10 @@ public SubmitAsyncSearchRequestDescriptor() internal override string OperationName => "async_search.submit"; - public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -2052,14 +2053,16 @@ public SubmitAsyncSearchRequestDescriptor() public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Duration? scroll) => Qs("scroll", scroll); public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.SearchType? searchType) => Qs("search_type", searchType); + public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Field? suggestField) => Qs("suggest_field", suggestField); public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -2083,20 +2086,29 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } private Action[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action KnnDescriptorAction { get; set; } private Action[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } @@ -2104,6 +2116,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } private Action[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } @@ -2112,20 +2129,6 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } @@ -2224,6 +2227,24 @@ public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + ///
+ public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -2263,6 +2284,15 @@ public SubmitAsyncSearchRequestDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -2287,6 +2317,15 @@ public SubmitAsyncSearchRequestDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + ///
+ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -2326,6 +2365,42 @@ public SubmitAsyncSearchRequestDescriptor Knn(params Action[ return Self; } + /// + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ ///
+ public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SubmitAsyncSearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? postFilter) { PostFilterDescriptor = null; @@ -2350,6 +2425,12 @@ public SubmitAsyncSearchRequestDescriptor PostFilter(Action /// Defines the search definition using the Query DSL. ///
@@ -2413,6 +2494,48 @@ public SubmitAsyncSearchRequestDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? slice) { SliceDescriptor = null; @@ -2483,144 +2606,24 @@ public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.C } /// - /// If true, returns detailed information about score computation as part of a hit. + /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) + public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats) { - ExplainValue = explain; + StatsValue = stats; return Self; } /// - /// Configuration of search extensions defined by Elasticsearch plugins. + /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
///
- public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) + public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) { - ExtValue = selector?.Invoke(new FluentDictionary()); + StoredFieldsValue = storedFields; return Self; } - /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// Boosts the _score of documents from specified indices. - /// - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
- ///
- public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
- ///
- public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) + public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -2755,6 +2758,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -2786,6 +2801,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -2802,6 +2823,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -2831,6 +2858,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -2847,6 +2896,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -2892,6 +2947,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -2943,88 +3028,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs index ae8e875fd6d..b5884533a6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs @@ -41,6 +41,11 @@ public sealed class BulkRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the request’s actions must target an index alias. + /// + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -70,11 +75,6 @@ public sealed class BulkRequestParameters : RequestParameters /// The number of shard copies that must be active before proceeding with the operation.
Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the request’s actions must target an index alias. - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -110,6 +110,12 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r [JsonIgnore] public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the request’s actions must target an index alias. + /// + [JsonIgnore] + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -145,12 +151,6 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r /// [JsonIgnore] public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the request’s actions must target an index alias. - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -172,13 +172,13 @@ public BulkRequestDescriptor() internal override string OperationName => "bulk"; - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? refresh) => Qs("refresh", refresh); public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -212,13 +212,13 @@ public BulkRequestDescriptor() internal override string OperationName => "bulk"; - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? refresh) => Qs("refresh", refresh); public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs index de14efad4af..b1e93396266 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs @@ -201,9 +201,9 @@ public HealthRequestDescriptor() public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents); + public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards); public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards); - public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus); public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) @@ -243,9 +243,9 @@ public HealthRequestDescriptor() public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents); + public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards); public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards); - public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes); public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus); public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs index e7efa60f0a2..46eb5eaadf4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs @@ -86,6 +86,11 @@ public sealed class CountRequestParameters : RequestParameters /// public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -95,11 +100,6 @@ public sealed class CountRequestParameters : RequestParameters /// Maximum number of documents to collect for each shard.
If a query reaches this limit, Elasticsearch terminates the query early.
Elasticsearch collects documents before sorting.
/// public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// Query in the Lucene query string syntax. - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } } /// @@ -190,22 +190,22 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => public string? Preference { get => Q("preference"); set => Q("preference", value); } /// - /// Custom value used to route operations to a specific shard. + /// Query in the Lucene query string syntax. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } /// - /// Maximum number of documents to collect for each shard.
If a query reaches this limit, Elasticsearch terminates the query early.
Elasticsearch collects documents before sorting.
+ /// Custom value used to route operations to a specific shard. ///
[JsonIgnore] - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } /// - /// Query in the Lucene query string syntax. + /// Maximum number of documents to collect for each shard.
If a query reaches this limit, Elasticsearch terminates the query early.
Elasticsearch collects documents before sorting.
///
[JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } /// /// Defines the search definition using the Query DSL. @@ -238,8 +238,8 @@ public CountRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opti internal override string OperationName => "count"; public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public CountRequestDescriptor Df(string? df) => Qs("df", df); public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -248,7 +248,7 @@ public CountRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opti public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore); public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); @@ -336,8 +336,8 @@ public CountRequestDescriptor() internal override string OperationName => "count"; public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public CountRequestDescriptor Df(string? df) => Qs("df", df); public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -346,7 +346,7 @@ public CountRequestDescriptor() public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore); public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs index 3496d817a04..c5b6e7825d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs @@ -86,6 +86,11 @@ public sealed class DeleteByQueryRequestParameters : RequestParameters /// public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. /// @@ -106,11 +111,6 @@ public sealed class DeleteByQueryRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - /// - /// Query in the Lucene query string syntax. - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - /// /// Period to retain the search context for scrolling. /// @@ -255,6 +255,12 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. /// @@ -279,12 +285,6 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas [JsonIgnore] public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - /// - /// Query in the Lucene query string syntax. - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - /// /// Period to retain the search context for scrolling. /// @@ -400,8 +400,8 @@ internal DeleteByQueryRequestDescriptor() internal override string OperationName => "delete_by_query"; public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) => Qs("conflicts", conflicts); public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df); @@ -410,7 +410,7 @@ internal DeleteByQueryRequestDescriptor() public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); @@ -434,13 +434,22 @@ public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elastic return Self; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } - private long? MaxDocsValue { get; set; } + + /// + /// The maximum number of documents to delete. + /// + public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to delete using the Query DSL. @@ -496,18 +505,15 @@ public DeleteByQueryRequestDescriptor Slice(Action - /// The maximum number of documents to delete. - /// - public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -540,12 +546,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - writer.WriteEndObject(); } } @@ -574,8 +574,8 @@ internal DeleteByQueryRequestDescriptor() internal override string OperationName => "delete_by_query"; public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) => Qs("conflicts", conflicts); public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df); @@ -584,7 +584,7 @@ internal DeleteByQueryRequestDescriptor() public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); @@ -608,13 +608,22 @@ public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indi return Self; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } - private long? MaxDocsValue { get; set; } + + /// + /// The maximum number of documents to delete. + /// + public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to delete using the Query DSL. @@ -670,18 +679,15 @@ public DeleteByQueryRequestDescriptor Slice(Action confi return Self; } - /// - /// The maximum number of documents to delete. - /// - public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -714,12 +720,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs index bda9c833845..bd6cf17078f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -67,12 +67,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r /// [JsonIgnore] public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// EQL query you wish to run. - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } [JsonInclude, JsonPropertyName("case_sensitive")] public bool? CaseSensitive { get; set; } @@ -82,35 +76,39 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r [JsonInclude, JsonPropertyName("event_category_field")] public Elastic.Clients.Elasticsearch.Field? EventCategoryField { get; set; } - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - [JsonInclude, JsonPropertyName("tiebreaker_field")] - public Elastic.Clients.Elasticsearch.Field? TiebreakerField { get; set; } - - /// - /// Field containing event timestamp. Default "@timestamp" - /// - [JsonInclude, JsonPropertyName("timestamp_field")] - public Elastic.Clients.Elasticsearch.Field? TimestampField { get; set; } - /// /// Maximum number of events to search at a time for sequence queries. /// [JsonInclude, JsonPropertyName("fetch_size")] public int? FetchSize { get; set; } + /// + /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. + /// + [JsonInclude, JsonPropertyName("fields")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat))] + public ICollection? Fields { get; set; } + /// /// Query, written in Query DSL, used to filter the events on which the EQL query runs. /// - [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? Filter { get; set; } [JsonInclude, JsonPropertyName("keep_alive")] public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get; set; } [JsonInclude, JsonPropertyName("keep_on_completion")] public bool? KeepOnCompletion { get; set; } - [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] - public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get; set; } + + /// + /// EQL query you wish to run. + /// + [JsonInclude, JsonPropertyName("query")] + public string Query { get; set; } + [JsonInclude, JsonPropertyName("result_position")] + public Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPosition { get; set; } + [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } /// /// For basic queries, the maximum number of matching events to return. Defaults to 10 @@ -119,14 +117,18 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r public int? Size { get; set; } /// - /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. + /// Field used to sort hits with the same timestamp in ascending order /// - [JsonInclude, JsonPropertyName("fields"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat))] - public ICollection? Fields { get; set; } - [JsonInclude, JsonPropertyName("result_position")] - public Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPosition { get; set; } - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("tiebreaker_field")] + public Elastic.Clients.Elasticsearch.Field? TiebreakerField { get; set; } + + /// + /// Field containing event timestamp. Default "@timestamp" + /// + [JsonInclude, JsonPropertyName("timestamp_field")] + public Elastic.Clients.Elasticsearch.Field? TimestampField { get; set; } + [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] + public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get; set; } } /// @@ -162,6 +164,9 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear return Self; } + private bool? CaseSensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? EventCategoryFieldValue { get; set; } + private int? FetchSizeValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } @@ -170,9 +175,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } - private bool? CaseSensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Field? EventCategoryFieldValue { get; set; } - private int? FetchSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } private string QueryValue { get; set; } @@ -183,6 +185,39 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear private Elastic.Clients.Elasticsearch.Field? TimestampFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeoutValue { get; set; } + public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) + { + CaseSensitiveValue = caseSensitive; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Field? eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Maximum number of events to search at a time for sequence queries. + /// + public EqlSearchRequestDescriptor FetchSize(int? fetchSize) + { + FetchSizeValue = fetchSize; + return Self; + } + /// /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. /// @@ -261,39 +296,6 @@ public EqlSearchRequestDescriptor Filter(params Action CaseSensitive(bool? caseSensitive = true) - { - CaseSensitiveValue = caseSensitive; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Field? eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Maximum number of events to search at a time for sequence queries. - /// - public EqlSearchRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) { KeepAliveValue = keepAlive; @@ -381,6 +383,24 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Cl protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseSensitiveValue.HasValue) + { + writer.WritePropertyName("case_sensitive"); + writer.WriteBooleanValue(CaseSensitiveValue.Value); + } + + if (EventCategoryFieldValue is not null) + { + writer.WritePropertyName("event_category_field"); + JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); + } + + if (FetchSizeValue.HasValue) + { + writer.WritePropertyName("fetch_size"); + writer.WriteNumberValue(FetchSizeValue.Value); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -439,24 +459,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (CaseSensitiveValue.HasValue) - { - writer.WritePropertyName("case_sensitive"); - writer.WriteBooleanValue(CaseSensitiveValue.Value); - } - - if (EventCategoryFieldValue is not null) - { - writer.WritePropertyName("event_category_field"); - JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - if (KeepAliveValue is not null) { writer.WritePropertyName("keep_alive"); @@ -544,6 +546,9 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices return Self; } + private bool? CaseSensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Field? EventCategoryFieldValue { get; set; } + private int? FetchSizeValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } @@ -552,9 +557,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } - private bool? CaseSensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Field? EventCategoryFieldValue { get; set; } - private int? FetchSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } private string QueryValue { get; set; } @@ -565,6 +567,48 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices private Elastic.Clients.Elasticsearch.Field? TimestampFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeoutValue { get; set; } + public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) + { + CaseSensitiveValue = caseSensitive; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Field? eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Field containing the event classification, such as process, file, or network. + /// + public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) + { + EventCategoryFieldValue = eventCategoryField; + return Self; + } + + /// + /// Maximum number of events to search at a time for sequence queries. + /// + public EqlSearchRequestDescriptor FetchSize(int? fetchSize) + { + FetchSizeValue = fetchSize; + return Self; + } + /// /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. /// @@ -643,48 +687,6 @@ public EqlSearchRequestDescriptor Filter(params Action return Self; } - public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) - { - CaseSensitiveValue = caseSensitive; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Field? eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Field containing the event classification, such as process, file, or network. - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// Maximum number of events to search at a time for sequence queries. - /// - public EqlSearchRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) { KeepAliveValue = keepAlive; @@ -790,6 +792,24 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elast protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseSensitiveValue.HasValue) + { + writer.WritePropertyName("case_sensitive"); + writer.WriteBooleanValue(CaseSensitiveValue.Value); + } + + if (EventCategoryFieldValue is not null) + { + writer.WritePropertyName("event_category_field"); + JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); + } + + if (FetchSizeValue.HasValue) + { + writer.WritePropertyName("fetch_size"); + writer.WriteNumberValue(FetchSizeValue.Value); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -848,24 +868,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (CaseSensitiveValue.HasValue) - { - writer.WritePropertyName("case_sensitive"); - writer.WriteBooleanValue(CaseSensitiveValue.Value); - } - - if (EventCategoryFieldValue is not null) - { - writer.WritePropertyName("event_category_field"); - JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - if (KeepAliveValue is not null) { writer.WritePropertyName("keep_alive"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs new file mode 100644 index 00000000000..e74d5174cdb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -0,0 +1,364 @@ +// 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.Requests; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Esql; + +public sealed class EsqlQueryRequestParameters : RequestParameters +{ + /// + /// The character to use between values within a CSV row. Only valid for the CSV format. + /// + public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } + + /// + /// A short version of the Accept header, e.g. json, yaml. + /// + public string? Format { get => Q("format"); set => Q("format", value); } +} + +/// +/// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. +/// Executes an ES|QL request +/// +public sealed partial class EsqlQueryRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "esql.query"; + + /// + /// The character to use between values within a CSV row. Only valid for the CSV format. + /// + [JsonIgnore] + public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } + + /// + /// A short version of the Accept header, e.g. json, yaml. + /// + [JsonIgnore] + public string? Format { get => Q("format"); set => Q("format", value); } + + /// + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// + [JsonInclude, JsonPropertyName("columnar")] + public bool? Columnar { get; set; } + + /// + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// + [JsonInclude, JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } + [JsonInclude, JsonPropertyName("locale")] + public string? Locale { get; set; } + + /// + /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. + /// + [JsonInclude, JsonPropertyName("params")] + public ICollection? Params { get; set; } + + /// + /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. + /// + [JsonInclude, JsonPropertyName("query")] + public string Query { get; set; } +} + +/// +/// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. +/// Executes an ES|QL request +/// +public sealed partial class EsqlQueryRequestDescriptor : RequestDescriptor, EsqlQueryRequestParameters> +{ + internal EsqlQueryRequestDescriptor(Action> configure) => configure.Invoke(this); + + public EsqlQueryRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "esql.query"; + + public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); + public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format); + + private bool? ColumnarValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } + private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } + private string? LocaleValue { get; set; } + private ICollection? ParamsValue { get; set; } + private string QueryValue { get; set; } + + /// + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// + public EsqlQueryRequestDescriptor Columnar(bool? columnar = true) + { + ColumnarValue = columnar; + return Self; + } + + /// + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// + public EsqlQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public EsqlQueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public EsqlQueryRequestDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + + public EsqlQueryRequestDescriptor Locale(string? locale) + { + LocaleValue = locale; + return Self; + } + + /// + /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. + /// + public EsqlQueryRequestDescriptor Params(ICollection? parameters) + { + ParamsValue = parameters; + return Self; + } + + /// + /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. + /// + public EsqlQueryRequestDescriptor Query(string query) + { + QueryValue = query; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ColumnarValue.HasValue) + { + writer.WritePropertyName("columnar"); + writer.WriteBooleanValue(ColumnarValue.Value); + } + + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (!string.IsNullOrEmpty(LocaleValue)) + { + writer.WritePropertyName("locale"); + writer.WriteStringValue(LocaleValue); + } + + if (ParamsValue is not null) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WritePropertyName("query"); + writer.WriteStringValue(QueryValue); + writer.WriteEndObject(); + } +} + +/// +/// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. +/// Executes an ES|QL request +/// +public sealed partial class EsqlQueryRequestDescriptor : RequestDescriptor +{ + internal EsqlQueryRequestDescriptor(Action configure) => configure.Invoke(this); + + public EsqlQueryRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "esql.query"; + + public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); + public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format); + + private bool? ColumnarValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } + private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } + private string? LocaleValue { get; set; } + private ICollection? ParamsValue { get; set; } + private string QueryValue { get; set; } + + /// + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// + public EsqlQueryRequestDescriptor Columnar(bool? columnar = true) + { + ColumnarValue = columnar; + return Self; + } + + /// + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// + public EsqlQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public EsqlQueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public EsqlQueryRequestDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + + public EsqlQueryRequestDescriptor Locale(string? locale) + { + LocaleValue = locale; + return Self; + } + + /// + /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. + /// + public EsqlQueryRequestDescriptor Params(ICollection? parameters) + { + ParamsValue = parameters; + return Self; + } + + /// + /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. + /// + public EsqlQueryRequestDescriptor Query(string query) + { + QueryValue = query; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ColumnarValue.HasValue) + { + writer.WritePropertyName("columnar"); + writer.WriteBooleanValue(ColumnarValue.Value); + } + + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (!string.IsNullOrEmpty(LocaleValue)) + { + writer.WritePropertyName("locale"); + writer.WriteStringValue(LocaleValue); + } + + if (ParamsValue is not null) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WritePropertyName("query"); + writer.WriteStringValue(QueryValue); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryResponse.g.cs new file mode 100644 index 00000000000..a48f053d4d5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryResponse.g.cs @@ -0,0 +1,33 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Esql; + +/// +/// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. +/// +public sealed partial class EsqlQueryResponse : ElasticsearchResponse +{ +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs index c572c4d5215..89aaa67fd70 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs @@ -203,13 +203,13 @@ internal ExistsRequestDescriptor() internal override string OperationName => "exists"; - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public ExistsRequestDescriptor Version(long? version) => Qs("version", version); public ExistsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); @@ -254,13 +254,13 @@ internal ExistsRequestDescriptor() internal override string OperationName => "exists"; - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public ExistsRequestDescriptor Version(long? version) => Qs("version", version); public ExistsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs index ad1b22276ca..37bb413ed16 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs @@ -192,13 +192,13 @@ internal ExistsSourceRequestDescriptor() internal override string OperationName => "exists_source"; - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version); public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); @@ -242,13 +242,13 @@ internal ExistsSourceRequestDescriptor() internal override string OperationName => "exists_source"; - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version); public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs index 0ede5112208..656fef989aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs @@ -61,6 +61,11 @@ public sealed class ExplainRequestParameters : RequestParameters /// public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -85,11 +90,6 @@ public sealed class ExplainRequestParameters : RequestParameters /// A comma-separated list of stored fields to return in the response. /// public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// Query in the Lucene query string syntax. - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } } /// @@ -145,6 +145,12 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// Query in the Lucene query string syntax. + /// + [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -175,12 +181,6 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - /// - /// Query in the Lucene query string syntax. - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - /// /// Defines the search definition using the Query DSL. /// @@ -231,17 +231,17 @@ internal ExplainRequestDescriptor() internal override string OperationName => "explain"; - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public ExplainRequestDescriptor Df(string? df) => Qs("df", df); public ExplainRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public ExplainRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExplainRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public ExplainRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public ExplainRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExplainRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public ExplainRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) @@ -333,17 +333,17 @@ internal ExplainRequestDescriptor() internal override string OperationName => "explain"; - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public ExplainRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public ExplainRequestDescriptor Df(string? df) => Qs("df", df); public ExplainRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public ExplainRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExplainRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public ExplainRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public ExplainRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExplainRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public ExplainRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs index 6f51d9a1344..c24c2153e87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs @@ -41,6 +41,11 @@ public sealed class FieldCapsRequestParameters : RequestParameters /// public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent + /// + public string? Filters { get => Q("filters"); set => Q("filters", value); } + /// /// If `true`, missing or closed indices are not included in the response. /// @@ -51,11 +56,6 @@ public sealed class FieldCapsRequestParameters : RequestParameters /// public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } - /// - /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent - /// - public string? Filters { get => Q("filters"); set => Q("filters", value); } - /// /// Only return results for fields that have one of the types in the list /// @@ -96,22 +96,22 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } /// - /// If `true`, missing or closed indices are not included in the response. + /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent /// [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + public string? Filters { get => Q("filters"); set => Q("filters", value); } /// - /// If true, unmapped fields are included in the response. + /// If `true`, missing or closed indices are not included in the response. /// [JsonIgnore] - public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// - /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent + /// If true, unmapped fields are included in the response. /// [JsonIgnore] - public string? Filters { get => Q("filters"); set => Q("filters", value); } + public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } /// /// Only return results for fields that have one of the types in the list @@ -170,12 +170,21 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsear return Self; } + private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilterValue { get; set; } private QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } private Action> IndexFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } + /// + /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + /// + public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + { + FieldsValue = fields; + return Self; + } + /// /// Allows to filter indices if the provided query rewrites to match_none on every shard. /// @@ -203,15 +212,6 @@ public FieldCapsRequestDescriptor IndexFilter(Action - /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. - /// - public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) - { - FieldsValue = fields; - return Self; - } - /// /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
@@ -224,6 +224,12 @@ public FieldCapsRequestDescriptor RuntimeMappings(Func IndexFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } + /// + /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + /// + public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + { + FieldsValue = fields; + return Self; + } + /// /// Allows to filter indices if the provided query rewrites to match_none on every shard. /// @@ -321,15 +330,6 @@ public FieldCapsRequestDescriptor IndexFilter(Action c return Self; } - /// - /// List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. - /// - public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) - { - FieldsValue = fields; - return Self; - } - /// /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
@@ -342,6 +342,12 @@ public FieldCapsRequestDescriptor RuntimeMappings(Func "get"; - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public GetRequestDescriptor Version(long? version) => Qs("version", version); public GetRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); @@ -254,13 +254,13 @@ internal GetRequestDescriptor() internal override string OperationName => "get"; - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public GetRequestDescriptor Version(long? version) => Qs("version", version); public GetRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs index 465a4bed328..4d30b6ee9bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs @@ -195,13 +195,13 @@ internal GetSourceRequestDescriptor() internal override string OperationName => "get_source"; - public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public GetSourceRequestDescriptor Version(long? version) => Qs("version", version); public GetSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); @@ -246,13 +246,13 @@ internal GetSourceRequestDescriptor() internal override string OperationName => "get_source"; - public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public GetSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public GetSourceRequestDescriptor Version(long? version) => Qs("version", version); public GetSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs index 35cfd3ad1b5..7b2cc89f0f9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs @@ -138,13 +138,22 @@ public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsear return Self; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action> MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action> SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } + + /// + /// Aliases for the index. + /// + public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Mapping for fields in the index. If specified, this mapping can include:
- Field names
- Field data types
- Mapping parameters
@@ -200,18 +209,15 @@ public CreateIndexRequestDescriptor Settings(Action - /// Aliases for the index. - ///
- public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -244,12 +250,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - writer.WriteEndObject(); } } @@ -287,13 +287,22 @@ public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexNam return Self; } + private IDictionary? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } + + /// + /// Aliases for the index. + /// + public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Mapping for fields in the index. If specified, this mapping can include:
- Field names
- Field data types
- Mapping parameters
@@ -349,18 +358,15 @@ public CreateIndexRequestDescriptor Settings(Action con return Self; } - /// - /// Aliases for the index. - /// - public CreateIndexRequestDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -393,12 +399,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs index 011436d1ae7..a988fab3228 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs @@ -41,6 +41,11 @@ public sealed class GetIndexRequestParameters : RequestParameters ///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// Return only information on specified index features + /// + public ICollection? Features { get => Q?>("features"); set => Q("features", value); } + /// /// If true, returns settings in flat format. /// @@ -65,11 +70,6 @@ public sealed class GetIndexRequestParameters : RequestParameters /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// Return only information on specified index features - /// - public ICollection? Features { get => Q?>("features"); set => Q("features", value); } } /// @@ -101,6 +101,12 @@ public GetIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r = [JsonIgnore] public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// Return only information on specified index features + /// + [JsonIgnore] + public ICollection? Features { get => Q?>("features"); set => Q("features", value); } + /// /// If true, returns settings in flat format. /// @@ -130,12 +136,6 @@ public GetIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r = /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// Return only information on specified index features - /// - [JsonIgnore] - public ICollection? Features { get => Q?>("features"); set => Q("features", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs index 419897d24a5..be9f70a808c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs @@ -32,24 +32,24 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed class GetIndexTemplateRequestParameters : RequestParameters { /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + /// If true, returns settings in flat format. /// - public bool? Local { get => Q("local"); set => Q("local", value); } + public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } /// - /// If true, returns settings in flat format. + /// If true, returns all relevant default configurations for the index template. /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? Local { get => Q("local"); set => Q("local", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// @@ -74,28 +74,28 @@ public GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base( internal override string OperationName => "indices.get_index_template"; /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + /// If true, returns settings in flat format. /// [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } + public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } /// - /// If true, returns settings in flat format. + /// If true, returns all relevant default configurations for the index template. /// [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? Local { get => Q("local"); set => Q("local", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 88adb00c1ae..9340a04aab8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -60,30 +60,30 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r [JsonIgnore] public bool? Create { get => Q("create"); set => Q("create", value); } - /// - /// Name of the index template to create. - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Indices? IndexPatterns { get; set; } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
[JsonInclude, JsonPropertyName("composed_of")] public ICollection? ComposedOf { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? Template { get; set; } - /// /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
///
[JsonInclude, JsonPropertyName("data_stream")] public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStream { get; set; } + /// + /// Name of the index template to create. + /// + [JsonInclude, JsonPropertyName("index_patterns")] + public Elastic.Clients.Elasticsearch.Indices? IndexPatterns { get; set; } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("_meta")] + public IDictionary? Meta { get; set; } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -91,16 +91,16 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r public int? Priority { get; set; } /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
///
- [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } + [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? Template { get; set; } /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
- [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("version")] + public long? Version { get; set; } } /// @@ -134,54 +134,18 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elastic return Self; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -227,6 +191,15 @@ public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Client return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -236,6 +209,33 @@ public PutIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(Action> configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -248,28 +248,6 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -298,12 +276,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -345,54 +345,18 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name return Self; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -438,6 +402,15 @@ public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticse return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -447,6 +420,33 @@ public PutIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public PutIndexTemplateRequestDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -459,28 +459,6 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -509,12 +487,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs index 503300f5a1d..838632b687d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -136,7 +136,8 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r /// /// Specify dynamic templates for the mapping. /// - [JsonInclude, JsonPropertyName("dynamic_templates"), SingleOrManyCollectionConverter(typeof(IDictionary))] + [JsonInclude, JsonPropertyName("dynamic_templates")] + [SingleOrManyCollectionConverter(typeof(IDictionary))] public ICollection>? DynamicTemplates { get; set; } /// @@ -170,17 +171,17 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r [JsonInclude, JsonPropertyName("_routing")] public Elastic.Clients.Elasticsearch.Mapping.RoutingField? Routing { get; set; } - /// - /// Control whether the _source field is enabled on the index. - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Mapping.SourceField? Source { get; set; } - /// /// Mapping of runtime fields for the index. /// [JsonInclude, JsonPropertyName("runtime")] public IDictionary? Runtime { get; set; } + + /// + /// Control whether the _source field is enabled on the index. + /// + [JsonInclude, JsonPropertyName("_source")] + public Elastic.Clients.Elasticsearch.Mapping.SourceField? Source { get; set; } } /// @@ -219,147 +220,93 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsea return Self; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNamesValue { get; set; } private Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } private Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.SourceField? SourceValue { get; set; } private Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } /// - /// Control whether field names are enabled for the index. + /// Controls whether dynamic date detection is enabled. /// - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Action configure) + public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; + DateDetectionValue = dateDetection; return Self; } /// - /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
+ /// Controls whether new fields are added dynamically. ///
- public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) + public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { - MetaValue = selector?.Invoke(new FluentDictionary()); + DynamicValue = dynamic; return Self; } /// - /// Enable making a routing value required on indexed documents. + /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
///
- public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Routing(Action configure) + public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } /// - /// Control whether the _source field is enabled on the index. + /// Specify dynamic templates for the mapping. /// - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Source(Action configure) + public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + DynamicTemplatesValue = dynamicTemplates; return Self; } /// - /// Controls whether dynamic date detection is enabled. + /// Control whether field names are enabled for the index. /// - public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) + public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) { - DateDetectionValue = dateDetection; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - /// - /// Controls whether new fields are added dynamically. - /// - public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) { - DynamicValue = dynamic; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - /// - /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
- ///
- public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public PutMappingRequestDescriptor FieldNames(Action configure) { - DynamicDateFormatsValue = dynamicDateFormats; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } /// - /// Specify dynamic templates for the mapping. + /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
///
- public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) { - DynamicTemplatesValue = dynamicTemplates; + MetaValue = selector?.Invoke(new FluentDictionary()); return Self; } @@ -404,6 +351,33 @@ public PutMappingRequestDescriptor Properties(Action + /// Enable making a routing value required on indexed documents. + ///
+ public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) + { + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; + return Self; + } + + public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Routing(Action configure) + { + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; + return Self; + } + /// /// Mapping of runtime fields for the index. /// @@ -413,9 +387,60 @@ public PutMappingRequestDescriptor Runtime(Func + /// Control whether the _source field is enabled on the index. + ///
+ public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -438,6 +463,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -454,6 +491,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SourceDescriptor is not null) { writer.WritePropertyName("_source"); @@ -470,58 +513,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } + writer.WriteEndObject(); + } +} - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// Adds new fields to an existing data stream or index.
You can also use this API to change the search settings of existing fields.
For data streams, these changes are applied to all backing indices by default.
-///
-public sealed partial class PutMappingRequestDescriptor : RequestDescriptor -{ - internal PutMappingRequestDescriptor(Action configure) => configure.Invoke(this); +/// +/// Adds new fields to an existing data stream or index.
You can also use this API to change the search settings of existing fields.
For data streams, these changes are applied to all backing indices by default.
+///
+public sealed partial class PutMappingRequestDescriptor : RequestDescriptor +{ + internal PutMappingRequestDescriptor(Action configure) => configure.Invoke(this); public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) { @@ -552,147 +553,93 @@ public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices return Self; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNamesValue { get; set; } private Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } private Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.SourceField? SourceValue { get; set; } private Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } /// - /// Control whether field names are enabled for the index. + /// Controls whether dynamic date detection is enabled. /// - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Action configure) + public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; + DateDetectionValue = dateDetection; return Self; } /// - /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
+ /// Controls whether new fields are added dynamically. ///
- public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) + public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { - MetaValue = selector?.Invoke(new FluentDictionary()); + DynamicValue = dynamic; return Self; } /// - /// Enable making a routing value required on indexed documents. + /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
///
- public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Routing(Action configure) + public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } /// - /// Control whether the _source field is enabled on the index. + /// Specify dynamic templates for the mapping. /// - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Source(Action configure) + public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + DynamicTemplatesValue = dynamicTemplates; return Self; } /// - /// Controls whether dynamic date detection is enabled. + /// Control whether field names are enabled for the index. /// - public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) + public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) { - DateDetectionValue = dateDetection; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - /// - /// Controls whether new fields are added dynamically. - /// - public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + public PutMappingRequestDescriptor FieldNames(Mapping.FieldNamesFieldDescriptor descriptor) { - DynamicValue = dynamic; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - /// - /// If date detection is enabled then new string fields are checked
against 'dynamic_date_formats' and if the value matches then
a new date field is added instead of string.
- ///
- public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public PutMappingRequestDescriptor FieldNames(Action configure) { - DynamicDateFormatsValue = dynamicDateFormats; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } /// - /// Specify dynamic templates for the mapping. + /// A mapping type can have custom meta data associated with it. These are
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
///
- public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) { - DynamicTemplatesValue = dynamicTemplates; + MetaValue = selector?.Invoke(new FluentDictionary()); return Self; } @@ -737,6 +684,33 @@ public PutMappingRequestDescriptor Properties(Action + /// Enable making a routing value required on indexed documents. + ///
+ public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) + { + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; + return Self; + } + + public PutMappingRequestDescriptor Routing(Mapping.RoutingFieldDescriptor descriptor) + { + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Routing(Action configure) + { + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; + return Self; + } + /// /// Mapping of runtime fields for the index. /// @@ -746,9 +720,60 @@ public PutMappingRequestDescriptor Runtime(Func + /// Control whether the _source field is enabled on the index. + ///
+ public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public PutMappingRequestDescriptor Source(Mapping.SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public PutMappingRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -771,6 +796,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -787,6 +824,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SourceDescriptor is not null) { writer.WritePropertyName("_source"); @@ -803,48 +846,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs index 0271ca2ce99..330d9199ef7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -102,7 +102,8 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r /// /// Array of wildcard expressions used to match the names
of indices during creation.
///
- [JsonInclude, JsonPropertyName("index_patterns"), SingleOrManyCollectionConverter(typeof(string))] + [JsonInclude, JsonPropertyName("index_patterns")] + [SingleOrManyCollectionConverter(typeof(string))] public ICollection? IndexPatterns { get; set; } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs index 23b57af0dee..b3b724e5455 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -37,14 +37,14 @@ public sealed class SimulateIndexTemplateRequestParameters : RequestParameters public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
+ /// If true, returns all relevant default configurations for the index template. ///
- public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
///
- public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } public sealed partial class SimulateIndexTemplateRequest : PlainRequest @@ -68,16 +68,16 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
+ /// If true, returns all relevant default configurations for the index template. ///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received
before the timeout expires, the request fails and returns an error.
///
[JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
@@ -85,30 +85,30 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b [JsonInclude, JsonPropertyName("allow_auto_create")] public bool? AllowAutoCreate { get; set; } - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Indices? IndexPatterns { get; set; } - /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
[JsonInclude, JsonPropertyName("composed_of")] public ICollection? ComposedOf { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? Template { get; set; } - /// /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
///
[JsonInclude, JsonPropertyName("data_stream")] public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStream { get; set; } + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + [JsonInclude, JsonPropertyName("index_patterns")] + public Elastic.Clients.Elasticsearch.Indices? IndexPatterns { get; set; } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("_meta")] + public IDictionary? Meta { get; set; } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -116,16 +116,16 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b public int? Priority { get; set; } /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
///
- [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } + [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? Template { get; set; } /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
- [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("version")] + public long? Version { get; set; } } public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor, SimulateIndexTemplateRequestParameters> @@ -158,55 +158,19 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.El return Self; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
///
@@ -261,6 +225,15 @@ public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.C return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -270,6 +243,33 @@ public SimulateIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(Action> configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -282,28 +282,6 @@ public SimulateIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (AllowAutoCreateValue.HasValue) { writer.WritePropertyName("allow_auto_create"); @@ -338,12 +316,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -384,55 +384,19 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch return Self; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } private int? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
///
@@ -487,6 +451,15 @@ public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elas return Self; } + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
@@ -496,6 +469,33 @@ public SimulateIndexTemplateRequestDescriptor Priority(int? priority) return Self; } + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(IndexTemplateMappingDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public SimulateIndexTemplateRequestDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
@@ -508,28 +508,6 @@ public SimulateIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (AllowAutoCreateValue.HasValue) { writer.WritePropertyName("allow_auto_create"); @@ -564,12 +542,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexPatternsValue, options); } + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (PriorityValue.HasValue) { writer.WritePropertyName("priority"); writer.WriteNumberValue(PriorityValue.Value); } + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index 22fb9a8ed60..61d4b7a7a24 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -37,14 +37,14 @@ public sealed class SimulateTemplateRequestParameters : RequestParameters public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, returns all relevant default configurations for the index template. /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// @@ -75,16 +75,16 @@ public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base( public bool? Create { get => Q("create"); set => Q("create", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// If true, returns all relevant default configurations for the index template. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } /// - /// If true, returns all relevant default configurations for the index template. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs index 6dde9c07a54..10015b89983 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs @@ -97,9 +97,9 @@ public UpdateAliasesRequestDescriptor() public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); private ICollection? ActionsValue { get; set; } - private ActionDescriptor ActionsDescriptor { get; set; } - private Action ActionsDescriptorAction { get; set; } - private Action[] ActionsDescriptorActions { get; set; } + private ActionDescriptor ActionsDescriptor { get; set; } + private Action> ActionsDescriptorAction { get; set; } + private Action>[] ActionsDescriptorActions { get; set; } /// /// Actions to perform. @@ -113,7 +113,7 @@ public UpdateAliasesRequestDescriptor Actions(ICollection Actions(ActionDescriptor descriptor) + public UpdateAliasesRequestDescriptor Actions(ActionDescriptor descriptor) { ActionsValue = null; ActionsDescriptorAction = null; @@ -122,7 +122,7 @@ public UpdateAliasesRequestDescriptor Actions(ActionDescriptor descri return Self; } - public UpdateAliasesRequestDescriptor Actions(Action configure) + public UpdateAliasesRequestDescriptor Actions(Action> configure) { ActionsValue = null; ActionsDescriptor = null; @@ -131,7 +131,7 @@ public UpdateAliasesRequestDescriptor Actions(Action Actions(params Action[] configure) + public UpdateAliasesRequestDescriptor Actions(params Action>[] configure) { ActionsValue = null; ActionsDescriptor = null; @@ -154,7 +154,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("actions"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new ActionDescriptor(ActionsDescriptorAction), options); + JsonSerializer.Serialize(writer, new ActionDescriptor(ActionsDescriptorAction), options); writer.WriteEndArray(); } else if (ActionsDescriptorActions is not null) @@ -163,7 +163,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in ActionsDescriptorActions) { - JsonSerializer.Serialize(writer, new ActionDescriptor(action), options); + JsonSerializer.Serialize(writer, new ActionDescriptor(action), options); } writer.WriteEndArray(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs index a7b086a8f51..79aed03aa6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs @@ -56,6 +56,11 @@ public sealed class IndexRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the destination must be an index alias. + /// + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -80,11 +85,6 @@ public sealed class IndexRequestParameters : RequestParameters /// The number of shard copies that must be active before proceeding with the operation.
Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the destination must be an index alias. - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -141,6 +141,12 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r [JsonIgnore] public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// + /// If `true`, the destination must be an index alias. + /// + [JsonIgnore] + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -170,12 +176,6 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r /// [JsonIgnore] public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// If `true`, the destination must be an index alias. - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// 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 ac7b21958e1..41036cc2d5e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -31,6 +31,11 @@ namespace Elastic.Clients.Elasticsearch.Ingest; public sealed class PutPipelineRequestParameters : RequestParameters { + /// + /// Required version for optimistic concurrency control for pipeline updates + /// + public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -40,11 +45,6 @@ public sealed class PutPipelineRequestParameters : RequestParameters /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// Required version for optimistic concurrency control for pipeline updates - /// - public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } } /// @@ -64,6 +64,12 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req internal override string OperationName => "ingest.put_pipeline"; + /// + /// Required version for optimistic concurrency control for pipeline updates + /// + [JsonIgnore] + public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -77,10 +83,10 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// - /// Required version for optimistic concurrency control for pipeline updates + /// Description of the ingest pipeline. /// - [JsonIgnore] - public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } /// /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. @@ -88,12 +94,6 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req [JsonInclude, JsonPropertyName("_meta")] public IDictionary? Meta { get; set; } - /// - /// Description of the ingest pipeline. - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - /// /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. /// @@ -146,6 +146,8 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. return Self; } + private string? DescriptionValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } @@ -154,10 +156,26 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch. private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action> ProcessorsDescriptorAction { get; set; } private Action>[] ProcessorsDescriptorActions { get; set; } - private IDictionary? MetaValue { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PutPipelineRequestDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. + /// + public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. /// @@ -236,24 +254,6 @@ public PutPipelineRequestDescriptor Processors(params Action - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Description of the ingest pipeline. - /// - public PutPipelineRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. /// @@ -266,6 +266,18 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -328,18 +340,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -383,6 +383,8 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) return Self; } + private string? DescriptionValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } @@ -391,10 +393,26 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action ProcessorsDescriptorAction { get; set; } private Action[] ProcessorsDescriptorActions { get; set; } - private IDictionary? MetaValue { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PutPipelineRequestDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. + /// + public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. /// @@ -473,24 +491,6 @@ public PutPipelineRequestDescriptor Processors(params Action - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Description of the ingest pipeline. - /// - public PutPipelineRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. /// @@ -503,6 +503,18 @@ public PutPipelineRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -565,18 +577,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs index 27c7e813723..19d1ff1c5dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs @@ -104,40 +104,13 @@ public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? return Self; } - private Elastic.Clients.Elasticsearch.Ingest.Pipeline? PipelineValue { get; set; } - private PipelineDescriptor PipelineDescriptor { get; set; } - private Action> PipelineDescriptorAction { get; set; } private ICollection? DocsValue { get; set; } private DocumentDescriptor DocsDescriptor { get; set; } private Action DocsDescriptorAction { get; set; } private Action[] DocsDescriptorActions { get; set; } - - /// - /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
- ///
- public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Ingest.Pipeline? pipeline) - { - PipelineDescriptor = null; - PipelineDescriptorAction = null; - PipelineValue = pipeline; - return Self; - } - - public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) - { - PipelineValue = null; - PipelineDescriptorAction = null; - PipelineDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Action> configure) - { - PipelineValue = null; - PipelineDescriptor = null; - PipelineDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Ingest.Pipeline? PipelineValue { get; set; } + private PipelineDescriptor PipelineDescriptor { get; set; } + private Action> PipelineDescriptorAction { get; set; } /// /// Sample documents to test in the pipeline. @@ -178,25 +151,36 @@ public SimulateRequestDescriptor Docs(params Action + /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
+ ///
+ public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Ingest.Pipeline? pipeline) + { + PipelineDescriptor = null; + PipelineDescriptorAction = null; + PipelineValue = pipeline; + return Self; + } + + public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) + { + PipelineValue = null; + PipelineDescriptorAction = null; + PipelineDescriptor = descriptor; + return Self; + } + + public SimulateRequestDescriptor Pipeline(Action> configure) + { + PipelineValue = null; + PipelineDescriptor = null; + PipelineDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (PipelineDescriptor is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineDescriptor, options); - } - else if (PipelineDescriptorAction is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); - } - else if (PipelineValue is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineValue, options); - } - if (DocsDescriptor is not null) { writer.WritePropertyName("docs"); @@ -228,6 +212,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocsValue, options); } + if (PipelineDescriptor is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineDescriptor, options); + } + else if (PipelineDescriptorAction is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); + } + else if (PipelineValue is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineValue, options); + } + writer.WriteEndObject(); } } @@ -259,40 +259,13 @@ public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) return Self; } - private Elastic.Clients.Elasticsearch.Ingest.Pipeline? PipelineValue { get; set; } - private PipelineDescriptor PipelineDescriptor { get; set; } - private Action PipelineDescriptorAction { get; set; } private ICollection? DocsValue { get; set; } private DocumentDescriptor DocsDescriptor { get; set; } private Action DocsDescriptorAction { get; set; } private Action[] DocsDescriptorActions { get; set; } - - /// - /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
- ///
- public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Ingest.Pipeline? pipeline) - { - PipelineDescriptor = null; - PipelineDescriptorAction = null; - PipelineValue = pipeline; - return Self; - } - - public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) - { - PipelineValue = null; - PipelineDescriptorAction = null; - PipelineDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Action configure) - { - PipelineValue = null; - PipelineDescriptor = null; - PipelineDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Ingest.Pipeline? PipelineValue { get; set; } + private PipelineDescriptor PipelineDescriptor { get; set; } + private Action PipelineDescriptorAction { get; set; } /// /// Sample documents to test in the pipeline. @@ -333,25 +306,36 @@ public SimulateRequestDescriptor Docs(params Action[] config return Self; } + /// + /// Pipeline to test.
If you don’t specify the `pipeline` request path parameter, this parameter is required.
If you specify both this and the request path parameter, the API only uses the request path parameter.
+ ///
+ public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Ingest.Pipeline? pipeline) + { + PipelineDescriptor = null; + PipelineDescriptorAction = null; + PipelineValue = pipeline; + return Self; + } + + public SimulateRequestDescriptor Pipeline(PipelineDescriptor descriptor) + { + PipelineValue = null; + PipelineDescriptorAction = null; + PipelineDescriptor = descriptor; + return Self; + } + + public SimulateRequestDescriptor Pipeline(Action configure) + { + PipelineValue = null; + PipelineDescriptor = null; + PipelineDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (PipelineDescriptor is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineDescriptor, options); - } - else if (PipelineDescriptorAction is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); - } - else if (PipelineValue is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineValue, options); - } - if (DocsDescriptor is not null) { writer.WritePropertyName("docs"); @@ -383,6 +367,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocsValue, options); } + if (PipelineDescriptor is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineDescriptor, options); + } + else if (PipelineDescriptorAction is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, new PipelineDescriptor(PipelineDescriptorAction), options); + } + else if (PipelineValue is not null) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, PipelineValue, options); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs index 135632294b3..a473a22bd7d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs @@ -173,13 +173,13 @@ public MultiGetRequestDescriptor() internal override string OperationName => "mget"; - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public MultiGetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) @@ -305,13 +305,13 @@ public MultiGetRequestDescriptor() internal override string OperationName => "mget"; - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public MultiGetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); + public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) => Qs("stored_fields", storedFields); public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs index 6f60a559857..99f873c4ec2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs @@ -44,14 +44,14 @@ public sealed class MultiSearchTemplateRequestParameters : RequestParameters public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } /// - /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+ /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
///
- public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// - /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
+ /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
///
- public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. @@ -93,16 +93,16 @@ public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } /// - /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+ /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } /// - /// If `true`, the response returns `hits.total` as an integer.
If `false`, it returns `hits.total` as an object.
+ /// The type of the search operation.
Available options: `query_then_fetch`, `dfs_query_then_fetch`.
///
[JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs index 0fd2e140ff3..ee81337706a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs @@ -206,8 +206,8 @@ public MultiTermVectorsRequestDescriptor() internal override string OperationName => "mtermvectors"; - public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) => Qs("fields", fields); + public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); public MultiTermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); public MultiTermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); @@ -341,8 +341,8 @@ public MultiTermVectorsRequestDescriptor() internal override string OperationName => "mtermvectors"; - public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) => Qs("fields", fields); + public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); public MultiTermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); public MultiTermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs index cd6bdab6f6a..e2c0b35014d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs @@ -32,15 +32,20 @@ namespace Elastic.Clients.Elasticsearch; public sealed class OpenPointInTimeRequestParameters : RequestParameters { /// - /// Extends the time to live of the corresponding point in time. + /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
///
- public Elastic.Clients.Elasticsearch.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + 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); } + /// + /// Extends the time to live of the corresponding point in time. + /// + public Elastic.Clients.Elasticsearch.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + /// /// Specifies the node or shard the operation should be performed on.
Random by default.
///
@@ -50,11 +55,6 @@ public sealed class OpenPointInTimeRequestParameters : RequestParameters /// Custom value used to route operations to a specific shard. ///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
- ///
- public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } } /// @@ -75,10 +75,10 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b internal override string OperationName => "open_point_in_time"; /// - /// Extends the time to live of the corresponding point in time. + /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + 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. @@ -87,22 +87,22 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// - /// Specifies the node or shard the operation should be performed on.
Random by default.
+ /// Extends the time to live of the corresponding point in time. ///
[JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } + public Elastic.Clients.Elasticsearch.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } /// - /// Custom value used to route operations to a specific shard. + /// Specifies the node or shard the operation should be performed on.
Random by default.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + public string? Preference { get => Q("preference"); set => Q("preference", value); } /// - /// Type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+ /// Custom value used to route operations to a specific shard. ///
[JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs index b9d9c653ccc..4643d733713 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs @@ -97,17 +97,17 @@ public RankEvalRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r [JsonIgnore] public string? SearchType { get => Q("search_type"); set => Q("search_type", value); } - /// - /// A set of typical search requests, together with their provided ratings. - /// - [JsonInclude, JsonPropertyName("requests")] - public ICollection Requests { get; set; } - /// /// Definition of the evaluation metric to calculate. /// [JsonInclude, JsonPropertyName("metric")] public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? Metric { get; set; } + + /// + /// A set of typical search requests, together with their provided ratings. + /// + [JsonInclude, JsonPropertyName("requests")] + public ICollection Requests { get; set; } } /// @@ -140,13 +140,40 @@ public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearc return Self; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? MetricValue { get; set; } + private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } + private Action MetricDescriptorAction { get; set; } private ICollection RequestsValue { get; set; } private Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } private Action> RequestsDescriptorAction { get; set; } private Action>[] RequestsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } + + /// + /// Definition of the evaluation metric to calculate. + /// + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? metric) + { + MetricDescriptor = null; + MetricDescriptorAction = null; + MetricValue = metric; + return Self; + } + + public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptor = descriptor; + return Self; + } + + public RankEvalRequestDescriptor Metric(Action configure) + { + MetricValue = null; + MetricDescriptor = null; + MetricDescriptorAction = configure; + return Self; + } /// /// A set of typical search requests, together with their provided ratings. @@ -187,36 +214,25 @@ public RankEvalRequestDescriptor Requests(params Action - /// Definition of the evaluation metric to calculate. - /// - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? metric) - { - MetricDescriptor = null; - MetricDescriptorAction = null; - MetricValue = metric; - return Self; - } - - public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) - { - MetricValue = null; - MetricDescriptorAction = null; - MetricDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Metric(Action configure) - { - MetricValue = null; - MetricDescriptor = null; - MetricDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MetricDescriptor is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricDescriptor, options); + } + else if (MetricDescriptorAction is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); + } + else if (MetricValue is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricValue, options); + } + if (RequestsDescriptor is not null) { writer.WritePropertyName("requests"); @@ -248,22 +264,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RequestsValue, options); } - if (MetricDescriptor is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricDescriptor, options); - } - else if (MetricDescriptorAction is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); - } - else if (MetricValue is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricValue, options); - } - writer.WriteEndObject(); } } @@ -298,13 +298,40 @@ public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? return Self; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? MetricValue { get; set; } + private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } + private Action MetricDescriptorAction { get; set; } private ICollection RequestsValue { get; set; } private Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } private Action RequestsDescriptorAction { get; set; } private Action[] RequestsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } + + /// + /// Definition of the evaluation metric to calculate. + /// + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? metric) + { + MetricDescriptor = null; + MetricDescriptorAction = null; + MetricValue = metric; + return Self; + } + + public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptor = descriptor; + return Self; + } + + public RankEvalRequestDescriptor Metric(Action configure) + { + MetricValue = null; + MetricDescriptor = null; + MetricDescriptorAction = configure; + return Self; + } /// /// A set of typical search requests, together with their provided ratings. @@ -345,36 +372,25 @@ public RankEvalRequestDescriptor Requests(params Action - /// Definition of the evaluation metric to calculate. - /// - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? metric) - { - MetricDescriptor = null; - MetricDescriptorAction = null; - MetricValue = metric; - return Self; - } - - public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) - { - MetricValue = null; - MetricDescriptorAction = null; - MetricDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Metric(Action configure) - { - MetricValue = null; - MetricDescriptor = null; - MetricDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (MetricDescriptor is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricDescriptor, options); + } + else if (MetricDescriptorAction is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); + } + else if (MetricValue is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricValue, options); + } + if (RequestsDescriptor is not null) { writer.WritePropertyName("requests"); @@ -406,22 +422,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RequestsValue, options); } - if (MetricDescriptor is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricDescriptor, options); - } - else if (MetricDescriptorAction is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); - } - else if (MetricValue is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs index 4002d4f0de5..b01f5213dd1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs @@ -41,6 +41,11 @@ public sealed class ReindexRequestParameters : RequestParameters /// public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } + /// + /// If `true`, the destination must be an index alias. + /// + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Specifies how long a consistent view of the index should be maintained for scrolled search. /// @@ -65,11 +70,6 @@ public sealed class ReindexRequestParameters : RequestParameters /// If `true`, the request blocks until the operation is complete. /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// If `true`, the destination must be an index alias. - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } } /// @@ -97,6 +97,12 @@ public sealed partial class ReindexRequest : PlainRequest Q("requests_per_second"); set => Q("requests_per_second", value); } + /// + /// If `true`, the destination must be an index alias. + /// + [JsonIgnore] + public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// /// Specifies how long a consistent view of the index should be maintained for scrolled search. /// @@ -127,12 +133,6 @@ public sealed partial class ReindexRequest : PlainRequest Q("wait_for_completion"); set => Q("wait_for_completion", value); } - /// - /// If `true`, the destination must be an index alias. - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - /// /// Set to proceed to continue reindexing even if there are conflicts. /// @@ -194,9 +194,6 @@ public ReindexRequestDescriptor() public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - private Elastic.Clients.Elasticsearch.Core.Reindex.Source SourceValue { get; set; } - private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Reindex.Destination DestValue { get; set; } private Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } @@ -204,33 +201,9 @@ public ReindexRequestDescriptor() private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private long? SizeValue { get; set; } - - /// - /// The source you are copying from. - /// - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Reindex.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Core.Reindex.Source SourceValue { get; set; } + private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } + private Action> SourceDescriptorAction { get; set; } /// /// Set to proceed to continue reindexing even if there are conflicts. @@ -292,25 +265,36 @@ public ReindexRequestDescriptor Size(long? size) return Self; } + /// + /// The source you are copying from. + /// + public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Reindex.Source source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public ReindexRequestDescriptor Source(Action> configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (ConflictsValue is not null) { writer.WritePropertyName("conflicts"); @@ -351,6 +335,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (SourceDescriptor is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); + } + else + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + writer.WriteEndObject(); } } @@ -383,9 +383,6 @@ public ReindexRequestDescriptor() public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - private Elastic.Clients.Elasticsearch.Core.Reindex.Source SourceValue { get; set; } - private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Reindex.Destination DestValue { get; set; } private Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } @@ -393,33 +390,9 @@ public ReindexRequestDescriptor() private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private long? SizeValue { get; set; } - - /// - /// The source you are copying from. - /// - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Reindex.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } + private Elastic.Clients.Elasticsearch.Core.Reindex.Source SourceValue { get; set; } + private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } + private Action SourceDescriptorAction { get; set; } /// /// Set to proceed to continue reindexing even if there are conflicts. @@ -481,25 +454,36 @@ public ReindexRequestDescriptor Size(long? size) return Self; } + /// + /// The source you are copying from. + /// + public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Reindex.Source source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public ReindexRequestDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (ConflictsValue is not null) { writer.WritePropertyName("conflicts"); @@ -540,6 +524,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (SourceDescriptor is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); + } + else + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 616a72524d9..0dfe12697e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -111,11 +111,21 @@ public sealed class SearchRequestParameters : RequestParameters /// public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+ ///
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, the caching of search results is enabled for requests where `size` is `0`.
Defaults to index level settings.
///
public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + /// + /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + /// + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -131,6 +141,16 @@ public sealed class SearchRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } + /// + /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ ///
+ public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + /// + /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ ///
+ public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + /// /// Specifies which field to use for suggestions. /// @@ -155,26 +175,6 @@ public sealed class SearchRequestParameters : RequestParameters /// If `true`, aggregation and suggester names are be prefixed by their respective types in the response. ///
public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
- ///
- public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
- ///
- public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
- ///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } } internal sealed partial class SearchRequestConverter : JsonConverter @@ -201,6 +201,12 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "docvalue_fields") + { + variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "explain") { variant.Explain = JsonSerializer.Deserialize(ref reader, options); @@ -213,21 +219,21 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "from") + if (property == "fields") { - variant.From = JsonSerializer.Deserialize(ref reader, options); + variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); continue; } - if (property == "highlight") + if (property == "from") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.From = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "track_total_hits") + if (property == "highlight") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -237,27 +243,21 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - if (property == "knn") { variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } - if (property == "rank") + if (property == "min_score") { - variant.Rank = JsonSerializer.Deserialize(ref reader, options); + variant.MinScore = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "min_score") + if (property == "pit") { - variant.MinScore = JsonSerializer.Deserialize(ref reader, options); + variant.Pit = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -279,12 +279,24 @@ 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); continue; } + if (property == "runtime_mappings") + { + variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + if (property == "script_fields") { variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); @@ -297,6 +309,12 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "seq_no_primary_term") + { + variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "size") { variant.Size = JsonSerializer.Deserialize(ref reader, options); @@ -321,9 +339,15 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "fields") + if (property == "stats") { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); + variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + continue; + } + + if (property == "stored_fields") + { + variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -351,39 +375,15 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") + if (property == "track_total_hits") { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "stats") + if (property == "version") { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); + variant.Version = JsonSerializer.Deserialize(ref reader, options); continue; } } @@ -407,6 +407,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Collapse, options); } + if (value.DocvalueFields is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, value.DocvalueFields, options); + } + if (value.Explain.HasValue) { writer.WritePropertyName("explain"); @@ -419,6 +425,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Ext, options); } + if (value.Fields is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, value.Fields, options); + } + if (value.From.HasValue) { writer.WritePropertyName("from"); @@ -431,42 +443,30 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Highlight, options); } - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - if (value.IndicesBoost is not null) { writer.WritePropertyName("indices_boost"); JsonSerializer.Serialize(writer, value.IndicesBoost, options); } - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - if (value.Knn is not null) { writer.WritePropertyName("knn"); JsonSerializer.Serialize(writer, value.Knn, options); } - if (value.Rank is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, value.Rank, options); - } - if (value.MinScore.HasValue) { writer.WritePropertyName("min_score"); writer.WriteNumberValue(value.MinScore.Value); } + if (value.Pit is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, value.Pit, options); + } + if (value.PostFilter is not null) { writer.WritePropertyName("post_filter"); @@ -485,12 +485,24 @@ 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"); JsonSerializer.Serialize(writer, value.Rescore, options); } + if (value.RuntimeMappings is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + } + if (value.ScriptFields is not null) { writer.WritePropertyName("script_fields"); @@ -503,6 +515,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.SearchAfter, options); } + if (value.SeqNoPrimaryTerm.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); + } + if (value.Size.HasValue) { writer.WritePropertyName("size"); @@ -527,10 +545,16 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria JsonSerializer.Serialize(writer, value.Source, options); } - if (value.Fields is not null) + if (value.Stats is not null) { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); + writer.WritePropertyName("stats"); + JsonSerializer.Serialize(writer, value.Stats, options); + } + + if (value.StoredFields is not null) + { + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, value.StoredFields, options); } if (value.Suggest is not null) @@ -557,40 +581,16 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria writer.WriteBooleanValue(value.TrackScores.Value); } - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, value.StoredFields, options); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.RuntimeMappings is not null) + if (value.TrackTotalHits is not null) { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); + writer.WritePropertyName("track_total_hits"); + JsonSerializer.Serialize(writer, value.TrackTotalHits, options); } - if (value.Stats is not null) + if (value.Version.HasValue) { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); + writer.WritePropertyName("version"); + writer.WriteBooleanValue(value.Version.Value); } writer.WriteEndObject(); @@ -715,12 +715,24 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonIgnore] public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } + /// + /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+ ///
+ [JsonIgnore] + public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + /// /// If `true`, the caching of search results is enabled for requests where `size` is `0`.
Defaults to index level settings.
///
[JsonIgnore] public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } + /// + /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + /// + [JsonIgnore] + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -740,58 +752,46 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } /// - /// Specifies which field to use for suggestions. + /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// - /// Specifies the suggest mode.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+ /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Number of suggestions to return.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+ /// Specifies which field to use for suggestions. ///
[JsonIgnore] - public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } - - /// - /// The source text for which the suggestions should be returned.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
- ///
- [JsonIgnore] - public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } - - /// - /// If `true`, aggregation and suggester names are be prefixed by their respective types in the response. - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } + public Elastic.Clients.Elasticsearch.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } /// - /// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + /// Specifies the suggest mode.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
///
[JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + public Elastic.Clients.Elasticsearch.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } /// - /// A comma-separated list of source fields to exclude from the response.
You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ /// Number of suggestions to return.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } /// - /// A comma-separated list of source fields to include in the response.
If this parameter is specified, only these source fields are returned.
You can exclude fields from this subset using the `_source_excludes` query parameter.
If the `_source` parameter is `false`, this parameter is ignored.
+ /// The source text for which the suggestions should be returned.
This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } /// - /// Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+ /// If `true`, aggregation and suggester names are be prefixed by their respective types in the response. ///
[JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } + public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } /// /// Defines the aggregations that are run as part of the search request. @@ -805,6 +805,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude, JsonPropertyName("collapse")] public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } + /// + /// Array of wildcard (`*`) patterns.
The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("docvalue_fields")] + public ICollection? DocvalueFields { get; set; } + /// /// If true, returns detailed information about score computation as part of a hit. /// @@ -817,6 +823,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude, JsonPropertyName("ext")] public IDictionary? Ext { get; set; } + /// + /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("fields")] + public ICollection? Fields { get; set; } + /// /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
///
@@ -829,42 +841,31 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude, JsonPropertyName("highlight")] public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } - /// - /// Number of hits matching the query to count accurately.
If `true`, the exact number of hits is returned at the cost of some performance.
If `false`, the response does not include the total number of hits matching the query.
- ///
- [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } - /// /// Boosts the _score of documents from specified indices. /// [JsonInclude, JsonPropertyName("indices_boost")] public ICollection>? IndicesBoost { get; set; } - /// - /// Array of wildcard (`*`) patterns.
The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
- ///
- [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - /// /// Defines the approximate kNN search to run. /// - [JsonInclude, JsonPropertyName("knn"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnQuery))] + [JsonInclude, JsonPropertyName("knn")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnQuery))] public ICollection? Knn { get; set; } - /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. - /// - [JsonInclude, JsonPropertyName("rank")] - public Elastic.Clients.Elasticsearch.Rank? Rank { get; set; } - /// /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
///
[JsonInclude, JsonPropertyName("min_score")] public double? MinScore { get; set; } + /// + /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ ///
+ [JsonInclude, JsonPropertyName("pit")] + public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } + /// /// Use the `post_filter` parameter to filter search results.
The search hits are filtered after the aggregations are calculated.
A post filter has no impact on the aggregation results.
///
@@ -883,12 +884,25 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude, JsonPropertyName("query")] public Elastic.Clients.Elasticsearch.QueryDsl.Query? Query { get; set; } + /// + /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// + [JsonInclude, JsonPropertyName("rank")] + public Elastic.Clients.Elasticsearch.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. /// - [JsonInclude, JsonPropertyName("rescore"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.Rescore))] + [JsonInclude, JsonPropertyName("rescore")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.Rescore))] public ICollection? Rescore { get; set; } + /// + /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ ///
+ [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } + /// /// Retrieve a script evaluation (based on different fields) for each hit. /// @@ -901,6 +915,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude, JsonPropertyName("search_after")] public ICollection? SearchAfter { get; set; } + /// + /// If `true`, returns sequence number and primary term of the last modification of each hit. + /// + [JsonInclude, JsonPropertyName("seq_no_primary_term")] + public bool? SeqNoPrimaryTerm { get; set; } + /// /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
///
@@ -916,7 +936,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// A comma-separated list of : pairs. /// - [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] public ICollection? Sort { get; set; } /// @@ -926,10 +947,16 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } /// - /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
+ /// Stats groups to associate with the search.
Each group maintains a statistics aggregation for its associated searches.
You can retrieve these stats using the indices stats API.
///
- [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } + [JsonInclude, JsonPropertyName("stats")] + public ICollection? Stats { get; set; } + + /// + /// List of stored fields to return as part of a hit.
If no fields are specified, no stored fields are included in the response.
If this field is specified, the `_source` parameter defaults to `false`.
You can pass `_source: true` to return both source fields and stored fields in the search response.
+ ///
+ [JsonInclude, JsonPropertyName("stored_fields")] + public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } /// /// Defines a suggester that provides similar looking terms based on a provided text. @@ -956,40 +983,16 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => public bool? TrackScores { get; set; } /// - /// If true, returns document version as part of a hit. - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } - - /// - /// If `true`, returns sequence number and primary term of the last modification of each hit. - /// - [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// List of stored fields to return as part of a hit.
If no fields are specified, no stored fields are included in the response.
If this field is specified, the `_source` parameter defaults to `false`.
You can pass `_source: true` to return both source fields and stored fields in the search response.
- ///
- [JsonInclude, JsonPropertyName("stored_fields")] - public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } - - /// - /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
- ///
- [JsonInclude, JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } - - /// - /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately.
If `true`, the exact number of hits is returned at the cost of some performance.
If `false`, the response does not include the total number of hits matching the query.
///
- [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("track_total_hits")] + public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } /// - /// Stats groups to associate with the search.
Each group maintains a statistics aggregation for its associated searches.
You can retrieve these stats using the indices stats API.
+ /// If true, returns document version as part of a hit. ///
- [JsonInclude, JsonPropertyName("stats")] - public ICollection? Stats { get; set; } + [JsonInclude, JsonPropertyName("version")] + public bool? Version { get; set; } } /// @@ -1025,12 +1028,10 @@ public SearchRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opt internal override string OperationName => "search"; - public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -1041,14 +1042,16 @@ public SearchRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opt public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public SearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Duration? scroll) => Qs("scroll", scroll); public SearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.SearchType? searchType) => Qs("search_type", searchType); + public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Field? suggestField) => Qs("suggest_field", suggestField); public SearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -1071,27 +1074,44 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } private Action>[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action> KnnDescriptorAction { get; set; } private Action>[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action> PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Rank? RankValue { get; set; } + private RankDescriptor RankDescriptor { get; set; } + private Action RankDescriptorAction { get; set; } private ICollection? RescoreValue { get; set; } private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } private Action>[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } @@ -1100,23 +1120,6 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Rank? RankValue { get; set; } - private RankDescriptor RankDescriptor { get; set; } - private Action RankDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } @@ -1221,6 +1224,24 @@ public SearchRequestDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public SearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
///
@@ -1260,6 +1281,15 @@ public SearchRequestDescriptor Fields(params Action + /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ ///
+ public SearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + /// /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. /// @@ -1287,6 +1317,15 @@ public SearchRequestDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + ///
+ public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -1326,6 +1365,42 @@ public SearchRequestDescriptor Knn(params Action + /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
+ ///
+ public SearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ ///
+ public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + /// /// Use the `post_filter` parameter to filter search results.
The search hits are filtered after the aggregations are calculated.
A post filter has no impact on the aggregation results.
///
@@ -1353,6 +1428,15 @@ public SearchRequestDescriptor PostFilter(Action + /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
+ ///
+ public SearchRequestDescriptor Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -1381,7 +1465,34 @@ public SearchRequestDescriptor Query(Action - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases. + /// Defines the Reciprocal Rank Fusion (RRF) to use. + ///
+ public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? rank) + { + RankDescriptor = null; + RankDescriptorAction = null; + RankValue = rank; + return Self; + } + + public SearchRequestDescriptor Rank(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. /// public SearchRequestDescriptor Rescore(ICollection? rescore) { @@ -1419,6 +1530,51 @@ public SearchRequestDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ ///
+ public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Used to retrieve the next page of hits using a set of sort values from the previous page. + /// + public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If `true`, returns sequence number and primary term of the last modification of each hit. + /// + public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ ///
+ public SearchRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// Can be used to split a scrolled search into multiple slices that can be consumed independently. /// @@ -1494,159 +1650,6 @@ public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.C return Self; } - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public SearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
- ///
- public SearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// Boosts the _score of documents from specified indices. - /// - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
- ///
- public SearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
- ///
- public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - /// - /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
- ///
- public SearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. - /// - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? rank) - { - RankDescriptor = null; - RankDescriptorAction = null; - RankValue = rank; - return Self; - } - - public SearchRequestDescriptor Rank(RankDescriptor descriptor) - { - RankValue = null; - RankDescriptorAction = null; - RankDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Rank(Action configure) - { - RankValue = null; - RankDescriptor = null; - RankDescriptorAction = configure; - return Self; - } - - /// - /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
- ///
- public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If `true`, returns sequence number and primary term of the last modification of each hit. - /// - public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
- ///
- public SearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// Stats groups to associate with the search.
Each group maintains a statistics aggregation for its associated searches.
You can retrieve these stats using the indices stats API.
///
@@ -1803,6 +1806,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -1834,6 +1849,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -1850,6 +1871,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -1879,10 +1906,32 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } - if (PostFilterDescriptor is not null) + if (MinScoreValue.HasValue) { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + + if (PostFilterDescriptor is not null) + { + writer.WritePropertyName("post_filter"); + JsonSerializer.Serialize(writer, PostFilterDescriptor, options); } else if (PostFilterDescriptorAction is not null) { @@ -1895,6 +1944,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -1911,6 +1966,22 @@ 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 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"); @@ -1940,6 +2011,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -1991,104 +2092,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - 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 RankDescriptor(RankDescriptorAction), options); - } - else if (RankValue is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); @@ -2174,12 +2177,10 @@ public SearchRequestDescriptor() internal override string OperationName => "search"; - public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public SearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); public SearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); @@ -2190,14 +2191,16 @@ public SearchRequestDescriptor() public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); public SearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); - public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q); + public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); + public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); public SearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); public SearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); public SearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public SearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Duration? scroll) => Qs("scroll", scroll); public SearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.SearchType? searchType) => Qs("search_type", searchType); + public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Field? suggestField) => Qs("suggest_field", suggestField); public SearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); public SearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); @@ -2220,27 +2223,44 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } private Action[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action KnnDescriptorAction { get; set; } private Action[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Rank? RankValue { get; set; } + private RankDescriptor RankDescriptor { get; set; } + private Action RankDescriptorAction { get; set; } private ICollection? RescoreValue { get; set; } private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } private Action[] RescoreDescriptorActions { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private IDictionary? ScriptFieldsValue { get; set; } + private ICollection? SearchAfterValue { get; set; } + private bool? SeqNoPrimaryTermValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } @@ -2249,23 +2269,6 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Rank? RankValue { get; set; } - private RankDescriptor RankDescriptor { get; set; } - private Action RankDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private IDictionary? ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } @@ -2370,6 +2373,24 @@ public SearchRequestDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + ///
+ public SearchRequestDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (`*`) patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
///
@@ -2409,6 +2430,15 @@ public SearchRequestDescriptor Fields(params Action + /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ ///
+ public SearchRequestDescriptor From(int? from) + { + FromValue = from; + return Self; + } + /// /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. /// @@ -2436,6 +2466,15 @@ public SearchRequestDescriptor Highlight(Action return Self; } + /// + /// Boosts the _score of documents from specified indices. + /// + public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -2475,6 +2514,42 @@ public SearchRequestDescriptor Knn(params Action[] configure return Self; } + /// + /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
+ ///
+ public SearchRequestDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ ///
+ public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public SearchRequestDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + /// /// Use the `post_filter` parameter to filter search results.
The search hits are filtered after the aggregations are calculated.
A post filter has no impact on the aggregation results.
///
@@ -2502,6 +2577,15 @@ public SearchRequestDescriptor PostFilter(Action confi return Self; } + /// + /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
+ ///
+ public SearchRequestDescriptor Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -2529,6 +2613,33 @@ public SearchRequestDescriptor Query(Action configure) return Self; } + /// + /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// + public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? rank) + { + RankDescriptor = null; + RankDescriptorAction = null; + RankValue = rank; + return Self; + } + + public SearchRequestDescriptor Rank(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. /// @@ -2569,230 +2680,122 @@ public SearchRequestDescriptor Rescore(params Action - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. - ///
- public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SearchRequestDescriptor Slice(SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - /// - /// A comma-separated list of : pairs. - /// - public SearchRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SearchRequestDescriptor Sort(SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// Indicates which source fields are returned for matching documents.
These fields are returned in the hits._source property of the search response.
- ///
- public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public SearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Starting document offset.
Needs to be non-negative.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
///
- public SearchRequestDescriptor From(int? from) + public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) { - FromValue = from; + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); return Self; } /// - /// Boosts the _score of documents from specified indices. + /// Retrieve a script evaluation (based on different fields) for each hit. /// - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) + public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) { - IndicesBoostValue = indicesBoost; + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); return Self; } /// - /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
+ /// Used to retrieve the next page of hits using a set of sort values from the previous page. ///
- public SearchRequestDescriptor MinScore(double? minScore) + public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) { - MinScoreValue = minScore; + SearchAfterValue = searchAfter; return Self; } /// - /// Limits the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `` in the request path.
+ /// If `true`, returns sequence number and primary term of the last modification of each hit. ///
- public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Pit(Action configure) + public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; + SeqNoPrimaryTermValue = seqNoPrimaryTerm; return Self; } /// - /// Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution.
+ /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
///
- public SearchRequestDescriptor Profile(bool? profile = true) + public SearchRequestDescriptor Size(int? size) { - ProfileValue = profile; + SizeValue = size; return Self; } /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// Can be used to split a scrolled search into multiple slices that can be consumed independently. /// - public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? rank) + public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? slice) { - RankDescriptor = null; - RankDescriptorAction = null; - RankValue = rank; + SliceDescriptor = null; + SliceDescriptorAction = null; + SliceValue = slice; return Self; } - public SearchRequestDescriptor Rank(RankDescriptor descriptor) + public SearchRequestDescriptor Slice(SlicedScrollDescriptor descriptor) { - RankValue = null; - RankDescriptorAction = null; - RankDescriptor = descriptor; + SliceValue = null; + SliceDescriptorAction = null; + SliceDescriptor = descriptor; return Self; } - public SearchRequestDescriptor Rank(Action configure) + public SearchRequestDescriptor Slice(Action configure) { - RankValue = null; - RankDescriptor = null; - RankDescriptorAction = configure; + SliceValue = null; + SliceDescriptor = null; + SliceDescriptorAction = configure; return Self; } /// - /// Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
+ /// A comma-separated list of : pairs. ///
- public SearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector) + public SearchRequestDescriptor Sort(ICollection? sort) { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; return Self; } - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - public SearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector) + public SearchRequestDescriptor Sort(SortOptionsDescriptor descriptor) { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; return Self; } - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) + public SearchRequestDescriptor Sort(Action configure) { - SearchAfterValue = searchAfter; + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; return Self; } - /// - /// If `true`, returns sequence number and primary term of the last modification of each hit. - /// - public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + public SearchRequestDescriptor Sort(params Action[] configure) { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; return Self; } /// - /// The number of hits to return.
By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
To page through more hits, use the `search_after` parameter.
+ /// Indicates which source fields are returned for matching documents.
These fields are returned in the hits._source property of the search response.
///
- public SearchRequestDescriptor Size(int? size) + public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { - SizeValue = size; + SourceValue = source; return Self; } @@ -2952,6 +2955,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -2983,6 +2998,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -2999,6 +3020,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -3028,6 +3055,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -3044,6 +3093,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -3060,6 +3115,22 @@ 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 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"); @@ -3089,6 +3160,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -3140,104 +3241,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - 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 RankDescriptor(RankDescriptorAction), options); - } - else if (RankValue is not null) - { - writer.WritePropertyName("rank"); - JsonSerializer.Serialize(writer, RankValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs index 944b796aa5b..303e56f6dd6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs @@ -61,6 +61,11 @@ public sealed class SearchTemplateRequestParameters : RequestParameters ///
public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// If true, hits.total are rendered as an integer in the response. + /// + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -76,11 +81,6 @@ public sealed class SearchTemplateRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - /// - /// If true, hits.total are rendered as an integer in the response. - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. /// @@ -144,6 +144,12 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } + /// + /// If true, hits.total are rendered as an integer in the response. + /// + [JsonIgnore] + public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } + /// /// Custom value used to route operations to a specific shard. /// @@ -162,12 +168,6 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b [JsonIgnore] public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - /// - /// If true, hits.total are rendered as an integer in the response. - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - /// /// If `true`, the response prefixes aggregation and suggester names with their respective types. /// 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 666106dfae0..a99fb23b7c1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -71,76 +71,76 @@ public sealed partial class QueryRequest : PlainRequest public int? FetchSize { get; set; } /// - /// Elasticsearch query DSL for additional filtering. + /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } + [JsonInclude, JsonPropertyName("field_multi_value_leniency")] + public bool? FieldMultiValueLeniency { get; set; } /// - /// SQL query to run. + /// Elasticsearch query DSL for additional filtering. /// - [JsonInclude, JsonPropertyName("query")] - public string? Query { get; set; } + [JsonInclude, JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } /// - /// The timeout before the request fails. + /// If true, the search can run on frozen indices. Defaults to false. /// - [JsonInclude, JsonPropertyName("request_timeout")] - public Elastic.Clients.Elasticsearch.Duration? RequestTimeout { get; set; } + [JsonInclude, JsonPropertyName("index_using_frozen")] + public bool? IndexUsingFrozen { get; set; } /// - /// The timeout before a pagination request fails. + /// Retention period for an async or saved synchronous search. /// - [JsonInclude, JsonPropertyName("page_timeout")] - public Elastic.Clients.Elasticsearch.Duration? PageTimeout { get; set; } + [JsonInclude, JsonPropertyName("keep_alive")] + public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get; set; } /// - /// ISO-8601 time zone ID for the search. + /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } + [JsonInclude, JsonPropertyName("keep_on_completion")] + public bool? KeepOnCompletion { get; set; } /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). + /// The timeout before a pagination request fails. /// - [JsonInclude, JsonPropertyName("field_multi_value_leniency")] - public bool? FieldMultiValueLeniency { get; set; } + [JsonInclude, JsonPropertyName("page_timeout")] + public Elastic.Clients.Elasticsearch.Duration? PageTimeout { get; set; } /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Values for parameters in the query. ///
- [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } + [JsonInclude, JsonPropertyName("params")] + public IDictionary? Params { get; set; } /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. + /// SQL query to run. /// - [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] - public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get; set; } + [JsonInclude, JsonPropertyName("query")] + public string? Query { get; set; } /// - /// Values for parameters in the query. + /// The timeout before the request fails. /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } + [JsonInclude, JsonPropertyName("request_timeout")] + public Elastic.Clients.Elasticsearch.Duration? RequestTimeout { get; set; } /// - /// Retention period for an async or saved synchronous search. + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
///
- [JsonInclude, JsonPropertyName("keep_alive")] - public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get; set; } + [JsonInclude, JsonPropertyName("runtime_mappings")] + public IDictionary? RuntimeMappings { get; set; } /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. + /// ISO-8601 time zone ID for the search. /// - [JsonInclude, JsonPropertyName("keep_on_completion")] - public bool? KeepOnCompletion { get; set; } + [JsonInclude, JsonPropertyName("time_zone")] + public string? TimeZone { get; set; } /// - /// If true, the search can run on frozen indices. Defaults to false. + /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. /// - [JsonInclude, JsonPropertyName("index_using_frozen")] - public bool? IndexUsingFrozen { get; set; } + [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] + public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get; set; } } /// @@ -162,14 +162,14 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } - private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } private string? CursorValue { get; set; } private int? FetchSizeValue { get; set; } private bool? FieldMultiValueLeniencyValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } + private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } private bool? IndexUsingFrozenValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } @@ -181,33 +181,6 @@ public QueryRequestDescriptor() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeoutValue { get; set; } - /// - /// Elasticsearch query DSL for additional filtering. - /// - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public QueryRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. /// @@ -253,6 +226,33 @@ public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMult return Self; } + /// + /// Elasticsearch query DSL for additional filtering. + /// + public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public QueryRequestDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// If true, the search can run on frozen indices. Defaults to false. /// @@ -346,22 +346,6 @@ public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Client protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (!string.IsNullOrEmpty(CatalogValue)) { writer.WritePropertyName("catalog"); @@ -392,6 +376,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(FieldMultiValueLeniencyValue.Value); } + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IndexUsingFrozenValue.HasValue) { writer.WritePropertyName("index_using_frozen"); @@ -475,14 +475,14 @@ public QueryRequestDescriptor() internal override string OperationName => "sql.query"; - private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } - private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } private string? CursorValue { get; set; } private int? FetchSizeValue { get; set; } private bool? FieldMultiValueLeniencyValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } + private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private bool? IndexUsingFrozenValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? KeepAliveValue { get; set; } private bool? KeepOnCompletionValue { get; set; } @@ -494,33 +494,6 @@ public QueryRequestDescriptor() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeoutValue { get; set; } - /// - /// Elasticsearch query DSL for additional filtering. - /// - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public QueryRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. /// @@ -566,6 +539,33 @@ public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLenie return Self; } + /// + /// Elasticsearch query DSL for additional filtering. + /// + public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public QueryRequestDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public QueryRequestDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// If true, the search can run on frozen indices. Defaults to false. /// @@ -659,22 +659,6 @@ public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticse protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (!string.IsNullOrEmpty(CatalogValue)) { writer.WritePropertyName("catalog"); @@ -705,6 +689,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(FieldMultiValueLeniencyValue.Value); } + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IndexUsingFrozenValue.HasValue) { writer.WritePropertyName("index_using_frozen"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs index 5284538b54b..fd8da9bf47d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs @@ -46,6 +46,11 @@ public sealed class ListRequestParameters : RequestParameters /// public Elastic.Clients.Elasticsearch.Tasks.GroupBy? GroupBy { get => Q("group_by"); set => Q("group_by", value); } + /// + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + /// /// Comma-separated list of node IDs or names used to limit returned information. /// @@ -56,11 +61,6 @@ public sealed class ListRequestParameters : RequestParameters ///
public Elastic.Clients.Elasticsearch.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - /// /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -105,22 +105,22 @@ public sealed partial class ListRequest : PlainRequest public Elastic.Clients.Elasticsearch.Tasks.GroupBy? GroupBy { get => Q("group_by"); set => Q("group_by", value); } /// - /// Comma-separated list of node IDs or names used to limit returned information. + /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// [JsonIgnore] - public ICollection? NodeId { get => Q?>("node_id"); set => Q("node_id", value); } + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// - /// Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. + /// Comma-separated list of node IDs or names used to limit returned information. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } + public ICollection? NodeId { get => Q?>("node_id"); set => Q("node_id", value); } /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. + /// Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. /// [JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public Elastic.Clients.Elasticsearch.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } /// /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs index 6c0ee58aa7f..5a010d230ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs @@ -232,8 +232,8 @@ internal TermVectorsRequestDescriptor() internal override string OperationName => "termvectors"; - public TermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public TermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) => Qs("fields", fields); + public TermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public TermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); public TermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); public TermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs index d80120727b3..497da50b091 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs @@ -50,43 +50,43 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r internal override string OperationName => "terms_enum"; - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Field Field { get; set; } - - /// - /// How many matching terms to return. - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Duration? Timeout { get; set; } - /// /// When true the provided search string is matched against index terms without case sensitivity. /// [JsonInclude, JsonPropertyName("case_insensitive")] public bool? CaseInsensitive { get; set; } + /// + /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. + /// + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Field Field { get; set; } + /// /// Allows to filter an index shard if the provided query rewrites to match_none. /// [JsonInclude, JsonPropertyName("index_filter")] public Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilter { get; set; } + [JsonInclude, JsonPropertyName("search_after")] + public string? SearchAfter { get; set; } + + /// + /// How many matching terms to return. + /// + [JsonInclude, JsonPropertyName("size")] + public int? Size { get; set; } /// /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. /// [JsonInclude, JsonPropertyName("string")] public string? String { get; set; } - [JsonInclude, JsonPropertyName("search_after")] - public string? SearchAfter { get; set; } + + /// + /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. + /// + [JsonInclude, JsonPropertyName("timeout")] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get; set; } } /// @@ -122,67 +122,67 @@ public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch return Self; } + private bool? CaseInsensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilterValue { get; set; } private QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } private Action> IndexFilterDescriptorAction { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? SearchAfterValue { get; set; } private int? SizeValue { get; set; } private string? StringValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? TimeoutValue { get; set; } /// - /// Allows to filter an index shard if the provided query rewrites to match_none. + /// When true the provided search string is matched against index terms without case sensitivity. /// - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) + public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; + CaseInsensitiveValue = caseInsensitive; return Self; } - public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) + /// + /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. + /// + public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Field field) { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; + FieldValue = field; return Self; } - public TermsEnumRequestDescriptor IndexFilter(Action> configure) + /// + /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. + /// + public TermsEnumRequestDescriptor Field(Expression> field) { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; + FieldValue = field; return Self; } /// - /// When true the provided search string is matched against index terms without case sensitivity. + /// Allows to filter an index shard if the provided query rewrites to match_none. /// - public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) + public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) { - CaseInsensitiveValue = caseInsensitive; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; return Self; } - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) { - FieldValue = field; + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; return Self; } - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - public TermsEnumRequestDescriptor Field(Expression> field) + public TermsEnumRequestDescriptor IndexFilter(Action> configure) { - FieldValue = field; + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; return Self; } @@ -222,6 +222,14 @@ public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsear protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseInsensitiveValue.HasValue) + { + writer.WritePropertyName("case_insensitive"); + writer.WriteBooleanValue(CaseInsensitiveValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (IndexFilterDescriptor is not null) { writer.WritePropertyName("index_filter"); @@ -238,14 +246,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexFilterValue, options); } - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(SearchAfterValue)) { writer.WritePropertyName("search_after"); @@ -303,43 +303,16 @@ public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName return Self; } + private bool? CaseInsensitiveValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilterValue { get; set; } private QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } private Action IndexFilterDescriptorAction { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? SearchAfterValue { get; set; } private int? SizeValue { get; set; } private string? StringValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? TimeoutValue { get; set; } - /// - /// Allows to filter an index shard if the provided query rewrites to match_none. - /// - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(Action configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - /// /// When true the provided search string is matched against index terms without case sensitivity. /// @@ -376,6 +349,33 @@ public TermsEnumRequestDescriptor Field(Expression + /// Allows to filter an index shard if the provided query rewrites to match_none. + /// + public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(Action configure) + { + IndexFilterValue = null; + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = configure; + return Self; + } + public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) { SearchAfterValue = searchAfter; @@ -412,6 +412,14 @@ public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (CaseInsensitiveValue.HasValue) + { + writer.WritePropertyName("case_insensitive"); + writer.WriteBooleanValue(CaseInsensitiveValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (IndexFilterDescriptor is not null) { writer.WritePropertyName("index_filter"); @@ -428,14 +436,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexFilterValue, options); } - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (!string.IsNullOrEmpty(SearchAfterValue)) { writer.WritePropertyName("search_after"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs index 0da121dd86d..ca3a3966387 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs @@ -357,6 +357,12 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas [JsonIgnore] public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } + /// + /// What to do if update by query hits version conflicts: `abort` or `proceed`. + /// + [JsonInclude, JsonPropertyName("conflicts")] + public Elastic.Clients.Elasticsearch.Conflicts? Conflicts { get; set; } + /// /// The maximum number of documents to update. /// @@ -380,12 +386,6 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; } - - /// - /// What to do if update by query hits version conflicts: `abort` or `proceed`. - /// - [JsonInclude, JsonPropertyName("conflicts")] - public Elastic.Clients.Elasticsearch.Conflicts? Conflicts { get; set; } } /// @@ -412,8 +412,8 @@ internal UpdateByQueryRequestDescriptor() internal override string OperationName => "update_by_query"; public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public UpdateByQueryRequestDescriptor Df(string? df) => Qs("df", df); public UpdateByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -446,15 +446,33 @@ public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elastic return Self; } + private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } + + /// + /// What to do if update by query hits version conflicts: `abort` or `proceed`. + /// + public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) + { + ConflictsValue = conflicts; + return Self; + } + + /// + /// The maximum number of documents to update. + /// + public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to update using the Query DSL. @@ -483,6 +501,15 @@ public UpdateByQueryRequestDescriptor Query(Action + /// The script to run to update the document source or metadata when updating. + /// + public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// Slice the request manually using the provided slice ID and total number of slices. /// @@ -510,36 +537,21 @@ public UpdateByQueryRequestDescriptor Slice(Action - /// What to do if update by query hits version conflicts: `abort` or `proceed`. - /// - public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// The maximum number of documents to update. - /// - public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// The script to run to update the document source or metadata when updating. - /// - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) - { - ScriptValue = script; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ConflictsValue is not null) + { + writer.WritePropertyName("conflicts"); + JsonSerializer.Serialize(writer, ConflictsValue, options); + } + + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -556,6 +568,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -572,24 +590,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - writer.WriteEndObject(); } } @@ -618,8 +618,8 @@ internal UpdateByQueryRequestDescriptor() internal override string OperationName => "update_by_query"; public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); + public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public UpdateByQueryRequestDescriptor Df(string? df) => Qs("df", df); public UpdateByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -652,15 +652,33 @@ public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indi return Self; } + private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } + private long? MaxDocsValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } + + /// + /// What to do if update by query hits version conflicts: `abort` or `proceed`. + /// + public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) + { + ConflictsValue = conflicts; + return Self; + } + + /// + /// The maximum number of documents to update. + /// + public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } /// /// Specifies the documents to update using the Query DSL. @@ -689,6 +707,15 @@ public UpdateByQueryRequestDescriptor Query(Action con return Self; } + /// + /// The script to run to update the document source or metadata when updating. + /// + public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// Slice the request manually using the provided slice ID and total number of slices. /// @@ -716,36 +743,21 @@ public UpdateByQueryRequestDescriptor Slice(Action confi return Self; } - /// - /// What to do if update by query hits version conflicts: `abort` or `proceed`. - /// - public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// The maximum number of documents to update. - /// - public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// The script to run to update the document source or metadata when updating. - /// - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) - { - ScriptValue = script; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ConflictsValue is not null) + { + writer.WritePropertyName("conflicts"); + JsonSerializer.Serialize(writer, ConflictsValue, options); + } + + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -762,6 +774,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -778,24 +796,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index 7cecd2993ef..5c80d3bb54f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -67,24 +67,24 @@ public sealed class UpdateRequestParameters : RequestParameters public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } /// - /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
+ /// Specify the source fields you want to exclude. ///
- public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// - /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
+ /// Specify the source fields you want to retrieve. ///
- public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Specify the source fields you want to exclude. + /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
///
- public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// - /// Specify the source fields you want to retrieve. + /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
///
- public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } } /// @@ -147,28 +147,28 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } /// - /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
+ /// Specify the source fields you want to exclude. ///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// - /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
+ /// Specify the source fields you want to retrieve. ///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// - /// Specify the source fields you want to exclude. + /// Period to wait for dynamic mapping updates and active shards.
This guarantees Elasticsearch waits for at least the timeout before failing.
The actual wait time could be longer, particularly when multiple waits occur.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// - /// Specify the source fields you want to retrieve. + /// The number of shard copies that must be active before proceeding with the operations.
Set to 'all' or any positive integer up to the total number of shards in the index
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
///
[JsonIgnore] - public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } /// /// Set to false to disable setting 'result' in the response
to 'noop' if no change to the document occurred.
@@ -258,8 +258,6 @@ internal UpdateRequestDescriptor() internal override string OperationName => "update"; - public UpdateRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public UpdateRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public UpdateRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); public UpdateRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); public UpdateRequestDescriptor Lang(string? lang) => Qs("lang", lang); @@ -267,6 +265,8 @@ internal UpdateRequestDescriptor() public UpdateRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); public UpdateRequestDescriptor RetryOnConflict(int? retryOnConflict) => Qs("retry_on_conflict", retryOnConflict); public UpdateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public UpdateRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); + public UpdateRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public UpdateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public UpdateRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -282,23 +282,14 @@ public UpdateRequestDescriptor Index(Elastic.Client return Self; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? DetectNoopValue { get; set; } private TPartialDocument? DocValue { get; set; } private bool? DocAsUpsertValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private bool? ScriptedUpsertValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private TDocument? UpsertValue { get; set; } - /// - /// Set to false to disable source retrieval. You can also specify a comma-separated
list of the fields you want to retrieve.
- ///
- public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - /// /// Set to false to disable setting 'result' in the response
to 'noop' if no change to the document occurred.
///
@@ -344,6 +335,15 @@ public UpdateRequestDescriptor ScriptedUpsert(bool? return Self; } + /// + /// Set to false to disable source retrieval. You can also specify a comma-separated
list of the fields you want to retrieve.
+ ///
+ public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// If the document does not already exist, the contents of 'upsert' are inserted as a
new document. If the document exists, the 'script' is executed.
///
@@ -356,12 +356,6 @@ public UpdateRequestDescriptor Upsert(TDocument? up protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (DetectNoopValue.HasValue) { writer.WritePropertyName("detect_noop"); @@ -392,6 +386,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ScriptedUpsertValue.Value); } + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (UpsertValue is not null) { writer.WritePropertyName("upsert"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs index a1a0f732caf..8037576218a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs @@ -38,7 +38,7 @@ internal AsyncSearchNamespacedClient(ElasticsearchClient client) : base(client) /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequest request) { @@ -48,7 +48,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequest request /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(AsyncSearchStatusRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task StatusAsync(AsyncSearchStatusRequ /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Id id) { @@ -69,7 +69,7 @@ public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Id /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequestDescript /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { @@ -91,7 +91,7 @@ public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Id /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequestDescriptor descriptor) { @@ -101,7 +101,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequ /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { @@ -113,7 +113,7 @@ public virtual AsyncSearchStatusResponse Status(Elastic.Clients.Elast /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task StatusAsync(Elastic.Clients.Elast /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -134,7 +134,7 @@ public virtual Task StatusAsync(AsyncSearchStatusRequ /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -146,7 +146,7 @@ public virtual Task StatusAsync(Elastic.Clients.Elast /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -156,7 +156,7 @@ public virtual Task StatusAsync(AsyncSearc /// /// Retrieves the status of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -168,7 +168,7 @@ public virtual Task StatusAsync(Elastic.Cl /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequest request) { @@ -178,7 +178,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequest request /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteAsyncSearchRequest request, CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task DeleteAsync(DeleteAsyncSearchRequ /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Id id) { @@ -199,7 +199,7 @@ public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Id /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequestDescriptor descriptor) { @@ -209,7 +209,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequestDescript /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { @@ -221,7 +221,7 @@ public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Id /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequestDescriptor descriptor) { @@ -231,7 +231,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequ /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { @@ -243,7 +243,7 @@ public virtual DeleteAsyncSearchResponse Delete(Elastic.Clients.Elast /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -254,7 +254,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elast /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -264,7 +264,7 @@ public virtual Task DeleteAsync(DeleteAsyncSearchRequ /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -276,7 +276,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elast /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -286,7 +286,7 @@ public virtual Task DeleteAsync(DeleteAsyn /// /// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -298,7 +298,7 @@ public virtual Task DeleteAsync(Elastic.Cl /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(GetAsyncSearchRequest request) { @@ -308,7 +308,7 @@ public virtual GetAsyncSearchResponse Get(GetAsyncSearchRe /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(GetAsyncSearchRequest request, CancellationToken cancellationToken = default) { @@ -318,7 +318,7 @@ public virtual Task> GetAsync(GetAs /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(Elastic.Clients.Elasticsearch.Id id) { @@ -329,7 +329,7 @@ public virtual GetAsyncSearchResponse Get(Elastic.Clients. /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(GetAsyncSearchRequestDescriptor descriptor) { @@ -339,7 +339,7 @@ public virtual GetAsyncSearchResponse Get(GetAsyncSearchRe /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetAsyncSearchResponse Get(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { @@ -351,7 +351,7 @@ public virtual GetAsyncSearchResponse Get(Elastic.Clients. /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -362,7 +362,7 @@ public virtual Task> GetAsync(Elast /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(GetAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -372,7 +372,7 @@ public virtual Task> GetAsync(GetAs /// /// Retrieves the results of a previously submitted async search request given its ID. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -384,7 +384,7 @@ public virtual Task> GetAsync(Elast /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit(SubmitAsyncSearchRequest request) { @@ -394,7 +394,7 @@ public virtual SubmitAsyncSearchResponse Submit(SubmitAsyn /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> SubmitAsync(SubmitAsyncSearchRequest request, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task> SubmitAsync /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit() { @@ -415,7 +415,7 @@ public virtual SubmitAsyncSearchResponse Submit() /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit(SubmitAsyncSearchRequestDescriptor descriptor) { @@ -425,7 +425,7 @@ public virtual SubmitAsyncSearchResponse Submit(SubmitAsyn /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SubmitAsyncSearchResponse Submit(Action> configureRequest) { @@ -437,7 +437,7 @@ public virtual SubmitAsyncSearchResponse Submit(Action /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task> SubmitAsync(CancellationToken cancellationToken = default) { @@ -448,7 +448,7 @@ public virtual Task> SubmitAsync /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> SubmitAsync(SubmitAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -458,7 +458,7 @@ public virtual Task> SubmitAsync /// /// Executes a search request asynchronously. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> SubmitAsync(Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs index a965a2ec86a..a56c4e064b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs @@ -38,7 +38,7 @@ internal ClusterNamespacedClient(ElasticsearchClient client) : base(client) /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequest request) { @@ -48,7 +48,7 @@ public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequ /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AllocationExplainAsync(AllocationExplainRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task AllocationExplainAsync(Allocation /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain() { @@ -69,7 +69,7 @@ public virtual AllocationExplainResponse AllocationExplain() /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual AllocationExplainResponse AllocationExplain(AllocationExplainRequ /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual AllocationExplainResponse AllocationExplain(Action configureRequest) { @@ -91,7 +91,7 @@ public virtual AllocationExplainResponse AllocationExplain(Action /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task AllocationExplainAsync(CancellationToken cancellationToken = default) { @@ -102,7 +102,7 @@ public virtual Task AllocationExplainAsync(Cancellati /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AllocationExplainAsync(AllocationExplainRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -112,7 +112,7 @@ public virtual Task AllocationExplainAsync(Allocation /// /// Provides explanations for shard allocations in the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AllocationExplainAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task AllocationExplainAsync(Action /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual ClusterStatsResponse Stats(ClusterStatsRequest request) { @@ -134,7 +134,7 @@ public virtual ClusterStatsResponse Stats(ClusterStatsRequest request) /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(ClusterStatsRequest request, CancellationToken cancellationToken = default) { @@ -144,7 +144,7 @@ public virtual Task StatsAsync(ClusterStatsRequest request /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClusterStatsResponse Stats() { @@ -155,7 +155,7 @@ public virtual ClusterStatsResponse Stats() /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClusterStatsResponse Stats(ClusterStatsRequestDescriptor descriptor) { @@ -165,7 +165,7 @@ public virtual ClusterStatsResponse Stats(ClusterStatsRequestDescriptor descript /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClusterStatsResponse Stats(Action configureRequest) { @@ -177,7 +177,7 @@ public virtual ClusterStatsResponse Stats(Action /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task StatsAsync(CancellationToken cancellat /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(ClusterStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -198,7 +198,7 @@ public virtual Task StatsAsync(ClusterStatsRequestDescript /// /// Returns high-level overview of cluster statistics. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -210,7 +210,7 @@ public virtual Task StatsAsync(Action /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequest request) { @@ -220,7 +220,7 @@ public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequest /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetClusterSettingsRequest request, CancellationToken cancellationToken = default) { @@ -230,7 +230,7 @@ public virtual Task GetSettingsAsync(GetClusterSetti /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings() { @@ -241,7 +241,7 @@ public virtual GetClusterSettingsResponse GetSettings() /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequestDescriptor descriptor) { @@ -251,7 +251,7 @@ public virtual GetClusterSettingsResponse GetSettings(GetClusterSettingsRequestD /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetClusterSettingsResponse GetSettings(Action configureRequest) { @@ -263,7 +263,7 @@ public virtual GetClusterSettingsResponse GetSettings(Action /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) { @@ -274,7 +274,7 @@ public virtual Task GetSettingsAsync(CancellationTok /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetClusterSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -284,7 +284,7 @@ public virtual Task GetSettingsAsync(GetClusterSetti /// /// Returns cluster settings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -296,7 +296,7 @@ public virtual Task GetSettingsAsync(Action /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(HealthRequest request) { @@ -306,7 +306,7 @@ public virtual HealthResponse Health(HealthRequest request) /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(HealthRequest request, CancellationToken cancellationToken = default) { @@ -316,7 +316,7 @@ public virtual Task HealthAsync(HealthRequest request, Cancellat /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health() { @@ -327,7 +327,7 @@ public virtual HealthResponse Health() /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(HealthRequestDescriptor descriptor) { @@ -337,7 +337,7 @@ public virtual HealthResponse Health(HealthRequestDescriptor descriptor) /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(Action configureRequest) { @@ -349,7 +349,7 @@ public virtual HealthResponse Health(Action configureRe /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(HealthRequestDescriptor descriptor) { @@ -359,7 +359,7 @@ public virtual HealthResponse Health(HealthRequestDescriptor /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual HealthResponse Health(Action> configureRequest) { @@ -371,7 +371,7 @@ public virtual HealthResponse Health(Action /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(CancellationToken cancellationToken = default) { @@ -382,7 +382,7 @@ public virtual Task HealthAsync(CancellationToken cancellationTo /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(HealthRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -392,7 +392,7 @@ public virtual Task HealthAsync(HealthRequestDescriptor descript /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task HealthAsync(Action /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(HealthRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -414,7 +414,7 @@ public virtual Task HealthAsync(HealthRequestDescript /// /// Returns basic information about the health of the cluster. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HealthAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -426,7 +426,7 @@ public virtual Task HealthAsync(Action /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PendingTasksResponse PendingTasks(PendingTasksRequest request) { @@ -436,7 +436,7 @@ public virtual PendingTasksResponse PendingTasks(PendingTasksRequest request) /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task PendingTasksAsync(PendingTasksRequest request, CancellationToken cancellationToken = default) { @@ -446,7 +446,7 @@ public virtual Task PendingTasksAsync(PendingTasksRequest /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual PendingTasksResponse PendingTasks() { @@ -457,7 +457,7 @@ public virtual PendingTasksResponse PendingTasks() /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual PendingTasksResponse PendingTasks(PendingTasksRequestDescriptor descriptor) { @@ -467,7 +467,7 @@ public virtual PendingTasksResponse PendingTasks(PendingTasksRequestDescriptor d /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual PendingTasksResponse PendingTasks(Action configureRequest) { @@ -479,7 +479,7 @@ public virtual PendingTasksResponse PendingTasks(Action /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PendingTasksAsync(CancellationToken cancellationToken = default) { @@ -490,7 +490,7 @@ public virtual Task PendingTasksAsync(CancellationToken ca /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task PendingTasksAsync(PendingTasksRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -500,7 +500,7 @@ public virtual Task PendingTasksAsync(PendingTasksRequestD /// /// Returns a list of any cluster-level changes (e.g. create index, update mapping,
allocate or fail shard) which have not yet been executed.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task PendingTasksAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Enrich.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Enrich.g.cs index b793fee1808..6deac0bcbcb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Enrich.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Enrich.g.cs @@ -210,7 +210,7 @@ public virtual Task StatsAsync(Action /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequest request) { @@ -220,7 +220,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequest request) /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(ExecutePolicyRequest request, CancellationToken cancellationToken = default) { @@ -230,7 +230,7 @@ public virtual Task ExecutePolicyAsync(ExecutePolicyReque /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch.Name name) { @@ -241,7 +241,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequestDescriptor descriptor) { @@ -251,7 +251,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(ExecutePolicyRequestDescripto /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -263,7 +263,7 @@ public virtual ExecutePolicyResponse ExecutePolicy(Elastic.Clients.Elasticsearch /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -274,7 +274,7 @@ public virtual Task ExecutePolicyAsync(Elastic.Clients.El /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(ExecutePolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -284,7 +284,7 @@ public virtual Task ExecutePolicyAsync(ExecutePolicyReque /// /// Creates the enrich index for an existing enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecutePolicyAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -382,7 +382,7 @@ public virtual Task GetPolicyAsync(Action /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(PutPolicyRequest request) { @@ -392,7 +392,7 @@ public virtual PutPolicyResponse PutPolicy(PutPolicyRequest request) /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(PutPolicyRequest request, CancellationToken cancellationToken = default) { @@ -402,7 +402,7 @@ public virtual Task PutPolicyAsync(PutPolicyRequest request, /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor descriptor) { @@ -412,7 +412,7 @@ public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor descriptor /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -424,7 +424,7 @@ public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsearch.Name na /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor descriptor) { @@ -434,7 +434,7 @@ public virtual PutPolicyResponse PutPolicy(PutPolicyRequestDescriptor /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) { @@ -446,7 +446,7 @@ public virtual PutPolicyResponse PutPolicy(Elastic.Clients.Elasticsea /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -456,7 +456,7 @@ public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -468,7 +468,7 @@ public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsea /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -478,7 +478,7 @@ public virtual Task PutPolicyAsync(PutPolicyReques /// /// Creates a new enrich policy. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Eql.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Eql.g.cs index 5ea557923b6..98018d2f274 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Eql.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Eql.g.cs @@ -168,7 +168,7 @@ public virtual Task DeleteAsync(Elastic.Clients.El /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(EqlGetRequest request) { @@ -178,7 +178,7 @@ public virtual EqlGetResponse Get(EqlGetRequest request) /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(EqlGetRequest request, CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task> GetAsync(EqlGetRequest reque /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch.Id id) { @@ -199,7 +199,7 @@ public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch. /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(EqlGetRequestDescriptor descriptor) { @@ -209,7 +209,7 @@ public virtual EqlGetResponse Get(EqlGetRequestDescriptor descri /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { @@ -221,7 +221,7 @@ public virtual EqlGetResponse Get(Elastic.Clients.Elasticsearch. /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -232,7 +232,7 @@ public virtual Task> GetAsync(Elastic.Clients.Ela /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(EqlGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -242,7 +242,7 @@ public virtual Task> GetAsync(EqlGetRequestDescri /// /// Returns async results from previously executed Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -340,7 +340,7 @@ public virtual Task> SearchAsync(Elastic.Clien /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequest request) { @@ -350,7 +350,7 @@ public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequest request) /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetEqlStatusRequest request, CancellationToken cancellationToken = default) { @@ -360,7 +360,7 @@ public virtual Task GetStatusAsync(GetEqlStatusRequest req /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Id id) { @@ -371,7 +371,7 @@ public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Id i /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDescriptor descriptor) { @@ -381,7 +381,7 @@ public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDescriptor desc /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { @@ -393,7 +393,7 @@ public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Id i /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDescriptor descriptor) { @@ -403,7 +403,7 @@ public virtual GetEqlStatusResponse GetStatus(GetEqlStatusRequestDesc /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { @@ -415,7 +415,7 @@ public virtual GetEqlStatusResponse GetStatus(Elastic.Clients.Elastic /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -426,7 +426,7 @@ public virtual Task GetStatusAsync(Elastic.Clients.Elastic /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetEqlStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -436,7 +436,7 @@ public virtual Task GetStatusAsync(GetEqlStatusRequestDesc /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -448,7 +448,7 @@ public virtual Task GetStatusAsync(Elastic.Clients.Elastic /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetEqlStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -458,7 +458,7 @@ public virtual Task GetStatusAsync(GetEqlStatus /// /// Returns the status of a previously submitted async or stored Event Query Language (EQL) search - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs new file mode 100644 index 00000000000..5d1ca4cfd0a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs @@ -0,0 +1,156 @@ +// 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 System; +using System.Threading; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch.Esql; + +public partial class EsqlNamespacedClient : NamespacedClientProxy +{ + /// + /// Initializes a new instance of the class for mocking. + /// + protected EsqlNamespacedClient() : base() + { + } + + internal EsqlNamespacedClient(ElasticsearchClient client) : base(client) + { + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual EsqlQueryResponse Query(EsqlQueryRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryAsync(EsqlQueryRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual EsqlQueryResponse Query(EsqlQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual EsqlQueryResponse Query(Action configureRequest) + { + var descriptor = new EsqlQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual EsqlQueryResponse Query(EsqlQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual EsqlQueryResponse Query(Action> configureRequest) + { + var descriptor = new EsqlQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryAsync(EsqlQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new EsqlQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryAsync(EsqlQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. + /// Executes an ESQL request + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new EsqlQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor, cancellationToken); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Graph.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Graph.g.cs index eae430be7a6..96181175550 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Graph.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Graph.g.cs @@ -38,7 +38,7 @@ internal GraphNamespacedClient(ElasticsearchClient client) : base(client) /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(ExploreRequest request) { @@ -48,7 +48,7 @@ public virtual ExploreResponse Explore(ExploreRequest request) /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(ExploreRequest request, CancellationToken cancellationToken = default) { @@ -58,7 +58,7 @@ public virtual Task ExploreAsync(ExploreRequest request, Cancel /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Indices indices) { @@ -69,7 +69,7 @@ public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Indices ind /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(ExploreRequestDescriptor descriptor) { @@ -79,7 +79,7 @@ public virtual ExploreResponse Explore(ExploreRequestDescriptor descriptor) /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) { @@ -91,7 +91,7 @@ public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Indices ind /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(ExploreRequestDescriptor descriptor) { @@ -101,7 +101,7 @@ public virtual ExploreResponse Explore(ExploreRequestDescriptor /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) { @@ -113,7 +113,7 @@ public virtual ExploreResponse Explore(Elastic.Clients.Elasticsearch. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -124,7 +124,7 @@ public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(ExploreRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -134,7 +134,7 @@ public virtual Task ExploreAsync(ExploreRequestDescriptor descr /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -146,7 +146,7 @@ public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch. /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(ExploreRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -156,7 +156,7 @@ public virtual Task ExploreAsync(ExploreRequestDescr /// /// Explore extracted and summarized information about the documents and terms in an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs index 1b509ed3e28..fee864b6c92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs @@ -214,7 +214,7 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(CloseIndexRequest request) { @@ -224,7 +224,7 @@ public virtual CloseIndexResponse Close(CloseIndexRequest request) /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(CloseIndexRequest request, CancellationToken cancellationToken = default) { @@ -234,7 +234,7 @@ public virtual Task CloseAsync(CloseIndexRequest request, Ca /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Indices indices) { @@ -245,7 +245,7 @@ public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Indices in /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor descriptor) { @@ -255,7 +255,7 @@ public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor descriptor) /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) { @@ -267,7 +267,7 @@ public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Indices in /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor descriptor) { @@ -277,7 +277,7 @@ public virtual CloseIndexResponse Close(CloseIndexRequestDescriptor /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) { @@ -289,7 +289,7 @@ public virtual CloseIndexResponse Close(Elastic.Clients.Elasticsearch /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -300,7 +300,7 @@ public virtual Task CloseAsync(Elastic.Clients.Elasticsearch /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(CloseIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -310,7 +310,7 @@ public virtual Task CloseAsync(CloseIndexRequestDescriptor d /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -322,7 +322,7 @@ public virtual Task CloseAsync(Elastic.Clients.Elasticsearch /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(CloseIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -332,7 +332,7 @@ public virtual Task CloseAsync(CloseIndexRequestD /// /// Closes an index. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -430,7 +430,7 @@ public virtual Task CreateDataStreamAsync(Elastic.Clie /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(CreateIndexRequest request) { @@ -440,7 +440,7 @@ public virtual CreateIndexResponse Create(CreateIndexRequest request) /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateIndexRequest request, CancellationToken cancellationToken = default) { @@ -450,7 +450,7 @@ public virtual Task CreateAsync(CreateIndexRequest request, /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexName index) { @@ -461,7 +461,7 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexNam /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descriptor) { @@ -471,7 +471,7 @@ public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descripto /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest) { @@ -483,7 +483,7 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexNam /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create() { @@ -494,7 +494,7 @@ public virtual CreateIndexResponse Create() /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Action> configureRequest) { @@ -506,7 +506,7 @@ public virtual CreateIndexResponse Create(Action /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descriptor) { @@ -516,7 +516,7 @@ public virtual CreateIndexResponse Create(CreateIndexRequestDescripto /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) { @@ -528,7 +528,7 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsear /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) { @@ -539,7 +539,7 @@ public virtual Task CreateAsync(Elastic.Clients.Elasticsear /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -549,7 +549,7 @@ public virtual Task CreateAsync(CreateIndexRequestDescripto /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest, CancellationToken cancellationToken = default) { @@ -561,7 +561,7 @@ public virtual Task CreateAsync(Elastic.Clients.Elasticsear /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CancellationToken cancellationToken = default) { @@ -572,7 +572,7 @@ public virtual Task CreateAsync(CancellationToke /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -584,7 +584,7 @@ public virtual Task CreateAsync(Action /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -594,7 +594,7 @@ public virtual Task CreateAsync(CreateIndexReque /// /// Creates an index with optional settings and mappings. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -1038,7 +1038,7 @@ public virtual Task DeleteAsync(Elastic.Clients. /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTemplateRequest request) { @@ -1048,7 +1048,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTempla /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -1058,7 +1058,7 @@ public virtual Task DeleteIndexTemplateAsync(Delete /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.Elasticsearch.Names name) { @@ -1069,7 +1069,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.E /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTemplateRequestDescriptor descriptor) { @@ -1079,7 +1079,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTempla /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) { @@ -1091,7 +1091,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.E /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -1102,7 +1102,7 @@ public virtual Task DeleteIndexTemplateAsync(Elasti /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1112,7 +1112,7 @@ public virtual Task DeleteIndexTemplateAsync(Delete /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1124,7 +1124,7 @@ public virtual Task DeleteIndexTemplateAsync(Elasti /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequest request) { @@ -1134,7 +1134,7 @@ public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequest reque /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(DeleteTemplateRequest request, CancellationToken cancellationToken = default) { @@ -1144,7 +1144,7 @@ public virtual Task DeleteTemplateAsync(DeleteTemplateRe /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsearch.Name name) { @@ -1155,7 +1155,7 @@ public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsear /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequestDescriptor descriptor) { @@ -1165,7 +1165,7 @@ public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequestDescri /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -1177,7 +1177,7 @@ public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsear /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -1188,7 +1188,7 @@ public virtual Task DeleteTemplateAsync(Elastic.Clients. /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(DeleteTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1198,7 +1198,7 @@ public virtual Task DeleteTemplateAsync(DeleteTemplateRe /// /// Deletes an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1340,7 +1340,7 @@ public virtual Task ExistsAliasAsync(Elastic.Cli /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTemplateRequest request) { @@ -1350,7 +1350,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTempla /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(ExistsIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -1360,7 +1360,7 @@ public virtual Task ExistsIndexTemplateAsync(Exists /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.Elasticsearch.Name name) { @@ -1371,7 +1371,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.E /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTemplateRequestDescriptor descriptor) { @@ -1381,7 +1381,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(ExistsIndexTempla /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -1393,7 +1393,7 @@ public virtual ExistsIndexTemplateResponse ExistsIndexTemplate(Elastic.Clients.E /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -1404,7 +1404,7 @@ public virtual Task ExistsIndexTemplateAsync(Elasti /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(ExistsIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1414,7 +1414,7 @@ public virtual Task ExistsIndexTemplateAsync(Exists /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1556,7 +1556,7 @@ public virtual Task ExistsAsync(Elastic.Clients.Elast /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequest request) { @@ -1566,7 +1566,7 @@ public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequest reque /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(ExistsTemplateRequest request, CancellationToken cancellationToken = default) { @@ -1576,7 +1576,7 @@ public virtual Task ExistsTemplateAsync(ExistsTemplateRe /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsearch.Names name) { @@ -1587,7 +1587,7 @@ public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsear /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequestDescriptor descriptor) { @@ -1597,7 +1597,7 @@ public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequestDescri /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) { @@ -1609,7 +1609,7 @@ public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsear /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -1620,7 +1620,7 @@ public virtual Task ExistsTemplateAsync(Elastic.Clients. /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(ExistsTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1630,7 +1630,7 @@ public virtual Task ExistsTemplateAsync(ExistsTemplateRe /// /// Returns information about whether a particular index template exists. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1772,7 +1772,7 @@ public virtual Task ExplainDataLifecycleAsync /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(FlushRequest request) { @@ -1782,7 +1782,7 @@ public virtual FlushResponse Flush(FlushRequest request) /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(FlushRequest request, CancellationToken cancellationToken = default) { @@ -1792,7 +1792,7 @@ public virtual Task FlushAsync(FlushRequest request, Cancellation /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush() { @@ -1803,7 +1803,7 @@ public virtual FlushResponse Flush() /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(FlushRequestDescriptor descriptor) { @@ -1813,7 +1813,7 @@ public virtual FlushResponse Flush(FlushRequestDescriptor descriptor) /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(Action configureRequest) { @@ -1825,7 +1825,7 @@ public virtual FlushResponse Flush(Action configureReque /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(FlushRequestDescriptor descriptor) { @@ -1835,7 +1835,7 @@ public virtual FlushResponse Flush(FlushRequestDescriptor /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual FlushResponse Flush(Action> configureRequest) { @@ -1847,7 +1847,7 @@ public virtual FlushResponse Flush(Action /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(CancellationToken cancellationToken = default) { @@ -1858,7 +1858,7 @@ public virtual Task FlushAsync(CancellationToken cancellationToke /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(FlushRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1868,7 +1868,7 @@ public virtual Task FlushAsync(FlushRequestDescriptor descriptor, /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -1880,7 +1880,7 @@ public virtual Task FlushAsync(Action con /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(FlushRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1890,7 +1890,7 @@ public virtual Task FlushAsync(FlushRequestDescriptor< /// /// Performs the flush operation on one or more indices. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FlushAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2594,7 +2594,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasti /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest request) { @@ -2604,7 +2604,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -2614,7 +2614,7 @@ public virtual Task GetIndexTemplateAsync(GetIndexTemp /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate() { @@ -2625,7 +2625,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate() /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequestDescriptor descriptor) { @@ -2635,7 +2635,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetIndexTemplateResponse GetIndexTemplate(Action configureRequest) { @@ -2647,7 +2647,7 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(Action /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(CancellationToken cancellationToken = default) { @@ -2658,7 +2658,7 @@ public virtual Task GetIndexTemplateAsync(Cancellation /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2668,7 +2668,7 @@ public virtual Task GetIndexTemplateAsync(GetIndexTemp /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -2810,7 +2810,7 @@ public virtual Task GetMappingAsync(Action /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTemplateResponse GetTemplate(GetTemplateRequest request) { @@ -2820,7 +2820,7 @@ public virtual GetTemplateResponse GetTemplate(GetTemplateRequest request) /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(GetTemplateRequest request, CancellationToken cancellationToken = default) { @@ -2830,7 +2830,7 @@ public virtual Task GetTemplateAsync(GetTemplateRequest req /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTemplateResponse GetTemplate() { @@ -2841,7 +2841,7 @@ public virtual GetTemplateResponse GetTemplate() /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTemplateResponse GetTemplate(GetTemplateRequestDescriptor descriptor) { @@ -2851,7 +2851,7 @@ public virtual GetTemplateResponse GetTemplate(GetTemplateRequestDescriptor desc /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTemplateResponse GetTemplate(Action configureRequest) { @@ -2863,7 +2863,7 @@ public virtual GetTemplateResponse GetTemplate(Action /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(CancellationToken cancellationToken = default) { @@ -2874,7 +2874,7 @@ public virtual Task GetTemplateAsync(CancellationToken canc /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(GetTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2884,7 +2884,7 @@ public virtual Task GetTemplateAsync(GetTemplateRequestDesc /// /// Returns an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -3458,7 +3458,7 @@ public virtual Task PutDataLifecycleAsync(Elastic.Clie /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest request) { @@ -3468,7 +3468,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3478,7 +3478,7 @@ public virtual Task PutIndexTemplateAsync(PutIndexTemp /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequestDescriptor descriptor) { @@ -3488,7 +3488,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -3500,7 +3500,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elastic /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequestDescriptor descriptor) { @@ -3510,7 +3510,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemp /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) { @@ -3522,7 +3522,7 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clie /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3532,7 +3532,7 @@ public virtual Task PutIndexTemplateAsync(PutIndexTemp /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3544,7 +3544,7 @@ public virtual Task PutIndexTemplateAsync(Elastic.Clie /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3554,7 +3554,7 @@ public virtual Task PutIndexTemplateAsync(P /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3674,7 +3674,7 @@ public virtual Task PutMappingAsync(Elastic.Clien /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutTemplateResponse PutTemplate(PutTemplateRequest request) { @@ -3684,7 +3684,7 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequest request) /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3694,7 +3694,7 @@ public virtual Task PutTemplateAsync(PutTemplateRequest req /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor descriptor) { @@ -3704,7 +3704,7 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor desc /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -3716,7 +3716,7 @@ public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Nam /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3726,7 +3726,7 @@ public virtual Task PutTemplateAsync(PutTemplateRequestDesc /// /// Creates or updates an index template. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3868,7 +3868,7 @@ public virtual Task RefreshAsync(Action /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual RolloverResponse Rollover(RolloverRequest request) { @@ -3878,7 +3878,7 @@ public virtual RolloverResponse Rollover(RolloverRequest request) /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(RolloverRequest request, CancellationToken cancellationToken = default) { @@ -3888,7 +3888,7 @@ public virtual Task RolloverAsync(RolloverRequest request, Can /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlias alias) { @@ -3899,7 +3899,7 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlia /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) { @@ -3909,7 +3909,7 @@ public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlias alias, Action configureRequest) { @@ -3921,7 +3921,7 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlia /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.IndexAlias alias, CancellationToken cancellationToken = default) { @@ -3932,7 +3932,7 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(RolloverRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3942,7 +3942,7 @@ public virtual Task RolloverAsync(RolloverRequestDescriptor de /// /// Updates an alias to point to a new index when the existing index
is considered to be too large or too old.
- /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. ///
public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.IndexAlias alias, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3954,7 +3954,7 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(ShrinkIndexRequest request) { @@ -3964,7 +3964,7 @@ public virtual ShrinkIndexResponse Shrink(ShrinkIndexRequest request) /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(ShrinkIndexRequest request, CancellationToken cancellationToken = default) { @@ -3974,7 +3974,7 @@ public virtual Task ShrinkAsync(ShrinkIndexRequest request, /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) { @@ -3985,7 +3985,7 @@ public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexNam /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(ShrinkIndexRequestDescriptor descriptor) { @@ -3995,7 +3995,7 @@ public virtual ShrinkIndexResponse Shrink(ShrinkIndexRequestDescriptor descripto /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest) { @@ -4007,7 +4007,7 @@ public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexNam /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexName target) { @@ -4018,7 +4018,7 @@ public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsear /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest) { @@ -4030,7 +4030,7 @@ public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsear /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(ShrinkIndexRequestDescriptor descriptor) { @@ -4040,7 +4040,7 @@ public virtual ShrinkIndexResponse Shrink(ShrinkIndexRequestDescripto /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest) { @@ -4052,7 +4052,7 @@ public virtual ShrinkIndexResponse Shrink(Elastic.Clients.Elasticsear /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, CancellationToken cancellationToken = default) { @@ -4063,7 +4063,7 @@ public virtual Task ShrinkAsync(Elastic.Clients.Elasticsear /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(ShrinkIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4073,7 +4073,7 @@ public virtual Task ShrinkAsync(ShrinkIndexRequestDescripto /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4085,7 +4085,7 @@ public virtual Task ShrinkAsync(Elastic.Clients.Elasticsear /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(Elastic.Clients.Elasticsearch.IndexName target, CancellationToken cancellationToken = default) { @@ -4096,7 +4096,7 @@ public virtual Task ShrinkAsync(Elastic.Clients. /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -4108,7 +4108,7 @@ public virtual Task ShrinkAsync(Elastic.Clients. /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(ShrinkIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4118,7 +4118,7 @@ public virtual Task ShrinkAsync(ShrinkIndexReque /// /// Allow to shrink an existing index into a new index with fewer primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShrinkAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -4130,7 +4130,7 @@ public virtual Task ShrinkAsync(Elastic.Clients. /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequest request) { @@ -4140,7 +4140,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndex /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -4150,7 +4150,7 @@ public virtual Task SimulateIndexTemplateAsync(Si /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name) { @@ -4161,7 +4161,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequestDescriptor descriptor) { @@ -4171,7 +4171,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndex /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { @@ -4183,7 +4183,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequestDescriptor descriptor) { @@ -4193,7 +4193,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Si /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) { @@ -4205,7 +4205,7 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(El /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -4216,7 +4216,7 @@ public virtual Task SimulateIndexTemplateAsync(El /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4226,7 +4226,7 @@ public virtual Task SimulateIndexTemplateAsync(Si /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4238,7 +4238,7 @@ public virtual Task SimulateIndexTemplateAsync(El /// /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4248,7 +4248,7 @@ public virtual Task SimulateIndexTemplateAsync /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -4260,7 +4260,7 @@ public virtual Task SimulateIndexTemplateAsync /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest request) { @@ -4270,7 +4270,7 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequest request, CancellationToken cancellationToken = default) { @@ -4280,7 +4280,7 @@ public virtual Task SimulateTemplateAsync(SimulateTemp /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate() { @@ -4291,7 +4291,7 @@ public virtual SimulateTemplateResponse SimulateTemplate() /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequestDescriptor descriptor) { @@ -4301,7 +4301,7 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SimulateTemplateResponse SimulateTemplate(Action configureRequest) { @@ -4313,7 +4313,7 @@ public virtual SimulateTemplateResponse SimulateTemplate(Action /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(CancellationToken cancellationToken = default) { @@ -4324,7 +4324,7 @@ public virtual Task SimulateTemplateAsync(Cancellation /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4334,7 +4334,7 @@ public virtual Task SimulateTemplateAsync(SimulateTemp /// /// Simulate resolving the given template name or body - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4346,7 +4346,7 @@ public virtual Task SimulateTemplateAsync(Action /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(SplitIndexRequest request) { @@ -4356,7 +4356,7 @@ public virtual SplitIndexResponse Split(SplitIndexRequest request) /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(SplitIndexRequest request, CancellationToken cancellationToken = default) { @@ -4366,7 +4366,7 @@ public virtual Task SplitAsync(SplitIndexRequest request, Ca /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) { @@ -4377,7 +4377,7 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(SplitIndexRequestDescriptor descriptor) { @@ -4387,7 +4387,7 @@ public virtual SplitIndexResponse Split(SplitIndexRequestDescriptor descriptor) /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest) { @@ -4399,7 +4399,7 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName target) { @@ -4410,7 +4410,7 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest) { @@ -4422,7 +4422,7 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(SplitIndexRequestDescriptor descriptor) { @@ -4432,7 +4432,7 @@ public virtual SplitIndexResponse Split(SplitIndexRequestDescriptor /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest) { @@ -4444,7 +4444,7 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, CancellationToken cancellationToken = default) { @@ -4455,7 +4455,7 @@ public virtual Task SplitAsync(Elastic.Clients.Elasticsearch /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(SplitIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4465,7 +4465,7 @@ public virtual Task SplitAsync(SplitIndexRequestDescriptor d /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4477,7 +4477,7 @@ public virtual Task SplitAsync(Elastic.Clients.Elasticsearch /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(Elastic.Clients.Elasticsearch.IndexName target, CancellationToken cancellationToken = default) { @@ -4488,7 +4488,7 @@ public virtual Task SplitAsync(Elastic.Clients.El /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -4500,7 +4500,7 @@ public virtual Task SplitAsync(Elastic.Clients.El /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(SplitIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4510,7 +4510,7 @@ public virtual Task SplitAsync(SplitIndexRequestD /// /// Allows you to split an existing index into a new index with more primary shards. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SplitAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action> configureRequest, CancellationToken cancellationToken = default) { 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 d0db8248a8c..9a244cf31b9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ingest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ingest.g.cs @@ -168,7 +168,7 @@ public virtual Task DeletePipelineAsync(Elast /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequest request) { @@ -178,7 +178,7 @@ public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequest request) /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(GeoIpStatsRequest request, CancellationToken cancellationToken = default) { @@ -188,7 +188,7 @@ public virtual Task GeoIpStatsAsync(GeoIpStatsRequest reques /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats() { @@ -199,7 +199,7 @@ public virtual GeoIpStatsResponse GeoIpStats() /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequestDescriptor descriptor) { @@ -209,7 +209,7 @@ public virtual GeoIpStatsResponse GeoIpStats(GeoIpStatsRequestDescriptor descrip /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GeoIpStatsResponse GeoIpStats(Action configureRequest) { @@ -221,7 +221,7 @@ public virtual GeoIpStatsResponse GeoIpStats(Action /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(CancellationToken cancellationToken = default) { @@ -232,7 +232,7 @@ public virtual Task GeoIpStatsAsync(CancellationToken cancel /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(GeoIpStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -242,7 +242,7 @@ public virtual Task GeoIpStatsAsync(GeoIpStatsRequestDescrip /// /// Returns statistical information about geoip databases - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GeoIpStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -384,7 +384,7 @@ public virtual Task GetPipelineAsync(Action /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequest request) { @@ -394,7 +394,7 @@ public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequest request) /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(ProcessorGrokRequest request, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task ProcessorGrokAsync(ProcessorGrokReque /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok() { @@ -415,7 +415,7 @@ public virtual ProcessorGrokResponse ProcessorGrok() /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequestDescriptor descriptor) { @@ -425,7 +425,7 @@ public virtual ProcessorGrokResponse ProcessorGrok(ProcessorGrokRequestDescripto /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ProcessorGrokResponse ProcessorGrok(Action configureRequest) { @@ -437,7 +437,7 @@ public virtual ProcessorGrokResponse ProcessorGrok(Action /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(CancellationToken cancellationToken = default) { @@ -448,7 +448,7 @@ public virtual Task ProcessorGrokAsync(CancellationToken /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(ProcessorGrokRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -458,7 +458,7 @@ public virtual Task ProcessorGrokAsync(ProcessorGrokReque /// /// Returns a list of the built-in patterns. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ProcessorGrokAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -470,7 +470,7 @@ public virtual Task ProcessorGrokAsync(Action /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(PutPipelineRequest request) { @@ -480,7 +480,7 @@ public virtual PutPipelineResponse PutPipeline(PutPipelineRequest request) /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(PutPipelineRequest request, CancellationToken cancellationToken = default) { @@ -490,7 +490,7 @@ public virtual Task PutPipelineAsync(PutPipelineRequest req /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDescriptor descriptor) { @@ -500,7 +500,7 @@ public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDescriptor desc /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { @@ -512,7 +512,7 @@ public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasticsearch.Id /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDescriptor descriptor) { @@ -522,7 +522,7 @@ public virtual PutPipelineResponse PutPipeline(PutPipelineRequestDesc /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { @@ -534,7 +534,7 @@ public virtual PutPipelineResponse PutPipeline(Elastic.Clients.Elasti /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(PutPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -544,7 +544,7 @@ public virtual Task PutPipelineAsync(PutPipelineRequestDesc /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -556,7 +556,7 @@ public virtual Task PutPipelineAsync(Elastic.Clients.Elasti /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(PutPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -566,7 +566,7 @@ public virtual Task PutPipelineAsync(PutPipeline /// /// Creates or updates a pipeline. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs index b9a9c1e6047..39ebe4a94c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs @@ -39,7 +39,7 @@ internal TasksNamespacedClient(ElasticsearchClient client) : base(client) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel(CancelRequest request) { @@ -50,7 +50,7 @@ public virtual CancelResponse Cancel(CancelRequest request) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(CancelRequest request, CancellationToken cancellationToken = default) { @@ -61,7 +61,7 @@ public virtual Task CancelAsync(CancelRequest request, Cancellat /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel() { @@ -73,7 +73,7 @@ public virtual CancelResponse Cancel() /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel(CancelRequestDescriptor descriptor) { @@ -84,7 +84,7 @@ public virtual CancelResponse Cancel(CancelRequestDescriptor descriptor) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual CancelResponse Cancel(Action configureRequest) { @@ -97,7 +97,7 @@ public virtual CancelResponse Cancel(Action configureRe /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(CancellationToken cancellationToken = default) { @@ -109,7 +109,7 @@ public virtual Task CancelAsync(CancellationToken cancellationTo /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(CancelRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -120,7 +120,7 @@ public virtual Task CancelAsync(CancelRequestDescriptor descript /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Cancels a task, if it can be cancelled through an API. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CancelAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -133,7 +133,7 @@ public virtual Task CancelAsync(Action /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(GetTasksRequest request) { @@ -144,7 +144,7 @@ public virtual GetTasksResponse Get(GetTasksRequest request) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetTasksRequest request, CancellationToken cancellationToken = default) { @@ -155,7 +155,7 @@ public virtual Task GetAsync(GetTasksRequest request, Cancella /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Id task_id) { @@ -167,7 +167,7 @@ public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Id task_id) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(GetTasksRequestDescriptor descriptor) { @@ -178,7 +178,7 @@ public virtual GetTasksResponse Get(GetTasksRequestDescriptor descriptor) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Id task_id, Action configureRequest) { @@ -191,7 +191,7 @@ public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Id task_id, Ac /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id task_id, CancellationToken cancellationToken = default) { @@ -203,7 +203,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetTasksRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -214,7 +214,7 @@ public virtual Task GetAsync(GetTasksRequestDescriptor descrip /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns information about a task. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id task_id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -227,7 +227,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List(ListRequest request) { @@ -238,7 +238,7 @@ public virtual ListResponse List(ListRequest request) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(ListRequest request, CancellationToken cancellationToken = default) { @@ -249,7 +249,7 @@ public virtual Task ListAsync(ListRequest request, CancellationTok /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List() { @@ -261,7 +261,7 @@ public virtual ListResponse List() /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List(ListRequestDescriptor descriptor) { @@ -272,7 +272,7 @@ public virtual ListResponse List(ListRequestDescriptor descriptor) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ListResponse List(Action configureRequest) { @@ -285,7 +285,7 @@ public virtual ListResponse List(Action configureRequest) /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(CancellationToken cancellationToken = default) { @@ -297,7 +297,7 @@ public virtual Task ListAsync(CancellationToken cancellationToken /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(ListRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -308,7 +308,7 @@ public virtual Task ListAsync(ListRequestDescriptor descriptor, Ca /// /// EXPERIMENTAL! May change in ways that are not backwards compatible or be removed entirely. /// Returns a list of tasks. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index 3fde561233b..193209923fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -22,6 +22,7 @@ using Elastic.Clients.Elasticsearch.DanglingIndices; using Elastic.Clients.Elasticsearch.Enrich; using Elastic.Clients.Elasticsearch.Eql; +using Elastic.Clients.Elasticsearch.Esql; using Elastic.Clients.Elasticsearch.Graph; using Elastic.Clients.Elasticsearch.IndexManagement; using Elastic.Clients.Elasticsearch.Ingest; @@ -40,6 +41,7 @@ public partial class ElasticsearchClient public virtual DanglingIndicesNamespacedClient DanglingIndices { get; private set; } public virtual EnrichNamespacedClient Enrich { get; private set; } public virtual EqlNamespacedClient Eql { get; private set; } + public virtual EsqlNamespacedClient Esql { get; private set; } public virtual GraphNamespacedClient Graph { get; private set; } public virtual IndicesNamespacedClient Indices { get; private set; } public virtual IngestNamespacedClient Ingest { get; private set; } @@ -48,12 +50,12 @@ public partial class ElasticsearchClient private partial void SetupNamespaces() { - AsyncSearch = new AsyncSearchNamespacedClient(this); Cluster = new ClusterNamespacedClient(this); DanglingIndices = new DanglingIndicesNamespacedClient(this); Enrich = new EnrichNamespacedClient(this); Eql = new EqlNamespacedClient(this); Graph = new GraphNamespacedClient(this); Indices = new IndicesNamespacedClient(this); Ingest = new IngestNamespacedClient(this); Sql = new SqlNamespacedClient(this); Tasks = new TasksNamespacedClient(this); + AsyncSearch = new AsyncSearchNamespacedClient(this); Cluster = new ClusterNamespacedClient(this); DanglingIndices = new DanglingIndicesNamespacedClient(this); Enrich = new EnrichNamespacedClient(this); Eql = new EqlNamespacedClient(this); Esql = new EsqlNamespacedClient(this); Graph = new GraphNamespacedClient(this); Indices = new IndicesNamespacedClient(this); Ingest = new IngestNamespacedClient(this); Sql = new SqlNamespacedClient(this); Tasks = new TasksNamespacedClient(this); } /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(BulkRequest request) { @@ -63,7 +65,7 @@ public virtual BulkResponse Bulk(BulkRequest request) /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequest request, CancellationToken cancellationToken = default) { @@ -73,7 +75,7 @@ public virtual Task BulkAsync(BulkRequest request, CancellationTok /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) { @@ -83,7 +85,7 @@ public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(Action configureRequest) { @@ -95,7 +97,7 @@ public virtual BulkResponse Bulk(Action configureRequest) /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) { @@ -105,7 +107,7 @@ public virtual BulkResponse Bulk(BulkRequestDescriptor des /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual BulkResponse Bulk(Action> configureRequest) { @@ -117,7 +119,7 @@ public virtual BulkResponse Bulk(Action /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -127,7 +129,7 @@ public virtual Task BulkAsync(BulkRequestDescriptor descriptor, Ca /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -139,7 +141,7 @@ public virtual Task BulkAsync(Action config /// /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -149,7 +151,7 @@ public virtual Task BulkAsync(BulkRequestDescriptor /// Allows to perform multiple index/update/delete operations in a single request. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -161,7 +163,7 @@ public virtual Task BulkAsync(Action /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request) { @@ -171,7 +173,7 @@ public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request) /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(ClearScrollRequest request, CancellationToken cancellationToken = default) { @@ -181,7 +183,7 @@ public virtual Task ClearScrollAsync(ClearScrollRequest req /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll() { @@ -192,7 +194,7 @@ public virtual ClearScrollResponse ClearScroll() /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll(ClearScrollRequestDescriptor descriptor) { @@ -202,7 +204,7 @@ public virtual ClearScrollResponse ClearScroll(ClearScrollRequestDescriptor desc /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClearScrollResponse ClearScroll(Action configureRequest) { @@ -214,7 +216,7 @@ public virtual ClearScrollResponse ClearScroll(Action /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(CancellationToken cancellationToken = default) { @@ -225,7 +227,7 @@ public virtual Task ClearScrollAsync(CancellationToken canc /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(ClearScrollRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -235,7 +237,7 @@ public virtual Task ClearScrollAsync(ClearScrollRequestDesc /// /// Explicitly clears the search context for a scroll. - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearScrollAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -247,7 +249,7 @@ public virtual Task ClearScrollAsync(Action /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest request) { @@ -257,7 +259,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequest request, CancellationToken cancellationToken = default) { @@ -267,7 +269,7 @@ public virtual Task ClosePointInTimeAsync(ClosePointIn /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime() { @@ -278,7 +280,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime() /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequestDescriptor descriptor) { @@ -288,7 +290,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual ClosePointInTimeResponse ClosePointInTime(Action configureRequest) { @@ -300,7 +302,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(Action /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(CancellationToken cancellationToken = default) { @@ -311,7 +313,7 @@ public virtual Task ClosePointInTimeAsync(Cancellation /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -321,7 +323,7 @@ public virtual Task ClosePointInTimeAsync(ClosePointIn /// /// Close a point in time - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClosePointInTimeAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -2801,7 +2803,7 @@ public virtual Task MultiTermVectorsAsync(A /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest request) { @@ -2811,7 +2813,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest re /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequest request, CancellationToken cancellationToken = default) { @@ -2821,7 +2823,7 @@ public virtual Task OpenPointInTimeAsync(OpenPointInTim /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices) { @@ -2832,7 +2834,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticse /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) { @@ -2842,7 +2844,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDes /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) { @@ -2854,7 +2856,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticse /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) { @@ -2864,7 +2866,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTim /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) { @@ -2876,7 +2878,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Client /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -2887,7 +2889,7 @@ public virtual Task OpenPointInTimeAsync(Elastic.Client /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2897,7 +2899,7 @@ public virtual Task OpenPointInTimeAsync(OpenPointInTim /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2909,7 +2911,7 @@ public virtual Task OpenPointInTimeAsync(Elastic.Client /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2919,7 +2921,7 @@ public virtual Task OpenPointInTimeAsync(Ope /// /// Open a point in time that can be used in subsequent searches - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { 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 80370a8dd10..02673b72621 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs @@ -147,11 +147,6 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("geo_distance", ref reader, options); } - if (propertyName == "geo_line") - { - return AggregationSerializationHelper.ReadContainer("geo_line", ref reader, options); - } - if (propertyName == "geohash_grid") { return AggregationSerializationHelper.ReadContainer("geohash_grid", ref reader, options); @@ -162,6 +157,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("geohex_grid", ref reader, options); } + if (propertyName == "geo_line") + { + return AggregationSerializationHelper.ReadContainer("geo_line", ref reader, options); + } + if (propertyName == "geotile_grid") { return AggregationSerializationHelper.ReadContainer("geotile_grid", ref reader, options); @@ -302,11 +302,6 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("sum", ref reader, options); } - if (propertyName == "t_test") - { - return AggregationSerializationHelper.ReadContainer("t_test", ref reader, options); - } - if (propertyName == "terms") { return AggregationSerializationHelper.ReadContainer("terms", ref reader, options); @@ -322,6 +317,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert, return AggregationSerializationHelper.ReadContainer("top_metrics", ref reader, options); } + if (propertyName == "t_test") + { + return AggregationSerializationHelper.ReadContainer("t_test", ref reader, options); + } + if (propertyName == "value_count") { return AggregationSerializationHelper.ReadContainer("value_count", ref reader, options); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs index d69fc78cda7..c8921311120 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs @@ -192,14 +192,47 @@ public BucketSortAggregationDescriptor() : base() { } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + + /// + /// Buckets in positions prior to `from` will be truncated. + /// + public BucketSortAggregationDescriptor From(int? from) + { + FromValue = from; + return Self; + } + + /// + /// The policy to apply when gaps are found in the data. + /// + public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + + public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
+ ///
+ public BucketSortAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } /// /// The list of fields to sort on. @@ -240,44 +273,29 @@ public BucketSortAggregationDescriptor Sort(params Action - /// Buckets in positions prior to `from` will be truncated. - /// - public BucketSortAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// The policy to apply when gaps are found in the data. - /// - public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
- ///
- public BucketSortAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("bucket_sort"); writer.WriteStartObject(); + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + + if (GapPolicyValue is not null) + { + writer.WritePropertyName("gap_policy"); + JsonSerializer.Serialize(writer, GapPolicyValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -307,24 +325,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { @@ -344,14 +344,47 @@ public BucketSortAggregationDescriptor() : base() { } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + + /// + /// Buckets in positions prior to `from` will be truncated. + /// + public BucketSortAggregationDescriptor From(int? from) + { + FromValue = from; + return Self; + } + + /// + /// The policy to apply when gaps are found in the data. + /// + public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + + public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
+ ///
+ public BucketSortAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } /// /// The list of fields to sort on. @@ -392,44 +425,29 @@ public BucketSortAggregationDescriptor Sort(params Action return Self; } - /// - /// Buckets in positions prior to `from` will be truncated. - /// - public BucketSortAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// The policy to apply when gaps are found in the data. - /// - public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
- ///
- public BucketSortAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("bucket_sort"); writer.WriteStartObject(); + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + + if (GapPolicyValue is not null) + { + writer.WritePropertyName("gap_policy"); + JsonSerializer.Serialize(writer, GapPolicyValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -459,24 +477,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs index 02ef55a791b..e543cfd3daf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -187,14 +187,23 @@ public CompositeAggregationDescriptor() : base() { } + private IDictionary? AfterValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action> AggregationsDescriptorAction { get; set; } - private IDictionary? AfterValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } + /// + /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. + /// + public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) + { + AfterValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + public CompositeAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { AggregationsDescriptor = null; @@ -219,15 +228,6 @@ public CompositeAggregationDescriptor Aggregations(Action - /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. - ///
- public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - AfterValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public CompositeAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -310,14 +310,23 @@ public CompositeAggregationDescriptor() : base() { } + private IDictionary? AfterValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action AggregationsDescriptorAction { get; set; } - private IDictionary? AfterValue { get; set; } private IDictionary? MetaValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } + /// + /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. + /// + public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) + { + AfterValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + public CompositeAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { AggregationsDescriptor = null; @@ -342,15 +351,6 @@ public CompositeAggregationDescriptor Aggregations(Action - /// When paginating, use the `after_key` value returned in the previous response to retrieve the next page. - /// - public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - AfterValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public CompositeAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs index 2a23bc3ef3c..ee1a4f5645b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs @@ -199,17 +199,32 @@ public GeoLineAggregationDescriptor() : base() { } + private bool? IncludeSortValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GeoLinePoint PointValue { get; set; } private GeoLinePointDescriptor PointDescriptor { get; set; } private Action> PointDescriptorAction { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort SortValue { get; set; } private GeoLineSortDescriptor SortDescriptor { get; set; } private Action> SortDescriptorAction { get; set; } - private bool? IncludeSortValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? SortOrderValue { get; set; } + /// + /// When `true`, returns an additional array of the sort values in the feature properties. + /// + public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) + { + IncludeSortValue = includeSort; + return Self; + } + + public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// The name of the geo_point field. /// @@ -237,6 +252,15 @@ public GeoLineAggregationDescriptor Point(Action + /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
+ /// + public GeoLineAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The name of the numeric field to use as the sort key for ordering the points.
When the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error.
///
@@ -264,30 +288,6 @@ public GeoLineAggregationDescriptor Sort(Action - /// When `true`, returns an additional array of the sort values in the feature properties. - /// - public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) - { - IncludeSortValue = includeSort; - return Self; - } - - public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
- ///
- public GeoLineAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// The order in which the line is sorted (ascending or descending). /// @@ -302,6 +302,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("geo_line"); writer.WriteStartObject(); + if (IncludeSortValue.HasValue) + { + writer.WritePropertyName("include_sort"); + writer.WriteBooleanValue(IncludeSortValue.Value); + } + if (PointDescriptor is not null) { writer.WritePropertyName("point"); @@ -318,6 +324,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PointValue, options); } + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -334,18 +346,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SortValue, options); } - if (IncludeSortValue.HasValue) - { - writer.WritePropertyName("include_sort"); - writer.WriteBooleanValue(IncludeSortValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (SortOrderValue is not null) { writer.WritePropertyName("sort_order"); @@ -371,17 +371,32 @@ public GeoLineAggregationDescriptor() : base() { } + private bool? IncludeSortValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GeoLinePoint PointValue { get; set; } private GeoLinePointDescriptor PointDescriptor { get; set; } private Action PointDescriptorAction { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GeoLineSort SortValue { get; set; } private GeoLineSortDescriptor SortDescriptor { get; set; } private Action SortDescriptorAction { get; set; } - private bool? IncludeSortValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? SortOrderValue { get; set; } + /// + /// When `true`, returns an additional array of the sort values in the feature properties. + /// + public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) + { + IncludeSortValue = includeSort; + return Self; + } + + public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// The name of the geo_point field. /// @@ -409,6 +424,15 @@ public GeoLineAggregationDescriptor Point(Action configu return Self; } + /// + /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
+ ///
+ public GeoLineAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The name of the numeric field to use as the sort key for ordering the points.
When the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error.
///
@@ -436,30 +460,6 @@ public GeoLineAggregationDescriptor Sort(Action configure return Self; } - /// - /// When `true`, returns an additional array of the sort values in the feature properties. - /// - public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) - { - IncludeSortValue = includeSort; - return Self; - } - - public GeoLineAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The maximum length of the line represented in the aggregation.
Valid sizes are between 1 and 10000.
- ///
- public GeoLineAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - /// /// The order in which the line is sorted (ascending or descending). /// @@ -474,6 +474,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("geo_line"); writer.WriteStartObject(); + if (IncludeSortValue.HasValue) + { + writer.WritePropertyName("include_sort"); + writer.WriteBooleanValue(IncludeSortValue.Value); + } + if (PointDescriptor is not null) { writer.WritePropertyName("point"); @@ -490,6 +496,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PointValue, options); } + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -506,18 +518,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SortValue, options); } - if (IncludeSortValue.HasValue) - { - writer.WritePropertyName("include_sort"); - writer.WriteBooleanValue(IncludeSortValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (SortOrderValue is not null) { writer.WritePropertyName("sort_order"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs index d2be96d1c4f..67f8a884ad2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -196,15 +196,33 @@ public InferenceAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } - private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action> InferenceConfigDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } + private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } + private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } + private Action> InferenceConfigDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Name ModelIdValue { get; set; } + public InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) + { + BucketsPathValue = bucketsPath; + return Self; + } + + public InferenceAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -232,24 +250,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - public InferenceAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - public InferenceAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -270,22 +270,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("inference"); writer.WriteStartObject(); - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - if (BucketsPathValue is not null) { writer.WritePropertyName("buckets_path"); @@ -304,6 +288,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } + if (InferenceConfigDescriptor is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); + } + else if (InferenceConfigDescriptorAction is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); + } + else if (InferenceConfigValue is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigValue, options); + } + writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); writer.WriteEndObject(); @@ -325,15 +325,33 @@ public InferenceAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } - private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } + private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } + private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } + private Action InferenceConfigDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Name ModelIdValue { get; set; } + public InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) + { + BucketsPathValue = bucketsPath; + return Self; + } + + public InferenceAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? gapPolicy) + { + GapPolicyValue = gapPolicy; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -361,24 +379,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -399,22 +399,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("inference"); writer.WriteStartObject(); - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - if (BucketsPathValue is not null) { writer.WritePropertyName("buckets_path"); @@ -433,6 +417,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } + if (InferenceConfigDescriptor is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); + } + else if (InferenceConfigDescriptorAction is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, new InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); + } + else if (InferenceConfigValue is not null) + { + writer.WritePropertyName("inference_config"); + JsonSerializer.Serialize(writer, InferenceConfigValue, options); + } + writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs index 35e287acf98..115acb20193 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -298,10 +298,6 @@ public MultiTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action> AggregationsDescriptorAction { get; set; } - private ICollection TermsValue { get; set; } - private MultiTermLookupDescriptor TermsDescriptor { get; set; } - private Action> TermsDescriptorAction { get; set; } - private Action>[] TermsDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } @@ -310,6 +306,10 @@ public MultiTermsAggregationDescriptor() : base() private int? ShardSizeValue { get; set; } private bool? ShowTermDocCountErrorValue { get; set; } private int? SizeValue { get; set; } + private ICollection TermsValue { get; set; } + private MultiTermLookupDescriptor TermsDescriptor { get; set; } + private Action> TermsDescriptorAction { get; set; } + private Action>[] TermsDescriptorActions { get; set; } public MultiTermsAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { @@ -335,45 +335,6 @@ public MultiTermsAggregationDescriptor Aggregations(Action - /// The field from which to generate sets of terms. - /// - public MultiTermsAggregationDescriptor Terms(ICollection terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsValue = terms; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsDescriptor = descriptor; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Action> configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorActions = null; - TermsDescriptorAction = configure; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(params Action>[] configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = configure; - return Self; - } - /// /// Specifies the strategy for data collection. /// @@ -443,42 +404,50 @@ public MultiTermsAggregationDescriptor Size(int? size) return Self; } + /// + /// The field from which to generate sets of terms. + /// + public MultiTermsAggregationDescriptor Terms(ICollection terms) + { + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsValue = terms; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) + { + TermsValue = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsDescriptor = descriptor; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(Action> configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorActions = null; + TermsDescriptorAction = configure; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(params Action>[] configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("multi_terms"); writer.WriteStartObject(); - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - writer.WriteEndArray(); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TermsDescriptorActions is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - foreach (var action in TermsDescriptorActions) - { - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - if (CollectModeValue is not null) { writer.WritePropertyName("collect_mode"); @@ -521,6 +490,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (TermsDescriptor is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, TermsDescriptor, options); + writer.WriteEndArray(); + } + else if (TermsDescriptorAction is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); + writer.WriteEndArray(); + } + else if (TermsDescriptorActions is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + foreach (var action in TermsDescriptorActions) + { + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else + { + writer.WritePropertyName("terms"); + JsonSerializer.Serialize(writer, TermsValue, options); + } + writer.WriteEndObject(); if (MetaValue is not null) { @@ -559,10 +559,6 @@ public MultiTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? AggregationsValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; } private Action AggregationsDescriptorAction { get; set; } - private ICollection TermsValue { get; set; } - private MultiTermLookupDescriptor TermsDescriptor { get; set; } - private Action TermsDescriptorAction { get; set; } - private Action[] TermsDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } @@ -571,6 +567,10 @@ public MultiTermsAggregationDescriptor() : base() private int? ShardSizeValue { get; set; } private bool? ShowTermDocCountErrorValue { get; set; } private int? SizeValue { get; set; } + private ICollection TermsValue { get; set; } + private MultiTermLookupDescriptor TermsDescriptor { get; set; } + private Action TermsDescriptorAction { get; set; } + private Action[] TermsDescriptorActions { get; set; } public MultiTermsAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations) { @@ -596,45 +596,6 @@ public MultiTermsAggregationDescriptor Aggregations(Action - /// The field from which to generate sets of terms. - /// - public MultiTermsAggregationDescriptor Terms(ICollection terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsValue = terms; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsDescriptor = descriptor; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Action configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorActions = null; - TermsDescriptorAction = configure; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(params Action[] configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = configure; - return Self; - } - /// /// Specifies the strategy for data collection. /// @@ -704,42 +665,50 @@ public MultiTermsAggregationDescriptor Size(int? size) return Self; } + /// + /// The field from which to generate sets of terms. + /// + public MultiTermsAggregationDescriptor Terms(ICollection terms) + { + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsValue = terms; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(MultiTermLookupDescriptor descriptor) + { + TermsValue = null; + TermsDescriptorAction = null; + TermsDescriptorActions = null; + TermsDescriptor = descriptor; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(Action configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorActions = null; + TermsDescriptorAction = configure; + return Self; + } + + public MultiTermsAggregationDescriptor Terms(params Action[] configure) + { + TermsValue = null; + TermsDescriptor = null; + TermsDescriptorAction = null; + TermsDescriptorActions = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("multi_terms"); writer.WriteStartObject(); - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - writer.WriteEndArray(); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TermsDescriptorActions is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - foreach (var action in TermsDescriptorActions) - { - JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - if (CollectModeValue is not null) { writer.WritePropertyName("collect_mode"); @@ -782,6 +751,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (TermsDescriptor is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, TermsDescriptor, options); + writer.WriteEndArray(); + } + else if (TermsDescriptorAction is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(TermsDescriptorAction), options); + writer.WriteEndArray(); + } + else if (TermsDescriptorActions is not null) + { + writer.WritePropertyName("terms"); + writer.WriteStartArray(); + foreach (var action in TermsDescriptorActions) + { + JsonSerializer.Serialize(writer, new MultiTermLookupDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else + { + writer.WritePropertyName("terms"); + JsonSerializer.Serialize(writer, TermsValue, options); + } + writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TestPopulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TestPopulation.g.cs index bb42b05d85a..aebde88c944 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TestPopulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TestPopulation.g.cs @@ -52,12 +52,30 @@ public TestPopulationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } + /// + /// The field to aggregate. + /// + public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to aggregate. + /// + public TestPopulationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// A filter used to define a set of records to run unpaired t-test on. /// @@ -85,24 +103,6 @@ public TestPopulationDescriptor Filter(Action - /// The field to aggregate. - /// - public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to aggregate. - /// - public TestPopulationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) { ScriptValue = script; @@ -112,6 +112,8 @@ public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -128,8 +130,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (ScriptValue is not null) { writer.WritePropertyName("script"); @@ -148,43 +148,25 @@ public TestPopulationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } /// - /// A filter used to define a set of records to run unpaired t-test on. + /// The field to aggregate. /// - public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TestPopulationDescriptor Filter(QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TestPopulationDescriptor Filter(Action configure) + public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Field field) { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; + FieldValue = field; return Self; } /// /// The field to aggregate. /// - public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + public TestPopulationDescriptor Field(Expression> field) { FieldValue = field; return Self; @@ -193,18 +175,36 @@ public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Field field) /// /// The field to aggregate. /// - public TestPopulationDescriptor Field(Expression> field) + public TestPopulationDescriptor Field(Expression> field) { FieldValue = field; return Self; } /// - /// The field to aggregate. + /// A filter used to define a set of records to run unpaired t-test on. /// - public TestPopulationDescriptor Field(Expression> field) + public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) { - FieldValue = field; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public TestPopulationDescriptor Filter(QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public TestPopulationDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; return Self; } @@ -217,6 +217,8 @@ public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Script? scr protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -233,8 +235,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs index 6dbb98110a6..66a325a3389 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs @@ -434,139 +434,91 @@ public TopHitsAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? DocvalueFieldsValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } + private Action> HighlightDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. + /// Fields for which to return doc values. /// - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Action> configure) + public TopHitsAggregationDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Fields? docvalueFields) { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; + DocvalueFieldsValue = docvalueFields; return Self; } /// - /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
+ /// If `true`, returns detailed information about score computation as part of a hit. ///
- public TopHitsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Action> configure) + public TopHitsAggregationDescriptor Explain(bool? explain = true) { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; + ExplainValue = explain; return Self; } - public TopHitsAggregationDescriptor Sort(params Action>[] configure) + public TopHitsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field) { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; + FieldValue = field; return Self; } - /// - /// Selects the fields of the source that are returned. - /// - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + public TopHitsAggregationDescriptor Field(Expression> field) { - SourceValue = source; + FieldValue = field; return Self; } /// - /// Fields for which to return doc values. + /// Starting document offset. /// - public TopHitsAggregationDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Fields? docvalueFields) + public TopHitsAggregationDescriptor From(int? from) { - DocvalueFieldsValue = docvalueFields; + FromValue = from; return Self; } /// - /// If `true`, returns detailed information about score computation as part of a hit. + /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. /// - public TopHitsAggregationDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public TopHitsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field) + public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { - FieldValue = field; + HighlightDescriptor = null; + HighlightDescriptorAction = null; + HighlightValue = highlight; return Self; } - public TopHitsAggregationDescriptor Field(Expression> field) + public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { - FieldValue = field; + HighlightValue = null; + HighlightDescriptorAction = null; + HighlightDescriptor = descriptor; return Self; } - /// - /// Starting document offset. - /// - public TopHitsAggregationDescriptor From(int? from) + public TopHitsAggregationDescriptor Highlight(Action> configure) { - FromValue = from; + HighlightValue = null; + HighlightDescriptor = null; + HighlightDescriptorAction = configure; return Self; } @@ -615,6 +567,54 @@ public TopHitsAggregationDescriptor Size(int? size) return Self; } + /// + /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
+ ///
+ public TopHitsAggregationDescriptor Sort(ICollection? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; + return Self; + } + + public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; + return Self; + } + + public TopHitsAggregationDescriptor Sort(Action> configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; + return Self; + } + + public TopHitsAggregationDescriptor Sort(params Action>[] configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; + return Self; + } + + /// + /// Selects the fields of the source that are returned. + /// + public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// Returns values for the specified stored fields (fields that use the `store` mapping option). /// @@ -647,6 +647,30 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("top_hits"); writer.WriteStartObject(); + if (DocvalueFieldsValue is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); + } + + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (FieldValue is not null) + { + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + } + + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -663,6 +687,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (MissingValue is not null) + { + writer.WritePropertyName("missing"); + JsonSerializer.Serialize(writer, MissingValue, options); + } + + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -698,88 +752,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (DocvalueFieldsValue is not null) + if (StoredFieldsValue is not null) { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, StoredFieldsValue, options); } - if (ExplainValue.HasValue) + if (TrackScoresValue.HasValue) { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); + writer.WritePropertyName("track_scores"); + writer.WriteBooleanValue(TrackScoresValue.Value); } - if (FieldValue is not null) + if (VersionValue.HasValue) { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); + writer.WritePropertyName("version"); + writer.WriteBooleanValue(VersionValue.Value); } - if (FromValue.HasValue) + writer.WriteEndObject(); + if (MetaValue is not null) { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); } - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WriteEndObject(); - } -} + writer.WriteEndObject(); + } +} public sealed partial class TopHitsAggregationDescriptor : SerializableDescriptor { @@ -789,103 +789,28 @@ public TopHitsAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? DocvalueFieldsValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } + private Action HighlightDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. - /// - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
- ///
- public TopHitsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// Selects the fields of the source that are returned. - /// - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - /// /// Fields for which to return doc values. /// @@ -931,6 +856,33 @@ public TopHitsAggregationDescriptor From(int? from) return Self; } + /// + /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. + /// + public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) + { + HighlightDescriptor = null; + HighlightDescriptorAction = null; + HighlightValue = highlight; + return Self; + } + + public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) + { + HighlightValue = null; + HighlightDescriptorAction = null; + HighlightDescriptor = descriptor; + return Self; + } + + public TopHitsAggregationDescriptor Highlight(Action configure) + { + HighlightValue = null; + HighlightDescriptor = null; + HighlightDescriptorAction = configure; + return Self; + } + public TopHitsAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -976,6 +928,54 @@ public TopHitsAggregationDescriptor Size(int? size) return Self; } + /// + /// Sort order of the top matching hits.
By default, the hits are sorted by the score of the main query.
+ ///
+ public TopHitsAggregationDescriptor Sort(ICollection? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; + return Self; + } + + public TopHitsAggregationDescriptor Sort(SortOptionsDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; + return Self; + } + + public TopHitsAggregationDescriptor Sort(Action configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; + return Self; + } + + public TopHitsAggregationDescriptor Sort(params Action[] configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; + return Self; + } + + /// + /// Selects the fields of the source that are returned. + /// + public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// Returns values for the specified stored fields (fields that use the `store` mapping option). /// @@ -1008,57 +1008,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("top_hits"); writer.WriteStartObject(); - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length > 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length > 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (DocvalueFieldsValue is not null) { writer.WritePropertyName("docvalue_fields"); @@ -1083,6 +1032,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(FromValue.Value); } + if (HighlightDescriptor is not null) + { + writer.WritePropertyName("highlight"); + JsonSerializer.Serialize(writer, HighlightDescriptor, options); + } + else if (HighlightDescriptorAction is not null) + { + writer.WritePropertyName("highlight"); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); + } + else if (HighlightValue is not null) + { + writer.WritePropertyName("highlight"); + JsonSerializer.Serialize(writer, HighlightValue, options); + } + if (MissingValue is not null) { writer.WritePropertyName("missing"); @@ -1113,6 +1078,41 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(SizeValue.Value); } + if (SortDescriptor is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortDescriptor, options); + } + else if (SortDescriptorAction is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, new SortOptionsDescriptor(SortDescriptorAction), options); + } + else if (SortDescriptorActions is not null) + { + writer.WritePropertyName("sort"); + if (SortDescriptorActions.Length > 1) + writer.WriteStartArray(); + foreach (var action in SortDescriptorActions) + { + JsonSerializer.Serialize(writer, new SortOptionsDescriptor(action), options); + } + + if (SortDescriptorActions.Length > 1) + writer.WriteEndArray(); + } + else if (SortValue is not null) + { + writer.WritePropertyName("sort"); + SingleOrManySerializationHelper.Serialize(SortValue, writer, options); + } + + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (StoredFieldsValue is not null) { writer.WritePropertyName("stored_fields"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs index ff4750f8aa1..f9211e8107f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs @@ -228,19 +228,37 @@ public TopMetricsAggregationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? MetricsValue { get; set; } private TopMetricsValueDescriptor MetricsDescriptor { get; set; } private Action> MetricsDescriptorAction { get; set; } private Action>[] MetricsDescriptorActions { get; set; } + private FieldValue? MissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } + private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private SortOptionsDescriptor SortDescriptor { get; set; } private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } - private int? SizeValue { get; set; } + + public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// The fields of the top document to return. @@ -281,6 +299,27 @@ public TopMetricsAggregationDescriptor Metrics(params Action Missing(FieldValue? missing) + { + MissingValue = missing; + return Self; + } + + public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) + { + ScriptValue = script; + return Self; + } + + /// + /// The number of top documents from which to return metrics. + /// + public TopMetricsAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The sort order of the documents. /// @@ -320,50 +359,17 @@ public TopMetricsAggregationDescriptor Sort(params Action Field(Elastic.Clients.Elasticsearch.Field? field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TopMetricsAggregationDescriptor Missing(FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) - { - ScriptValue = script; - return Self; - } - - /// - /// The number of top documents from which to return metrics. - /// - public TopMetricsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("top_metrics"); writer.WriteStartObject(); + if (FieldValue is not null) + { + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + } + if (MetricsDescriptor is not null) { writer.WritePropertyName("metrics"); @@ -393,6 +399,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MetricsValue, writer, options); } + if (MissingValue is not null) + { + writer.WritePropertyName("missing"); + JsonSerializer.Serialize(writer, MissingValue, options); + } + + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -422,30 +446,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { @@ -465,19 +465,43 @@ public TopMetricsAggregationDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } + private IDictionary? MetaValue { get; set; } private ICollection? MetricsValue { get; set; } private TopMetricsValueDescriptor MetricsDescriptor { get; set; } private Action MetricsDescriptorAction { get; set; } private Action[] MetricsDescriptorActions { get; set; } + private FieldValue? MissingValue { get; set; } + private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } + private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private SortOptionsDescriptor SortDescriptor { get; set; } private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } - private int? SizeValue { get; set; } + + public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// The fields of the top document to return. @@ -518,6 +542,27 @@ public TopMetricsAggregationDescriptor Metrics(params Action + /// The number of top documents from which to return metrics. + /// + public TopMetricsAggregationDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// The sort order of the documents. /// @@ -557,56 +602,17 @@ public TopMetricsAggregationDescriptor Sort(params Action return Self; } - public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TopMetricsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TopMetricsAggregationDescriptor Missing(FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) - { - ScriptValue = script; - return Self; - } - - /// - /// The number of top documents from which to return metrics. - /// - public TopMetricsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("top_metrics"); writer.WriteStartObject(); + if (FieldValue is not null) + { + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + } + if (MetricsDescriptor is not null) { writer.WritePropertyName("metrics"); @@ -636,6 +642,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MetricsValue, writer, options); } + if (MissingValue is not null) + { + writer.WritePropertyName("missing"); + JsonSerializer.Serialize(writer, MissingValue, options); + } + + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -665,30 +689,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(SortValue, writer, options); } - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs index 44613784066..ba430af57a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -188,15 +188,30 @@ public WeightedAverageAggregationDescriptor() : base() { } + private string? FormatValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue? ValueValue { get; set; } private WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action> ValueDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Aggregations.ValueType? ValueTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue? WeightValue { get; set; } private WeightedAverageValueDescriptor WeightDescriptor { get; set; } private Action> WeightDescriptorAction { get; set; } - private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Aggregations.ValueType? ValueTypeValue { get; set; } + + /// + /// A numeric response formatter. + /// + public WeightedAverageAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Configuration for the field that provides the values. @@ -225,6 +240,12 @@ public WeightedAverageAggregationDescriptor Value(Action ValueType(Elastic.Clients.Elasticsearch.Aggregations.ValueType? valueType) + { + ValueTypeValue = valueType; + return Self; + } + /// /// Configuration for the field or script that provides the weights. /// @@ -252,32 +273,17 @@ public WeightedAverageAggregationDescriptor Weight(Action - /// A numeric response formatter. - /// - public WeightedAverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("weighted_avg"); writer.WriteStartObject(); + if (!string.IsNullOrEmpty(FormatValue)) + { + writer.WritePropertyName("format"); + writer.WriteStringValue(FormatValue); + } + if (ValueDescriptor is not null) { writer.WritePropertyName("value"); @@ -294,6 +300,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ValueValue, options); } + if (ValueTypeValue is not null) + { + writer.WritePropertyName("value_type"); + JsonSerializer.Serialize(writer, ValueTypeValue, options); + } + if (WeightDescriptor is not null) { writer.WritePropertyName("weight"); @@ -310,18 +322,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, WeightValue, options); } - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - writer.WriteEndObject(); if (MetaValue is not null) { @@ -341,15 +341,30 @@ public WeightedAverageAggregationDescriptor() : base() { } + private string? FormatValue { get; set; } + private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue? ValueValue { get; set; } private WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action ValueDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Aggregations.ValueType? ValueTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue? WeightValue { get; set; } private WeightedAverageValueDescriptor WeightDescriptor { get; set; } private Action WeightDescriptorAction { get; set; } - private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Aggregations.ValueType? ValueTypeValue { get; set; } + + /// + /// A numeric response formatter. + /// + public WeightedAverageAggregationDescriptor Format(string? format) + { + FormatValue = format; + return Self; + } + + public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } /// /// Configuration for the field that provides the values. @@ -378,6 +393,12 @@ public WeightedAverageAggregationDescriptor Value(Action /// Configuration for the field or script that provides the weights. /// @@ -405,32 +426,17 @@ public WeightedAverageAggregationDescriptor Weight(Action - /// A numeric response formatter. - /// - public WeightedAverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); writer.WritePropertyName("weighted_avg"); writer.WriteStartObject(); + if (!string.IsNullOrEmpty(FormatValue)) + { + writer.WritePropertyName("format"); + writer.WriteStringValue(FormatValue); + } + if (ValueDescriptor is not null) { writer.WritePropertyName("value"); @@ -447,6 +453,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ValueValue, options); } + if (ValueTypeValue is not null) + { + writer.WritePropertyName("value_type"); + JsonSerializer.Serialize(writer, ValueTypeValue, options); + } + if (WeightDescriptor is not null) { writer.WritePropertyName("weight"); @@ -463,18 +475,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, WeightValue, options); } - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - writer.WriteEndObject(); if (MetaValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs index ac523bcf1fa..800644e5f5c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs @@ -31,17 +31,17 @@ public sealed partial class PathHierarchyTokenizer : ITokenizer { [JsonInclude, JsonPropertyName("buffer_size")] [JsonConverter(typeof(StringifiedIntegerConverter))] - public int BufferSize { get; set; } + public int? BufferSize { get; set; } [JsonInclude, JsonPropertyName("delimiter")] - public string Delimiter { get; set; } + public string? Delimiter { get; set; } [JsonInclude, JsonPropertyName("replacement")] - public string Replacement { get; set; } + public string? Replacement { get; set; } [JsonInclude, JsonPropertyName("reverse")] [JsonConverter(typeof(StringifiedBoolConverter))] - public bool Reverse { get; set; } + public bool? Reverse { get; set; } [JsonInclude, JsonPropertyName("skip")] [JsonConverter(typeof(StringifiedIntegerConverter))] - public int Skip { get; set; } + public int? Skip { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "path_hierarchy"; @@ -58,38 +58,38 @@ public PathHierarchyTokenizerDescriptor() : base() { } - private int BufferSizeValue { get; set; } - private string DelimiterValue { get; set; } - private string ReplacementValue { get; set; } - private bool ReverseValue { get; set; } - private int SkipValue { get; set; } + private int? BufferSizeValue { get; set; } + private string? DelimiterValue { get; set; } + private string? ReplacementValue { get; set; } + private bool? ReverseValue { get; set; } + private int? SkipValue { get; set; } private string? VersionValue { get; set; } - public PathHierarchyTokenizerDescriptor BufferSize(int bufferSize) + public PathHierarchyTokenizerDescriptor BufferSize(int? bufferSize) { BufferSizeValue = bufferSize; return Self; } - public PathHierarchyTokenizerDescriptor Delimiter(string delimiter) + public PathHierarchyTokenizerDescriptor Delimiter(string? delimiter) { DelimiterValue = delimiter; return Self; } - public PathHierarchyTokenizerDescriptor Replacement(string replacement) + public PathHierarchyTokenizerDescriptor Replacement(string? replacement) { ReplacementValue = replacement; return Self; } - public PathHierarchyTokenizerDescriptor Reverse(bool reverse = true) + public PathHierarchyTokenizerDescriptor Reverse(bool? reverse = true) { ReverseValue = reverse; return Self; } - public PathHierarchyTokenizerDescriptor Skip(int skip) + public PathHierarchyTokenizerDescriptor Skip(int? skip) { SkipValue = skip; return Self; @@ -104,16 +104,36 @@ public PathHierarchyTokenizerDescriptor Version(string? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("buffer_size"); - JsonSerializer.Serialize(writer, BufferSizeValue, options); - writer.WritePropertyName("delimiter"); - writer.WriteStringValue(DelimiterValue); - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - writer.WritePropertyName("reverse"); - JsonSerializer.Serialize(writer, ReverseValue, options); - writer.WritePropertyName("skip"); - JsonSerializer.Serialize(writer, SkipValue, options); + if (BufferSizeValue is not null) + { + writer.WritePropertyName("buffer_size"); + JsonSerializer.Serialize(writer, BufferSizeValue, options); + } + + if (!string.IsNullOrEmpty(DelimiterValue)) + { + writer.WritePropertyName("delimiter"); + writer.WriteStringValue(DelimiterValue); + } + + if (!string.IsNullOrEmpty(ReplacementValue)) + { + writer.WritePropertyName("replacement"); + writer.WriteStringValue(ReplacementValue); + } + + if (ReverseValue is not null) + { + writer.WritePropertyName("reverse"); + JsonSerializer.Serialize(writer, ReverseValue, options); + } + + if (SkipValue is not null) + { + writer.WritePropertyName("skip"); + JsonSerializer.Serialize(writer, SkipValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("path_hierarchy"); if (VersionValue is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs index 3198a5f83a2..e9e22af0acb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs @@ -74,8 +74,8 @@ public MultiGetOperationDescriptor() : base() private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } @@ -99,20 +99,20 @@ public MultiGetOperationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName } /// - /// If `false`, excludes all _source fields. + /// The key for the primary shard the document resides on. Required if routing is used during indexing. /// - public MultiGetOperationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + public MultiGetOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) { - SourceValue = source; + RoutingValue = routing; return Self; } /// - /// The key for the primary shard the document resides on. Required if routing is used during indexing. + /// If `false`, excludes all _source fields. /// - public MultiGetOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + public MultiGetOperationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { - RoutingValue = routing; + SourceValue = source; return Self; } @@ -148,18 +148,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexValue, options); } - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - if (RoutingValue is not null) { writer.WritePropertyName("routing"); JsonSerializer.Serialize(writer, RoutingValue, options); } + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (StoredFieldsValue is not null) { writer.WritePropertyName("stored_fields"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 9c9fd2276a7..7dc38f2e201 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -39,12 +39,6 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_source") - { - variant.Source = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "aggregations" || property == "aggs") { variant.Aggregations = JsonSerializer.Deserialize(ref reader, options); @@ -177,6 +171,12 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve continue; } + if (property == "_source") + { + variant.Source = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "stats") { variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); @@ -233,12 +233,6 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve public override void Write(Utf8JsonWriter writer, MultisearchBody value, JsonSerializerOptions options) { writer.WriteStartObject(); - if (value.Source is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, value.Source, options); - } - if (value.Aggregations is not null) { writer.WritePropertyName("aggregations"); @@ -371,6 +365,12 @@ public override void Write(Utf8JsonWriter writer, MultisearchBody value, JsonSer JsonSerializer.Serialize(writer, value.Sort, options); } + if (value.Source is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, value.Source, options); + } + if (value.Stats is not null) { writer.WritePropertyName("stats"); @@ -564,20 +564,29 @@ public MultisearchBodyDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action> FieldsDescriptorAction { get; set; } private Action>[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action> KnnDescriptorAction { get; set; } private Action>[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action> PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } @@ -585,25 +594,16 @@ public MultisearchBodyDescriptor() : base() private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action> RescoreDescriptorAction { get; set; } private Action>[] RescoreDescriptorActions { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } @@ -702,6 +702,24 @@ public MultisearchBodyDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public MultisearchBodyDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -741,6 +759,15 @@ public MultisearchBodyDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// + public MultisearchBodyDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -765,6 +792,15 @@ public MultisearchBodyDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + /// + public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -804,6 +840,42 @@ public MultisearchBodyDescriptor Knn(params Action + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ /// + public MultisearchBodyDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) + { + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; + return Self; + } + + public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + { + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; + return Self; + } + + public MultisearchBodyDescriptor Pit(Action configure) + { + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; + return Self; + } + public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? postFilter) { PostFilterDescriptor = null; @@ -828,6 +900,12 @@ public MultisearchBodyDescriptor PostFilter(Action Profile(bool? profile = true) + { + ProfileValue = profile; + return Self; + } + /// /// Defines the search definition using the Query DSL. /// @@ -891,6 +969,48 @@ public MultisearchBodyDescriptor Rescore(params Action + /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// + public MultisearchBodyDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Retrieve a script evaluation (based on different fields) for each hit. + /// + public MultisearchBodyDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public MultisearchBodyDescriptor SearchAfter(ICollection? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + /// + /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public MultisearchBodyDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + public MultisearchBodyDescriptor Sort(ICollection? sort) { SortDescriptor = null; @@ -937,209 +1057,89 @@ public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch } /// - /// If true, returns detailed information about score computation as part of a hit. + /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- public MultisearchBodyDescriptor Explain(bool? explain = true) + public MultisearchBodyDescriptor Stats(ICollection? stats) { - ExplainValue = explain; + StatsValue = stats; return Self; } /// - /// Configuration of search extensions defined by Elasticsearch plugins. + /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
///
- public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) { - ExtValue = selector?.Invoke(new FluentDictionary()); + StoredFieldsValue = storedFields; return Self; } - /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public MultisearchBodyDescriptor From(int? from) + public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { - FromValue = from; + SuggestDescriptor = null; + SuggestDescriptorAction = null; + SuggestValue = suggest; return Self; } - /// - /// Boosts the _score of documents from specified indices. - /// - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + public MultisearchBodyDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { - IndicesBoostValue = indicesBoost; + SuggestValue = null; + SuggestDescriptorAction = null; + SuggestDescriptor = descriptor; return Self; } - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public MultisearchBodyDescriptor MinScore(double? minScore) + public MultisearchBodyDescriptor Suggest(Action configure) { - MinScoreValue = minScore; + SuggestValue = null; + SuggestDescriptor = null; + SuggestDescriptorAction = configure; return Self; } /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ /// Maximum number of documents to collect for each shard. If a query reaches this
limit, Elasticsearch terminates the query early. Elasticsearch collects documents
before sorting. Defaults to 0, which does not terminate query execution early.
///
- public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + public MultisearchBodyDescriptor TerminateAfter(long? terminateAfter) { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; + TerminateAfterValue = terminateAfter; return Self; } - public MultisearchBodyDescriptor Pit(Action configure) + /// + /// Specifies the period of time to wait for a response from each shard. If no response
is received before the timeout expires, the request fails and returns an error.
Defaults to no timeout.
+ ///
+ public MultisearchBodyDescriptor Timeout(string? timeout) { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; + TimeoutValue = timeout; return Self; } - public MultisearchBodyDescriptor Profile(bool? profile = true) + /// + /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// + public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) { - ProfileValue = profile; + TrackScoresValue = trackScores; return Self; } /// - /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
///
- public MultisearchBodyDescriptor RuntimeMappings(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + TrackTotalHitsValue = trackTotalHits; return Self; } /// - /// Retrieve a script evaluation (based on different fields) for each hit. + /// If true, returns document version as part of a hit. /// - public MultisearchBodyDescriptor ScriptFields(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor Version(bool? version = true) { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MultisearchBodyDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public MultisearchBodyDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
- ///
- public MultisearchBodyDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// List of stored fields to return as part of a hit. If no fields are specified,
no stored fields are included in the response. If this field is specified, the _source
parameter defaults to false. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Action configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// Maximum number of documents to collect for each shard. If a query reaches this
limit, Elasticsearch terminates the query early. Elasticsearch collects documents
before sorting. Defaults to 0, which does not terminate query execution early.
- ///
- public MultisearchBodyDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// Specifies the period of time to wait for a response from each shard. If no response
is received before the timeout expires, the request fails and returns an error.
Defaults to no timeout.
- ///
- public MultisearchBodyDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
- ///
- public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// If true, returns document version as part of a hit. - /// - public MultisearchBodyDescriptor Version(bool? version = true) - { - VersionValue = version; + VersionValue = version; return Self; } @@ -1209,6 +1209,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -1240,6 +1252,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -1256,6 +1274,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -1285,6 +1309,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -1301,6 +1347,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -1346,6 +1398,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -1381,88 +1463,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); @@ -1543,20 +1543,29 @@ public MultisearchBodyDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } + private bool? ExplainValue { get; set; } + private IDictionary? ExtValue { get; set; } private ICollection? FieldsValue { get; set; } private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } private Action FieldsDescriptorAction { get; set; } private Action[] FieldsDescriptorActions { get; set; } + private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private ICollection>? IndicesBoostValue { get; set; } private ICollection? KnnValue { get; set; } private KnnQueryDescriptor KnnDescriptor { get; set; } private Action KnnDescriptorAction { get; set; } private Action[] KnnDescriptorActions { get; set; } + private double? MinScoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Action PitDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilterValue { get; set; } private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } private Action PostFilterDescriptorAction { get; set; } + private bool? ProfileValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } @@ -1564,25 +1573,16 @@ public MultisearchBodyDescriptor() : base() private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } private Action RescoreDescriptorAction { get; set; } private Action[] RescoreDescriptorActions { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private int? FromValue { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } private IDictionary? RuntimeMappingsValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private ICollection? SearchAfterValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private ICollection? StatsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } @@ -1681,6 +1681,24 @@ public MultisearchBodyDescriptor DocvalueFields(params Action + /// If true, returns detailed information about score computation as part of a hit. + /// + public MultisearchBodyDescriptor Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + /// + /// Configuration of search extensions defined by Elasticsearch plugins. + /// + public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + { + ExtValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -1720,6 +1738,15 @@ public MultisearchBodyDescriptor Fields(params Action + /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// + public MultisearchBodyDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -1744,6 +1771,15 @@ public MultisearchBodyDescriptor Highlight(Action + /// Boosts the _score of documents from specified indices. + /// + public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + { + IndicesBoostValue = indicesBoost; + return Self; + } + /// /// Defines the approximate kNN search to run. /// @@ -1783,213 +1819,132 @@ public MultisearchBodyDescriptor Knn(params Action[] configu return Self; } - public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Action configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - /// - /// Defines the search definition using the Query DSL. + /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
///
- public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public MultisearchBodyDescriptor Query(QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Action configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(params Action[] configure) + public MultisearchBodyDescriptor MinScore(double? minScore) { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; + MinScoreValue = minScore; return Self; } - public MultisearchBodyDescriptor Sort(ICollection? sort) + /// + /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; + PitDescriptor = null; + PitDescriptorAction = null; + PitValue = pit; return Self; } - public MultisearchBodyDescriptor Sort(SortOptionsDescriptor descriptor) + public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; + PitValue = null; + PitDescriptorAction = null; + PitDescriptor = descriptor; return Self; } - public MultisearchBodyDescriptor Sort(Action configure) + public MultisearchBodyDescriptor Pit(Action configure) { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; + PitValue = null; + PitDescriptor = null; + PitDescriptorAction = configure; return Self; } - public MultisearchBodyDescriptor Sort(params Action[] configure) + public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? postFilter) { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; + PostFilterDescriptor = null; + PostFilterDescriptorAction = null; + PostFilterValue = postFilter; return Self; } - /// - /// Indicates which source fields are returned for matching documents. These
fields are returned in the hits._source property of the search response.
- ///
- public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + public MultisearchBodyDescriptor PostFilter(QueryDsl.QueryDescriptor descriptor) { - SourceValue = source; + PostFilterValue = null; + PostFilterDescriptorAction = null; + PostFilterDescriptor = descriptor; return Self; } - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - public MultisearchBodyDescriptor Explain(bool? explain = true) + public MultisearchBodyDescriptor PostFilter(Action configure) { - ExplainValue = explain; + PostFilterValue = null; + PostFilterDescriptor = null; + PostFilterDescriptorAction = configure; return Self; } - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) + public MultisearchBodyDescriptor Profile(bool? profile = true) { - ExtValue = selector?.Invoke(new FluentDictionary()); + ProfileValue = profile; return Self; } /// - /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ /// Defines the search definition using the Query DSL. ///
- public MultisearchBodyDescriptor From(int? from) + public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) { - FromValue = from; + QueryDescriptor = null; + QueryDescriptorAction = null; + QueryValue = query; return Self; } - /// - /// Boosts the _score of documents from specified indices. - /// - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) + public MultisearchBodyDescriptor Query(QueryDsl.QueryDescriptor descriptor) { - IndicesBoostValue = indicesBoost; + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptor = descriptor; return Self; } - /// - /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public MultisearchBodyDescriptor MinScore(double? minScore) + public MultisearchBodyDescriptor Query(Action configure) { - MinScoreValue = minScore; + QueryValue = null; + QueryDescriptor = null; + QueryDescriptorAction = configure; return Self; } - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) + public MultisearchBodyDescriptor Rescore(ICollection? rescore) { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; + RescoreDescriptor = null; + RescoreDescriptorAction = null; + RescoreDescriptorActions = null; + RescoreValue = rescore; return Self; } - public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) + public MultisearchBodyDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; + RescoreValue = null; + RescoreDescriptorAction = null; + RescoreDescriptorActions = null; + RescoreDescriptor = descriptor; return Self; } - public MultisearchBodyDescriptor Pit(Action configure) + public MultisearchBodyDescriptor Rescore(Action configure) { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; + RescoreValue = null; + RescoreDescriptor = null; + RescoreDescriptorActions = null; + RescoreDescriptorAction = configure; return Self; } - public MultisearchBodyDescriptor Profile(bool? profile = true) + public MultisearchBodyDescriptor Rescore(params Action[] configure) { - ProfileValue = profile; + RescoreValue = null; + RescoreDescriptor = null; + RescoreDescriptorAction = null; + RescoreDescriptorActions = configure; return Self; } @@ -2035,6 +1990,51 @@ public MultisearchBodyDescriptor Size(int? size) return Self; } + public MultisearchBodyDescriptor Sort(ICollection? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortValue = sort; + return Self; + } + + public MultisearchBodyDescriptor Sort(SortOptionsDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptorActions = null; + SortDescriptor = descriptor; + return Self; + } + + public MultisearchBodyDescriptor Sort(Action configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorActions = null; + SortDescriptorAction = configure; + return Self; + } + + public MultisearchBodyDescriptor Sort(params Action[] configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = null; + SortDescriptorActions = configure; + return Self; + } + + /// + /// Indicates which source fields are returned for matching documents. These
fields are returned in the hits._source property of the search response.
+ ///
+ public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) + { + SourceValue = source; + return Self; + } + /// /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
@@ -2188,6 +2188,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (ExtValue is not null) + { + writer.WritePropertyName("ext"); + JsonSerializer.Serialize(writer, ExtValue, options); + } + if (FieldsDescriptor is not null) { writer.WritePropertyName("fields"); @@ -2219,6 +2231,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -2235,6 +2253,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndicesBoostValue is not null) + { + writer.WritePropertyName("indices_boost"); + JsonSerializer.Serialize(writer, IndicesBoostValue, options); + } + if (KnnDescriptor is not null) { writer.WritePropertyName("knn"); @@ -2264,6 +2288,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (PitDescriptor is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitDescriptor, options); + } + else if (PitDescriptorAction is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); + } + else if (PitValue is not null) + { + writer.WritePropertyName("pit"); + JsonSerializer.Serialize(writer, PitValue, options); + } + if (PostFilterDescriptor is not null) { writer.WritePropertyName("post_filter"); @@ -2280,6 +2326,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PostFilterValue, options); } + if (ProfileValue.HasValue) + { + writer.WritePropertyName("profile"); + writer.WriteBooleanValue(ProfileValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -2325,6 +2377,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); } + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SearchAfterValue is not null) + { + writer.WritePropertyName("search_after"); + JsonSerializer.Serialize(writer, SearchAfterValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -2360,88 +2442,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StatsValue is not null) { writer.WritePropertyName("stats"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs index d2220077f67..75dcae5c74b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs @@ -116,14 +116,14 @@ public MultiTermVectorsOperationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } - private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } + private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.TermVectors.Filter? FilterValue { get; set; } private Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } private bool? PositionsValue { get; set; } @@ -132,24 +132,6 @@ public MultiTermVectorsOperationDescriptor() : base() private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } - /// - /// The ID of the document. - /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id id) - { - IdValue = id; - return Self; - } - - /// - /// The index of the document. - /// - public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) - { - IndexValue = index; - return Self; - } - /// /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. /// @@ -160,20 +142,20 @@ public MultiTermVectorsOperationDescriptor Doc(object? doc) } /// - /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
///
- public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) + public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) { - FieldStatisticsValue = fieldStatistics; + FieldsValue = fields; return Self; } /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
+ /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. ///
- public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) { - FieldsValue = fields; + FieldStatisticsValue = fieldStatistics; return Self; } @@ -204,6 +186,24 @@ public MultiTermVectorsOperationDescriptor Filter(Action + /// The ID of the document. + /// + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + IdValue = id; + return Self; + } + + /// + /// The index of the document. + /// + public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + IndexValue = index; + return Self; + } + /// /// If `true`, the response includes term offsets. /// @@ -270,32 +270,24 @@ public MultiTermVectorsOperationDescriptor VersionType(Elastic.Client protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); JsonSerializer.Serialize(writer, DocValue, options); } - if (FieldStatisticsValue.HasValue) - { - writer.WritePropertyName("field_statistics"); - writer.WriteBooleanValue(FieldStatisticsValue.Value); - } - if (FieldsValue is not null) { writer.WritePropertyName("fields"); JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FieldStatisticsValue.HasValue) + { + writer.WritePropertyName("field_statistics"); + writer.WriteBooleanValue(FieldStatisticsValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -312,6 +304,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (OffsetsValue.HasValue) { writer.WritePropertyName("offsets"); @@ -366,14 +366,14 @@ public MultiTermVectorsOperationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } - private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } + private bool? FieldStatisticsValue { get; set; } private Elastic.Clients.Elasticsearch.Core.TermVectors.Filter? FilterValue { get; set; } private Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private bool? OffsetsValue { get; set; } private bool? PayloadsValue { get; set; } private bool? PositionsValue { get; set; } @@ -382,24 +382,6 @@ public MultiTermVectorsOperationDescriptor() : base() private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } - /// - /// The ID of the document. - /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id id) - { - IdValue = id; - return Self; - } - - /// - /// The index of the document. - /// - public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) - { - IndexValue = index; - return Self; - } - /// /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. /// @@ -410,20 +392,20 @@ public MultiTermVectorsOperationDescriptor Doc(object? doc) } /// - /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
///
- public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) + public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) { - FieldStatisticsValue = fieldStatistics; + FieldsValue = fields; return Self; } /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics.
Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
+ /// If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. ///
- public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) { - FieldsValue = fields; + FieldStatisticsValue = fieldStatistics; return Self; } @@ -454,6 +436,24 @@ public MultiTermVectorsOperationDescriptor Filter(Action + /// The ID of the document. + /// + public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + IdValue = id; + return Self; + } + + /// + /// The index of the document. + /// + public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + IndexValue = index; + return Self; + } + /// /// If `true`, the response includes term offsets. /// @@ -520,32 +520,24 @@ public MultiTermVectorsOperationDescriptor VersionType(Elastic.Clients.Elasticse protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); JsonSerializer.Serialize(writer, DocValue, options); } - if (FieldStatisticsValue.HasValue) - { - writer.WritePropertyName("field_statistics"); - writer.WriteBooleanValue(FieldStatisticsValue.Value); - } - if (FieldsValue is not null) { writer.WritePropertyName("fields"); JsonSerializer.Serialize(writer, FieldsValue, options); } + if (FieldStatisticsValue.HasValue) + { + writer.WritePropertyName("field_statistics"); + writer.WriteBooleanValue(FieldStatisticsValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -562,6 +554,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (OffsetsValue.HasValue) { writer.WritePropertyName("offsets"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs index 93462d9f5c9..0e33dbad247 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs @@ -68,44 +68,17 @@ public RankEvalRequestItemDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? RequestValue { get; set; } - private RankEvalQueryDescriptor RequestDescriptor { get; set; } - private Action> RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } private IDictionary? ParamsValue { get; set; } private ICollection RatingsValue { get; set; } private DocumentRatingDescriptor RatingsDescriptor { get; set; } private Action RatingsDescriptorAction { get; set; } private Action[] RatingsDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? RequestValue { get; set; } + private RankEvalQueryDescriptor RequestDescriptor { get; set; } + private Action> RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Id? TemplateIdValue { get; set; } - /// - /// The query being evaluated. - /// - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? request) - { - RequestDescriptor = null; - RequestDescriptorAction = null; - RequestValue = request; - return Self; - } - - public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) - { - RequestValue = null; - RequestDescriptorAction = null; - RequestDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Action> configure) - { - RequestValue = null; - RequestDescriptor = null; - RequestDescriptorAction = configure; - return Self; - } - /// /// The search request’s ID, used to group result details later. /// @@ -163,6 +136,33 @@ public RankEvalRequestItemDescriptor Ratings(params Action + /// The query being evaluated. + /// + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? request) + { + RequestDescriptor = null; + RequestDescriptorAction = null; + RequestValue = request; + return Self; + } + + public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) + { + RequestValue = null; + RequestDescriptorAction = null; + RequestDescriptor = descriptor; + return Self; + } + + public RankEvalRequestItemDescriptor Request(Action> configure) + { + RequestValue = null; + RequestDescriptor = null; + RequestDescriptorAction = configure; + return Self; + } + /// /// The search template Id /// @@ -175,22 +175,6 @@ public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elast protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (RequestDescriptor is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestDescriptor, options); - } - else if (RequestDescriptorAction is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); - } - else if (RequestValue is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestValue, options); - } - writer.WritePropertyName("id"); JsonSerializer.Serialize(writer, IdValue, options); if (ParamsValue is not null) @@ -230,6 +214,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RatingsValue, options); } + if (RequestDescriptor is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestDescriptor, options); + } + else if (RequestDescriptorAction is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); + } + else if (RequestValue is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestValue, options); + } + if (TemplateIdValue is not null) { writer.WritePropertyName("template_id"); @@ -248,44 +248,17 @@ public RankEvalRequestItemDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? RequestValue { get; set; } - private RankEvalQueryDescriptor RequestDescriptor { get; set; } - private Action RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } private IDictionary? ParamsValue { get; set; } private ICollection RatingsValue { get; set; } private DocumentRatingDescriptor RatingsDescriptor { get; set; } private Action RatingsDescriptorAction { get; set; } private Action[] RatingsDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? RequestValue { get; set; } + private RankEvalQueryDescriptor RequestDescriptor { get; set; } + private Action RequestDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Id? TemplateIdValue { get; set; } - /// - /// The query being evaluated. - /// - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? request) - { - RequestDescriptor = null; - RequestDescriptorAction = null; - RequestValue = request; - return Self; - } - - public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) - { - RequestValue = null; - RequestDescriptorAction = null; - RequestDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Action configure) - { - RequestValue = null; - RequestDescriptor = null; - RequestDescriptorAction = configure; - return Self; - } - /// /// The search request’s ID, used to group result details later. /// @@ -343,6 +316,33 @@ public RankEvalRequestItemDescriptor Ratings(params Action + /// The query being evaluated. + /// + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? request) + { + RequestDescriptor = null; + RequestDescriptorAction = null; + RequestValue = request; + return Self; + } + + public RankEvalRequestItemDescriptor Request(RankEvalQueryDescriptor descriptor) + { + RequestValue = null; + RequestDescriptorAction = null; + RequestDescriptor = descriptor; + return Self; + } + + public RankEvalRequestItemDescriptor Request(Action configure) + { + RequestValue = null; + RequestDescriptor = null; + RequestDescriptorAction = configure; + return Self; + } + /// /// The search template Id /// @@ -355,22 +355,6 @@ public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elasticsearch.Id protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (RequestDescriptor is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestDescriptor, options); - } - else if (RequestDescriptorAction is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); - } - else if (RequestValue is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestValue, options); - } - writer.WritePropertyName("id"); JsonSerializer.Serialize(writer, IdValue, options); if (ParamsValue is not null) @@ -410,6 +394,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RatingsValue, options); } + if (RequestDescriptor is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestDescriptor, options); + } + else if (RequestDescriptorAction is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, new RankEvalQueryDescriptor(RequestDescriptorAction), options); + } + else if (RequestValue is not null) + { + writer.WritePropertyName("request"); + JsonSerializer.Serialize(writer, RequestValue, options); + } + if (TemplateIdValue is not null) { writer.WritePropertyName("template_id"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs index b5f6b581e74..ba9577ba953 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs @@ -66,7 +66,8 @@ public sealed partial class Source /// [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] public ICollection? Sort { get; set; } } @@ -78,9 +79,15 @@ public SourceDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Indices IndexValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? RemoteValue { get; set; } + private RemoteSourceDescriptor RemoteDescriptor { get; set; } + private Action RemoteDescriptorAction { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } @@ -89,12 +96,15 @@ public SourceDescriptor() : base() private Action> SortDescriptorAction { get; set; } private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Fields? SourceFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Indices IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? RemoteValue { get; set; } - private RemoteSourceDescriptor RemoteDescriptor { get; set; } - private Action RemoteDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } + + /// + /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
+ ///
+ public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Indices index) + { + IndexValue = index; + return Self; + } /// /// Specifies the documents to reindex using the Query DSL. @@ -123,6 +133,48 @@ public SourceDescriptor Query(Action + /// A remote instance of Elasticsearch that you want to index from. + /// + public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? remote) + { + RemoteDescriptor = null; + RemoteDescriptorAction = null; + RemoteValue = remote; + return Self; + } + + public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) + { + RemoteValue = null; + RemoteDescriptorAction = null; + RemoteDescriptor = descriptor; + return Self; + } + + public SourceDescriptor Remote(Action configure) + { + RemoteValue = null; + RemoteDescriptor = null; + RemoteDescriptorAction = configure; + return Self; + } + + public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
+ ///
+ public SourceDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// Slice the reindex request manually using the provided slice ID and total number of slices. /// @@ -195,60 +247,11 @@ public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Fi return Self; } - /// - /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
- ///
- public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Indices index) - { - IndexValue = index; - return Self; - } - - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? remote) - { - RemoteDescriptor = null; - RemoteDescriptorAction = null; - RemoteValue = remote; - return Self; - } - - public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) - { - RemoteValue = null; - RemoteDescriptorAction = null; - RemoteDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Remote(Action configure) - { - RemoteValue = null; - RemoteDescriptor = null; - RemoteDescriptorAction = configure; - return Self; - } - - public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
- ///
- public SourceDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -265,6 +268,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (RemoteDescriptor is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteDescriptor, options); + } + else if (RemoteDescriptorAction is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); + } + else if (RemoteValue is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteValue, options); + } + + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -316,36 +347,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceFieldsValue, options); } - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (RemoteDescriptor is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteDescriptor, options); - } - else if (RemoteDescriptorAction is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); - } - else if (RemoteValue is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); } } @@ -358,9 +359,15 @@ public SourceDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Indices IndexValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDsl.QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? RemoteValue { get; set; } + private RemoteSourceDescriptor RemoteDescriptor { get; set; } + private Action RemoteDescriptorAction { get; set; } + private IDictionary? RuntimeMappingsValue { get; set; } + private int? SizeValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } @@ -369,12 +376,15 @@ public SourceDescriptor() : base() private Action SortDescriptorAction { get; set; } private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Fields? SourceFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Indices IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? RemoteValue { get; set; } - private RemoteSourceDescriptor RemoteDescriptor { get; set; } - private Action RemoteDescriptorAction { get; set; } - private IDictionary? RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } + + /// + /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
+ ///
+ public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Indices index) + { + IndexValue = index; + return Self; + } /// /// Specifies the documents to reindex using the Query DSL. @@ -403,6 +413,48 @@ public SourceDescriptor Query(Action configure) return Self; } + /// + /// A remote instance of Elasticsearch that you want to index from. + /// + public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? remote) + { + RemoteDescriptor = null; + RemoteDescriptorAction = null; + RemoteValue = remote; + return Self; + } + + public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) + { + RemoteValue = null; + RemoteDescriptorAction = null; + RemoteDescriptor = descriptor; + return Self; + } + + public SourceDescriptor Remote(Action configure) + { + RemoteValue = null; + RemoteDescriptor = null; + RemoteDescriptorAction = configure; + return Self; + } + + public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
+ ///
+ public SourceDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// Slice the reindex request manually using the provided slice ID and total number of slices. /// @@ -475,60 +527,11 @@ public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Fields? sourc return Self; } - /// - /// The name of the data stream, index, or alias you are copying from.
Accepts a comma-separated list to reindex from multiple sources.
- ///
- public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Indices index) - { - IndexValue = index; - return Self; - } - - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? remote) - { - RemoteDescriptor = null; - RemoteDescriptorAction = null; - RemoteValue = remote; - return Self; - } - - public SourceDescriptor Remote(RemoteSourceDescriptor descriptor) - { - RemoteValue = null; - RemoteDescriptorAction = null; - RemoteDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Remote(Action configure) - { - RemoteValue = null; - RemoteDescriptor = null; - RemoteDescriptorAction = configure; - return Self; - } - - public SourceDescriptor RuntimeMappings(Func, FluentDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// The number of documents to index per batch.
Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.
- ///
- public SourceDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -545,6 +548,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, QueryValue, options); } + if (RemoteDescriptor is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteDescriptor, options); + } + else if (RemoteDescriptorAction is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); + } + else if (RemoteValue is not null) + { + writer.WritePropertyName("remote"); + JsonSerializer.Serialize(writer, RemoteValue, options); + } + + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SliceDescriptor is not null) { writer.WritePropertyName("slice"); @@ -596,36 +627,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceFieldsValue, options); } - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (RemoteDescriptor is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteDescriptor, options); - } - else if (RemoteDescriptorAction is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, new RemoteSourceDescriptor(RemoteDescriptorAction), options); - } - else if (RemoteValue is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs index 208a874335c..a184cec384e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs @@ -41,7 +41,8 @@ public sealed partial class FieldCollapse /// /// The number of inner hits and their sort order /// - [JsonInclude, JsonPropertyName("inner_hits"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.InnerHits))] + [JsonInclude, JsonPropertyName("inner_hits")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.InnerHits))] public ICollection? InnerHits { get; set; } /// @@ -62,11 +63,11 @@ public FieldCollapseDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } private Action> CollapseDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private ICollection? InnerHitsValue { get; set; } private InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } private Action>[] InnerHitsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private int? MaxConcurrentGroupSearchesValue { get; set; } public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) @@ -93,6 +94,24 @@ public FieldCollapseDescriptor Collapse(Action + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// The number of inner hits and their sort order /// @@ -132,24 +151,6 @@ public FieldCollapseDescriptor InnerHits(params Action - /// The field to collapse the result set on - ///
- public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The number of concurrent requests allowed to retrieve the inner_hits per group /// @@ -178,6 +179,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollapseValue, options); } + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -207,8 +210,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(InnerHitsValue, writer, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (MaxConcurrentGroupSearchesValue.HasValue) { writer.WritePropertyName("max_concurrent_group_searches"); @@ -230,11 +231,11 @@ public FieldCollapseDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } private Action CollapseDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private ICollection? InnerHitsValue { get; set; } private InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } private Action[] InnerHitsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private int? MaxConcurrentGroupSearchesValue { get; set; } public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) @@ -261,6 +262,33 @@ public FieldCollapseDescriptor Collapse(Action configur return Self; } + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The field to collapse the result set on + /// + public FieldCollapseDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// The number of inner hits and their sort order /// @@ -300,33 +328,6 @@ public FieldCollapseDescriptor InnerHits(params Action[] co return Self; } - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// The field to collapse the result set on - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The number of concurrent requests allowed to retrieve the inner_hits per group /// @@ -355,6 +356,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollapseValue, options); } + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -384,8 +387,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(InnerHitsValue, writer, options); } - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); if (MaxConcurrentGroupSearchesValue.HasValue) { writer.WritePropertyName("max_concurrent_group_searches"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs index 9d01f5136ba..5cd1efa23bd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs @@ -85,9 +85,6 @@ public HighlightDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action> HighlightQueryDescriptorAction { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } @@ -95,9 +92,12 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? EncoderValue { get; set; } private IDictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } - private int? FragmentSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } + private int? FragmentSizeValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action> HighlightQueryDescriptorAction { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } private int? NoMatchSizeValue { get; set; } @@ -111,30 +111,6 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightDescriptor HighlightQuery(Action> configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightDescriptor BoundaryChars(string? boundaryChars) { BoundaryCharsValue = boundaryChars; @@ -177,15 +153,15 @@ public HighlightDescriptor ForceSource(bool? forceSource = true) return Self; } - public HighlightDescriptor FragmentSize(int? fragmentSize) + public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) { - FragmentSizeValue = fragmentSize; + FragmenterValue = fragmenter; return Self; } - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightDescriptor FragmentSize(int? fragmentSize) { - FragmenterValue = fragmenter; + FragmentSizeValue = fragmentSize; return Self; } @@ -195,6 +171,30 @@ public HighlightDescriptor HighlightFilter(bool? highlightFilter = tr return Self; } + public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) + { + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightDescriptor HighlightQuery(Action> configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; + return Self; + } + public HighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) { MaxAnalyzedOffsetValue = maxAnalyzedOffset; @@ -270,22 +270,6 @@ public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Core.Se protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (!string.IsNullOrEmpty(BoundaryCharsValue)) { writer.WritePropertyName("boundary_chars"); @@ -324,24 +308,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - if (FragmenterValue is not null) { writer.WritePropertyName("fragmenter"); JsonSerializer.Serialize(writer, FragmenterValue, options); } + if (FragmentSizeValue.HasValue) + { + writer.WritePropertyName("fragment_size"); + writer.WriteNumberValue(FragmentSizeValue.Value); + } + if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MaxAnalyzedOffsetValue.HasValue) { writer.WritePropertyName("max_analyzed_offset"); @@ -426,9 +426,6 @@ public HighlightDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action HighlightQueryDescriptorAction { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } @@ -436,9 +433,12 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? EncoderValue { get; set; } private IDictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } - private int? FragmentSizeValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } + private int? FragmentSizeValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action HighlightQueryDescriptorAction { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } private int? NoMatchSizeValue { get; set; } @@ -452,30 +452,6 @@ public HighlightDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightDescriptor HighlightQuery(Action configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightDescriptor BoundaryChars(string? boundaryChars) { BoundaryCharsValue = boundaryChars; @@ -518,15 +494,15 @@ public HighlightDescriptor ForceSource(bool? forceSource = true) return Self; } - public HighlightDescriptor FragmentSize(int? fragmentSize) + public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) { - FragmentSizeValue = fragmentSize; + FragmenterValue = fragmenter; return Self; } - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightDescriptor FragmentSize(int? fragmentSize) { - FragmenterValue = fragmenter; + FragmentSizeValue = fragmentSize; return Self; } @@ -536,6 +512,30 @@ public HighlightDescriptor HighlightFilter(bool? highlightFilter = true) return Self; } + public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) + { + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightDescriptor HighlightQuery(Action configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; + return Self; + } + public HighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) { MaxAnalyzedOffsetValue = maxAnalyzedOffset; @@ -611,22 +611,6 @@ public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Core.Search.Highli protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (!string.IsNullOrEmpty(BoundaryCharsValue)) { writer.WritePropertyName("boundary_chars"); @@ -665,24 +649,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - if (FragmenterValue is not null) { writer.WritePropertyName("fragmenter"); JsonSerializer.Serialize(writer, FragmenterValue, options); } + if (FragmentSizeValue.HasValue) + { + writer.WritePropertyName("fragment_size"); + writer.WriteNumberValue(FragmentSizeValue.Value); + } + if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MaxAnalyzedOffsetValue.HasValue) { writer.WritePropertyName("max_analyzed_offset"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs index 7d72aa94a32..402fd147905 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs @@ -87,19 +87,19 @@ public HighlightFieldDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action> HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Analysis.Analyzers? AnalyzerValue { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } private bool? ForceSourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private int? FragmentOffsetValue { get; set; } private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action> HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Fields? MatchedFieldsValue { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } @@ -114,30 +114,6 @@ public HighlightFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Action> configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightFieldDescriptor Analyzer(Elastic.Clients.Elasticsearch.Analysis.Analyzers? analyzer) { AnalyzerValue = analyzer; @@ -174,6 +150,12 @@ public HighlightFieldDescriptor ForceSource(bool? forceSource = true) return Self; } + public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) + { + FragmenterValue = fragmenter; + return Self; + } + public HighlightFieldDescriptor FragmentOffset(int? fragmentOffset) { FragmentOffsetValue = fragmentOffset; @@ -186,15 +168,33 @@ public HighlightFieldDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) { - FragmenterValue = fragmenter; + HighlightFilterValue = highlightFilter; return Self; } - public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) + public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) { - HighlightFilterValue = highlightFilter; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(Action> configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; return Self; } @@ -279,22 +279,6 @@ public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Co protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (AnalyzerValue is not null) { writer.WritePropertyName("analyzer"); @@ -331,6 +315,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } + if (FragmenterValue is not null) + { + writer.WritePropertyName("fragmenter"); + JsonSerializer.Serialize(writer, FragmenterValue, options); + } + if (FragmentOffsetValue.HasValue) { writer.WritePropertyName("fragment_offset"); @@ -343,18 +333,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(FragmentSizeValue.Value); } - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MatchedFieldsValue is not null) { writer.WritePropertyName("matched_fields"); @@ -445,19 +445,19 @@ public HighlightFieldDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } - private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Analysis.Analyzers? AnalyzerValue { get; set; } private string? BoundaryCharsValue { get; set; } private int? BoundaryMaxScanValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } private bool? ForceSourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private int? FragmentOffsetValue { get; set; } private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.Query? HighlightQueryValue { get; set; } + private QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } + private Action HighlightQueryDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Fields? MatchedFieldsValue { get; set; } private int? MaxAnalyzedOffsetValue { get; set; } private int? MaxFragmentLengthValue { get; set; } @@ -472,30 +472,6 @@ public HighlightFieldDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Action configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - public HighlightFieldDescriptor Analyzer(Elastic.Clients.Elasticsearch.Analysis.Analyzers? analyzer) { AnalyzerValue = analyzer; @@ -532,6 +508,12 @@ public HighlightFieldDescriptor ForceSource(bool? forceSource = true) return Self; } + public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) + { + FragmenterValue = fragmenter; + return Self; + } + public HighlightFieldDescriptor FragmentOffset(int? fragmentOffset) { FragmentOffsetValue = fragmentOffset; @@ -544,15 +526,33 @@ public HighlightFieldDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) + public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) { - FragmenterValue = fragmenter; + HighlightFilterValue = highlightFilter; return Self; } - public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) + public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.Query? highlightQuery) { - HighlightFilterValue = highlightFilter; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = null; + HighlightQueryValue = highlightQuery; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(QueryDsl.QueryDescriptor descriptor) + { + HighlightQueryValue = null; + HighlightQueryDescriptorAction = null; + HighlightQueryDescriptor = descriptor; + return Self; + } + + public HighlightFieldDescriptor HighlightQuery(Action configure) + { + HighlightQueryValue = null; + HighlightQueryDescriptor = null; + HighlightQueryDescriptorAction = configure; return Self; } @@ -637,22 +637,6 @@ public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Core.Search.H protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - if (AnalyzerValue is not null) { writer.WritePropertyName("analyzer"); @@ -689,6 +673,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ForceSourceValue.Value); } + if (FragmenterValue is not null) + { + writer.WritePropertyName("fragmenter"); + JsonSerializer.Serialize(writer, FragmenterValue, options); + } + if (FragmentOffsetValue.HasValue) { writer.WritePropertyName("fragment_offset"); @@ -701,18 +691,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(FragmentSizeValue.Value); } - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - if (HighlightFilterValue.HasValue) { writer.WritePropertyName("highlight_filter"); writer.WriteBooleanValue(HighlightFilterValue.Value); } + if (HighlightQueryDescriptor is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); + } + else if (HighlightQueryDescriptorAction is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); + } + else if (HighlightQueryValue is not null) + { + writer.WritePropertyName("highlight_query"); + JsonSerializer.Serialize(writer, HighlightQueryValue, options); + } + if (MatchedFieldsValue is not null) { writer.WritePropertyName("matched_fields"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs index 28436499e79..dcf68273f0c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs @@ -69,7 +69,8 @@ public sealed partial class InnerHits /// /// How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
///
- [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] + [JsonInclude, JsonPropertyName("sort")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] public ICollection? Sort { get; set; } [JsonInclude, JsonPropertyName("stored_field")] public Elastic.Clients.Elasticsearch.Fields? StoredField { get; set; } @@ -94,22 +95,22 @@ public InnerHitsDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action> DocvalueFieldsDescriptorAction { get; set; } private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } + private HighlightDescriptor HighlightDescriptor { get; set; } + private Action> HighlightDescriptorAction { get; set; } private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } + private Action>[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } @@ -174,6 +175,27 @@ public InnerHitsDescriptor DocvalueFields(params Action Explain(bool? explain = true) + { + ExplainValue = explain; + return Self; + } + + public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + { + FieldsValue = fields; + return Self; + } + + /// + /// Inner hit starting document offset. + /// + public InnerHitsDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -198,6 +220,42 @@ public InnerHitsDescriptor Highlight(Action IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + /// + /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
+ ///
+ public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) + { + NameValue = name; + return Self; + } + + public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The maximum number of hits to return per `inner_hits`. + /// + public InnerHitsDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
///
@@ -243,63 +301,6 @@ public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Core. return Self; } - public InnerHitsDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// Inner hit starting document offset. - /// - public InnerHitsDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
- ///
- public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) - { - NameValue = name; - return Self; - } - - public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The maximum number of hits to return per `inner_hits`. - /// - public InnerHitsDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - public InnerHitsDescriptor StoredField(Elastic.Clients.Elasticsearch.Fields? storedField) { StoredFieldValue = storedField; @@ -368,6 +369,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -384,6 +403,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -419,54 +468,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StoredFieldValue is not null) { writer.WritePropertyName("stored_field"); @@ -504,22 +505,22 @@ public InnerHitsDescriptor() : base() private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } private Action DocvalueFieldsDescriptorAction { get; set; } private Action[] DocvalueFieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } private int? FromValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } + private HighlightDescriptor HighlightDescriptor { get; set; } + private Action HighlightDescriptorAction { get; set; } private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } private IDictionary? ScriptFieldsValue { get; set; } private bool? SeqNoPrimaryTermValue { get; set; } private int? SizeValue { get; set; } + private ICollection? SortValue { get; set; } + private SortOptionsDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } + private Action[] SortDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? StoredFieldValue { get; set; } private bool? TrackScoresValue { get; set; } private bool? VersionValue { get; set; } @@ -584,6 +585,27 @@ public InnerHitsDescriptor DocvalueFields(params Action + /// Inner hit starting document offset. + /// + public InnerHitsDescriptor From(int? from) + { + FromValue = from; + return Self; + } + public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; @@ -608,6 +630,42 @@ public InnerHitsDescriptor Highlight(Action configure) return Self; } + public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + /// + /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
+ ///
+ public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) + { + NameValue = name; + return Self; + } + + public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) + { + ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) + { + SeqNoPrimaryTermValue = seqNoPrimaryTerm; + return Self; + } + + /// + /// The maximum number of hits to return per `inner_hits`. + /// + public InnerHitsDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + /// /// How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
///
@@ -653,63 +711,6 @@ public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.Sour return Self; } - public InnerHitsDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// Inner hit starting document offset. - /// - public InnerHitsDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
- ///
- public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) - { - NameValue = name; - return Self; - } - - public InnerHitsDescriptor ScriptFields(Func, FluentDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// The maximum number of hits to return per `inner_hits`. - /// - public InnerHitsDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - public InnerHitsDescriptor StoredField(Elastic.Clients.Elasticsearch.Fields? storedField) { StoredFieldValue = storedField; @@ -778,6 +779,24 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); } + if (ExplainValue.HasValue) + { + writer.WritePropertyName("explain"); + writer.WriteBooleanValue(ExplainValue.Value); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (FromValue.HasValue) + { + writer.WritePropertyName("from"); + writer.WriteNumberValue(FromValue.Value); + } + if (HighlightDescriptor is not null) { writer.WritePropertyName("highlight"); @@ -794,6 +813,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + + if (ScriptFieldsValue is not null) + { + writer.WritePropertyName("script_fields"); + JsonSerializer.Serialize(writer, ScriptFieldsValue, options); + } + + if (SeqNoPrimaryTermValue.HasValue) + { + writer.WritePropertyName("seq_no_primary_term"); + writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + if (SortDescriptor is not null) { writer.WritePropertyName("sort"); @@ -829,54 +878,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - if (StoredFieldValue is not null) { writer.WritePropertyName("stored_field"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs index 8e200156159..70cb6c8376c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs @@ -117,15 +117,15 @@ public PhraseSuggesterDescriptor() : base() { } - private ICollection? DirectGeneratorValue { get; set; } - private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } - private Action> DirectGeneratorDescriptorAction { get; set; } - private Action>[] DirectGeneratorDescriptorActions { get; set; } private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } private PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } private Action CollateDescriptorAction { get; set; } private double? ConfidenceValue { get; set; } + private ICollection? DirectGeneratorValue { get; set; } + private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } + private Action> DirectGeneratorDescriptorAction { get; set; } + private Action>[] DirectGeneratorDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private bool? ForceUnigramsValue { get; set; } private int? GramSizeValue { get; set; } @@ -143,45 +143,6 @@ public PhraseSuggesterDescriptor() : base() private string? TextValue { get; set; } private int? TokenLimitValue { get; set; } - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) - { - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorValue = directGenerator; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Action> configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptorAction = configure; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(params Action>[] configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = configure; - return Self; - } - public PhraseSuggesterDescriptor Analyzer(string? analyzer) { AnalyzerValue = analyzer; @@ -224,6 +185,45 @@ public PhraseSuggesterDescriptor Confidence(double? confidence) return Self; } + /// + /// A list of candidate generators that produce a list of possible terms per term in the given text. + /// + public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) + { + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorValue = directGenerator; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptor = descriptor; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(Action> configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptorAction = configure; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(params Action>[] configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = configure; + return Self; + } + public PhraseSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Field field) { FieldValue = field; @@ -365,6 +365,34 @@ public PhraseSuggesterDescriptor TokenLimit(int? tokenLimit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(AnalyzerValue)) + { + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); + } + + if (CollateDescriptor is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateDescriptor, options); + } + else if (CollateDescriptorAction is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); + } + else if (CollateValue is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateValue, options); + } + + if (ConfidenceValue.HasValue) + { + writer.WritePropertyName("confidence"); + writer.WriteNumberValue(ConfidenceValue.Value); + } + if (DirectGeneratorDescriptor is not null) { writer.WritePropertyName("direct_generator"); @@ -396,34 +424,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DirectGeneratorValue, options); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CollateDescriptor is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateDescriptor, options); - } - else if (CollateDescriptorAction is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); - } - else if (CollateValue is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateValue, options); - } - - if (ConfidenceValue.HasValue) - { - writer.WritePropertyName("confidence"); - writer.WriteNumberValue(ConfidenceValue.Value); - } - writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (ForceUnigramsValue.HasValue) @@ -524,15 +524,15 @@ public PhraseSuggesterDescriptor() : base() { } - private ICollection? DirectGeneratorValue { get; set; } - private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } - private Action DirectGeneratorDescriptorAction { get; set; } - private Action[] DirectGeneratorDescriptorActions { get; set; } private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } private PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } private Action CollateDescriptorAction { get; set; } private double? ConfidenceValue { get; set; } + private ICollection? DirectGeneratorValue { get; set; } + private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } + private Action DirectGeneratorDescriptorAction { get; set; } + private Action[] DirectGeneratorDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private bool? ForceUnigramsValue { get; set; } private int? GramSizeValue { get; set; } @@ -550,45 +550,6 @@ public PhraseSuggesterDescriptor() : base() private string? TextValue { get; set; } private int? TokenLimitValue { get; set; } - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) - { - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorValue = directGenerator; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Action configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptorAction = configure; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(params Action[] configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = configure; - return Self; - } - public PhraseSuggesterDescriptor Analyzer(string? analyzer) { AnalyzerValue = analyzer; @@ -631,6 +592,45 @@ public PhraseSuggesterDescriptor Confidence(double? confidence) return Self; } + /// + /// A list of candidate generators that produce a list of possible terms per term in the given text. + /// + public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) + { + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorValue = directGenerator; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(DirectGeneratorDescriptor descriptor) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptor = descriptor; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(Action configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorActions = null; + DirectGeneratorDescriptorAction = configure; + return Self; + } + + public PhraseSuggesterDescriptor DirectGenerator(params Action[] configure) + { + DirectGeneratorValue = null; + DirectGeneratorDescriptor = null; + DirectGeneratorDescriptorAction = null; + DirectGeneratorDescriptorActions = configure; + return Self; + } + public PhraseSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Field field) { FieldValue = field; @@ -778,6 +778,34 @@ public PhraseSuggesterDescriptor TokenLimit(int? tokenLimit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(AnalyzerValue)) + { + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); + } + + if (CollateDescriptor is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateDescriptor, options); + } + else if (CollateDescriptorAction is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); + } + else if (CollateValue is not null) + { + writer.WritePropertyName("collate"); + JsonSerializer.Serialize(writer, CollateValue, options); + } + + if (ConfidenceValue.HasValue) + { + writer.WritePropertyName("confidence"); + writer.WriteNumberValue(ConfidenceValue.Value); + } + if (DirectGeneratorDescriptor is not null) { writer.WritePropertyName("direct_generator"); @@ -809,34 +837,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DirectGeneratorValue, options); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CollateDescriptor is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateDescriptor, options); - } - else if (CollateDescriptorAction is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, new PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); - } - else if (CollateValue is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateValue, options); - } - - if (ConfidenceValue.HasValue) - { - writer.WritePropertyName("confidence"); - writer.WriteNumberValue(ConfidenceValue.Value); - } - writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); if (ForceUnigramsValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs index 794755186b0..b15a8dd16cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs @@ -53,55 +53,55 @@ public FieldSortDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } - private NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action> NestedDescriptorAction { get; set; } private string? FormatValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } + private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } + private NestedSortValueDescriptor NestedDescriptor { get; set; } + private Action> NestedDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.FieldSortNumericType? NumericTypeValue { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.FieldType? UnmappedTypeValue { get; set; } - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) + public FieldSortDescriptor Format(string? format) { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; + FormatValue = format; return Self; } - public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) + public FieldSortDescriptor Missing(FieldValue? missing) { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; + MissingValue = missing; return Self; } - public FieldSortDescriptor Nested(Action> configure) + public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; + ModeValue = mode; return Self; } - public FieldSortDescriptor Format(string? format) + public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) { - FormatValue = format; + NestedDescriptor = null; + NestedDescriptorAction = null; + NestedValue = nested; return Self; } - public FieldSortDescriptor Missing(FieldValue? missing) + public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) { - MissingValue = missing; + NestedValue = null; + NestedDescriptorAction = null; + NestedDescriptor = descriptor; return Self; } - public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) + public FieldSortDescriptor Nested(Action> configure) { - ModeValue = mode; + NestedValue = null; + NestedDescriptor = null; + NestedDescriptorAction = configure; return Self; } @@ -126,22 +126,6 @@ public FieldSortDescriptor UnmappedType(Elastic.Clients.Elasticsearch protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -160,6 +144,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } + if (NestedDescriptor is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedDescriptor, options); + } + else if (NestedDescriptorAction is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); + } + else if (NestedValue is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedValue, options); + } + if (NumericTypeValue is not null) { writer.WritePropertyName("numeric_type"); @@ -190,55 +190,55 @@ public FieldSortDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } - private NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action NestedDescriptorAction { get; set; } private string? FormatValue { get; set; } private FieldValue? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } + private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } + private NestedSortValueDescriptor NestedDescriptor { get; set; } + private Action NestedDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.FieldSortNumericType? NumericTypeValue { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.FieldType? UnmappedTypeValue { get; set; } - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) + public FieldSortDescriptor Format(string? format) { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; + FormatValue = format; return Self; } - public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) + public FieldSortDescriptor Missing(FieldValue? missing) { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; + MissingValue = missing; return Self; } - public FieldSortDescriptor Nested(Action configure) + public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; + ModeValue = mode; return Self; } - public FieldSortDescriptor Format(string? format) + public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) { - FormatValue = format; + NestedDescriptor = null; + NestedDescriptorAction = null; + NestedValue = nested; return Self; } - public FieldSortDescriptor Missing(FieldValue? missing) + public FieldSortDescriptor Nested(NestedSortValueDescriptor descriptor) { - MissingValue = missing; + NestedValue = null; + NestedDescriptorAction = null; + NestedDescriptor = descriptor; return Self; } - public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) + public FieldSortDescriptor Nested(Action configure) { - ModeValue = mode; + NestedValue = null; + NestedDescriptor = null; + NestedDescriptorAction = configure; return Self; } @@ -263,22 +263,6 @@ public FieldSortDescriptor UnmappedType(Elastic.Clients.Elasticsearch.Mapping.Fi protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -297,6 +281,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } + if (NestedDescriptor is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedDescriptor, options); + } + else if (NestedDescriptorAction is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, new NestedSortValueDescriptor(NestedDescriptorAction), options); + } + else if (NestedValue is not null) + { + writer.WritePropertyName("nested"); + JsonSerializer.Serialize(writer, NestedValue, options); + } + if (NumericTypeValue is not null) { writer.WritePropertyName("numeric_type"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs index bec6d32aa86..dafd354a813 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs @@ -38,7 +38,8 @@ public sealed partial class AddAction /// /// Aliases for the action.
Index alias names support date math.
///
- [JsonInclude, JsonPropertyName("aliases"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexAlias))] + [JsonInclude, JsonPropertyName("aliases")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexAlias))] public ICollection? Aliases { get; set; } /// @@ -106,11 +107,11 @@ public AddActionDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } + private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndicesValue { get; set; } @@ -120,6 +121,24 @@ public AddActionDescriptor() : base() private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + /// + /// Alias for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + /// + /// Aliases for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Aliases(ICollection? aliases) + { + AliasesValue = aliases; + return Self; + } + /// /// Query used to limit documents the alias can access. /// @@ -147,24 +166,6 @@ public AddActionDescriptor Filter(Action - /// Alias for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// Aliases for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - /// /// Data stream or index for the action.
Supports wildcards (`*`).
///
@@ -240,6 +241,18 @@ public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -256,18 +269,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - if (IndexValue is not null) { writer.WritePropertyName("index"); @@ -328,11 +329,11 @@ public AddActionDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } + private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndicesValue { get; set; } @@ -342,6 +343,24 @@ public AddActionDescriptor() : base() private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + /// + /// Alias for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + /// + /// Aliases for the action.
Index alias names support date math.
+ ///
+ public AddActionDescriptor Aliases(ICollection? aliases) + { + AliasesValue = aliases; + return Self; + } + /// /// Query used to limit documents the alias can access. /// @@ -369,24 +388,6 @@ public AddActionDescriptor Filter(Action configure) return Self; } - /// - /// Alias for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// Aliases for the action.
Index alias names support date math.
- ///
- public AddActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - /// /// Data stream or index for the action.
Supports wildcards (`*`).
///
@@ -462,6 +463,18 @@ public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -478,18 +491,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - if (IndexValue is not null) { writer.WritePropertyName("index"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs index 0135afc6708..4ec50652edb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs @@ -77,6 +77,18 @@ public sealed partial class DataStream [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } + /// + /// Name of the lifecycle system that'll manage the next generation of the data stream. + /// + [JsonInclude, JsonPropertyName("next_generation_managed_by")] + public string NextGenerationManagedBy { get; init; } + + /// + /// Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream. + /// + [JsonInclude, JsonPropertyName("prefer_ilm")] + public bool PreferIlm { get; init; } + /// /// If `true`, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs index 45a6fc8ef89..1a533d18a4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs @@ -29,6 +29,12 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class DataStreamIndex { + /// + /// Name of the current ILM lifecycle policy configured for this backing index. + /// + [JsonInclude, JsonPropertyName("ilm_policy")] + public string? IlmPolicy { get; init; } + /// /// Name of the backing index. /// @@ -40,4 +46,16 @@ public sealed partial class DataStreamIndex /// [JsonInclude, JsonPropertyName("index_uuid")] public string IndexUuid { get; init; } + + /// + /// Name of the lifecycle system that's currently managing this backing index. + /// + [JsonInclude, JsonPropertyName("managed_by")] + public string ManagedBy { get; init; } + + /// + /// Indicates if ILM should take precedence over DSL in case both are configured to manage this index. + /// + [JsonInclude, JsonPropertyName("prefer_ilm")] + public bool PreferIlm { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs index 59844e8ec9a..97f5d01376a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs @@ -31,11 +31,14 @@ public sealed partial class IndexSegmentSort { [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Fields? Field { get; set; } - [JsonInclude, JsonPropertyName("missing"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.SegmentSortMissing))] + [JsonInclude, JsonPropertyName("missing")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.SegmentSortMissing))] public ICollection? Missing { get; set; } - [JsonInclude, JsonPropertyName("mode"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.SegmentSortMode))] + [JsonInclude, JsonPropertyName("mode")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.SegmentSortMode))] public ICollection? Mode { get; set; } - [JsonInclude, JsonPropertyName("order"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.SegmentSortOrder))] + [JsonInclude, JsonPropertyName("order")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.SegmentSortOrder))] public ICollection? Order { get; set; } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs index 35c00f5c7a6..4dd2d92cf68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -316,12 +316,6 @@ public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert continue; } - if (property == "shards") - { - variant.Shards = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "similarity") { variant.Similarity = JsonSerializer.Deserialize(ref reader, options); @@ -680,12 +674,6 @@ public override void Write(Utf8JsonWriter writer, IndexSettings value, JsonSeria JsonSerializer.Serialize(writer, value.Settings, options); } - if (value.Shards.HasValue) - { - writer.WritePropertyName("shards"); - writer.WriteNumberValue(value.Shards.Value); - } - if (value.Similarity is not null) { writer.WritePropertyName("similarity"); @@ -814,7 +802,6 @@ public sealed partial class IndexSettings public ICollection? RoutingPath { get; set; } public Elastic.Clients.Elasticsearch.IndexManagement.SettingsSearch? Search { get; set; } public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Settings { get; set; } - public int? Shards { get; set; } /// /// Configure custom similarity settings to customize how search results are scored. @@ -843,15 +830,6 @@ public IndexSettingsDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexValue { get; set; } - private IndexSettingsDescriptor IndexDescriptor { get; set; } - private Action> IndexDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } - private IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? SortValue { get; set; } - private IndexSegmentSortDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; } private IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; } private Action AnalysisDescriptorAction { get; set; } @@ -874,6 +852,9 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight? HighlightValue { get; set; } private SettingsHighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexValue { get; set; } + private IndexSettingsDescriptor IndexDescriptor { get; set; } + private Action> IndexDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; } private IndexingPressureDescriptor IndexingPressureDescriptor { get; set; } private Action IndexingPressureDescriptorAction { get; set; } @@ -923,13 +904,18 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexManagement.SettingsSearch? SearchValue { get; set; } private SettingsSearchDescriptor SearchDescriptor { get; set; } private Action SearchDescriptorAction { get; set; } - private int? ShardsValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } + private IndexSettingsDescriptor SettingsDescriptor { get; set; } + private Action> SettingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity? SimilarityValue { get; set; } private SettingsSimilarityDescriptor SimilarityDescriptor { get; set; } private Action SimilarityDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; } private SoftDeletesDescriptor SoftDeletesDescriptor { get; set; } private Action SoftDeletesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? SortValue { get; set; } + private IndexSegmentSortDescriptor SortDescriptor { get; set; } + private Action> SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.Storage? StoreValue { get; set; } private StorageDescriptor StoreDescriptor { get; set; } private Action StoreDescriptorAction { get; set; } @@ -946,78 +932,6 @@ public IndexSettingsDescriptor() : base() private IndexVersioningDescriptor VersionDescriptor { get; set; } private Action VersionDescriptorAction { get; set; } - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Index(Action> configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsAnalysis? analysis) { AnalysisDescriptor = null; @@ -1177,6 +1091,30 @@ public IndexSettingsDescriptor Highlight(Action Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? index) + { + IndexDescriptor = null; + IndexDescriptorAction = null; + IndexValue = index; + return Self; + } + + public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) + { + IndexValue = null; + IndexDescriptorAction = null; + IndexDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Index(Action> configure) + { + IndexValue = null; + IndexDescriptor = null; + IndexDescriptorAction = configure; + return Self; + } + /// /// Configure indexing back pressure limits. /// @@ -1531,9 +1469,27 @@ public IndexSettingsDescriptor Search(Action Shards(int? shards) + public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) { - ShardsValue = shards; + SettingsDescriptor = null; + SettingsDescriptorAction = null; + SettingsValue = settings; + return Self; + } + + public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) + { + SettingsValue = null; + SettingsDescriptorAction = null; + SettingsDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Settings(Action> configure) + { + SettingsValue = null; + SettingsDescriptor = null; + SettingsDescriptorAction = configure; return Self; } @@ -1588,6 +1544,30 @@ public IndexSettingsDescriptor SoftDeletes(Action Sort(Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortValue = sort; + return Self; + } + + public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Sort(Action> configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = configure; + return Self; + } + /// /// The store module allows you to control how index data is stored and accessed on disk. /// @@ -1708,54 +1688,6 @@ public IndexSettingsDescriptor Version(Action(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - if (AnalysisDescriptor is not null) { writer.WritePropertyName("analysis"); @@ -1880,6 +1812,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndexDescriptor is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexDescriptor, options); + } + else if (IndexDescriptorAction is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(IndexDescriptorAction), options); + } + else if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (IndexingPressureDescriptor is not null) { writer.WritePropertyName("indexing_pressure"); @@ -2150,10 +2098,20 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SearchValue, options); } - if (ShardsValue.HasValue) + if (SettingsDescriptor is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsDescriptor, options); + } + else if (SettingsDescriptorAction is not null) { - writer.WritePropertyName("shards"); - writer.WriteNumberValue(ShardsValue.Value); + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); + } + else if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); } if (SimilarityDescriptor is not null) @@ -2188,6 +2146,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SoftDeletesValue, options); } + if (SortDescriptor is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortDescriptor, options); + } + else if (SortDescriptorAction is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); + } + else if (SortValue is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortValue, options); + } + if (StoreDescriptor is not null) { writer.WritePropertyName("store"); @@ -2291,15 +2265,6 @@ public IndexSettingsDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexValue { get; set; } - private IndexSettingsDescriptor IndexDescriptor { get; set; } - private Action IndexDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } - private IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? SortValue { get; set; } - private IndexSegmentSortDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; } private IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; } private Action AnalysisDescriptorAction { get; set; } @@ -2322,6 +2287,9 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight? HighlightValue { get; set; } private SettingsHighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexValue { get; set; } + private IndexSettingsDescriptor IndexDescriptor { get; set; } + private Action IndexDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; } private IndexingPressureDescriptor IndexingPressureDescriptor { get; set; } private Action IndexingPressureDescriptorAction { get; set; } @@ -2371,13 +2339,18 @@ public IndexSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexManagement.SettingsSearch? SearchValue { get; set; } private SettingsSearchDescriptor SearchDescriptor { get; set; } private Action SearchDescriptorAction { get; set; } - private int? ShardsValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } + private IndexSettingsDescriptor SettingsDescriptor { get; set; } + private Action SettingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity? SimilarityValue { get; set; } private SettingsSimilarityDescriptor SimilarityDescriptor { get; set; } private Action SimilarityDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; } private SoftDeletesDescriptor SoftDeletesDescriptor { get; set; } private Action SoftDeletesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? SortValue { get; set; } + private IndexSegmentSortDescriptor SortDescriptor { get; set; } + private Action SortDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.Storage? StoreValue { get; set; } private StorageDescriptor StoreDescriptor { get; set; } private Action StoreDescriptorAction { get; set; } @@ -2394,78 +2367,6 @@ public IndexSettingsDescriptor() : base() private IndexVersioningDescriptor VersionDescriptor { get; set; } private Action VersionDescriptorAction { get; set; } - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Index(Action configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsAnalysis? analysis) { AnalysisDescriptor = null; @@ -2625,6 +2526,30 @@ public IndexSettingsDescriptor Highlight(Action con return Self; } + public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? index) + { + IndexDescriptor = null; + IndexDescriptorAction = null; + IndexValue = index; + return Self; + } + + public IndexSettingsDescriptor Index(IndexSettingsDescriptor descriptor) + { + IndexValue = null; + IndexDescriptorAction = null; + IndexDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Index(Action configure) + { + IndexValue = null; + IndexDescriptor = null; + IndexDescriptorAction = configure; + return Self; + } + /// /// Configure indexing back pressure limits. /// @@ -2979,9 +2904,27 @@ public IndexSettingsDescriptor Search(Action configure return Self; } - public IndexSettingsDescriptor Shards(int? shards) + public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) + { + SettingsDescriptor = null; + SettingsDescriptorAction = null; + SettingsValue = settings; + return Self; + } + + public IndexSettingsDescriptor Settings(IndexSettingsDescriptor descriptor) + { + SettingsValue = null; + SettingsDescriptorAction = null; + SettingsDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Settings(Action configure) { - ShardsValue = shards; + SettingsValue = null; + SettingsDescriptor = null; + SettingsDescriptorAction = configure; return Self; } @@ -3036,6 +2979,30 @@ public IndexSettingsDescriptor SoftDeletes(Action configu return Self; } + public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.IndexManagement.IndexSegmentSort? sort) + { + SortDescriptor = null; + SortDescriptorAction = null; + SortValue = sort; + return Self; + } + + public IndexSettingsDescriptor Sort(IndexSegmentSortDescriptor descriptor) + { + SortValue = null; + SortDescriptorAction = null; + SortDescriptor = descriptor; + return Self; + } + + public IndexSettingsDescriptor Sort(Action configure) + { + SortValue = null; + SortDescriptor = null; + SortDescriptorAction = configure; + return Self; + } + /// /// The store module allows you to control how index data is stored and accessed on disk. /// @@ -3156,54 +3123,6 @@ public IndexSettingsDescriptor Version(Action configu protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - if (AnalysisDescriptor is not null) { writer.WritePropertyName("analysis"); @@ -3328,6 +3247,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, HighlightValue, options); } + if (IndexDescriptor is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexDescriptor, options); + } + else if (IndexDescriptorAction is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(IndexDescriptorAction), options); + } + else if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (IndexingPressureDescriptor is not null) { writer.WritePropertyName("indexing_pressure"); @@ -3598,10 +3533,20 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SearchValue, options); } - if (ShardsValue.HasValue) + if (SettingsDescriptor is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsDescriptor, options); + } + else if (SettingsDescriptorAction is not null) { - writer.WritePropertyName("shards"); - writer.WriteNumberValue(ShardsValue.Value); + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, new IndexSettingsDescriptor(SettingsDescriptorAction), options); + } + else if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); } if (SimilarityDescriptor is not null) @@ -3636,6 +3581,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SoftDeletesValue, options); } + if (SortDescriptor is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortDescriptor, options); + } + else if (SortDescriptorAction is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, new IndexSegmentSortDescriptor(SortDescriptorAction), options); + } + else if (SortValue is not null) + { + writer.WritePropertyName("sort"); + JsonSerializer.Serialize(writer, SortValue, options); + } + if (StoreDescriptor is not null) { writer.WritePropertyName("store"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs index 16081bbc69c..d895b0a286f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs @@ -51,8 +51,8 @@ public IndexSettingsAnalysisDescriptor() : base() private Elastic.Clients.Elasticsearch.Analysis.Analyzers? AnalyzersValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.CharFilters? CharFiltersValue { get; set; } - private Elastic.Clients.Elasticsearch.Analysis.TokenFilters? TokenFiltersValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.Normalizers? NormalizersValue { get; set; } + private Elastic.Clients.Elasticsearch.Analysis.TokenFilters? TokenFiltersValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.Tokenizers? TokenizersValue { get; set; } public IndexSettingsAnalysisDescriptor Analyzers(Elastic.Clients.Elasticsearch.Analysis.Analyzers? analyzers) @@ -95,43 +95,43 @@ public IndexSettingsAnalysisDescriptor CharFilters(Action configure) + public IndexSettingsAnalysisDescriptor Normalizers(Action configure) { - var descriptor = new Analysis.TokenFiltersDescriptor(); + var descriptor = new Analysis.NormalizersDescriptor(); configure?.Invoke(descriptor); - TokenFiltersValue = descriptor.PromisedValue; + NormalizersValue = descriptor.PromisedValue; return Self; } - public IndexSettingsAnalysisDescriptor Normalizers(Elastic.Clients.Elasticsearch.Analysis.Normalizers? normalizers) + public IndexSettingsAnalysisDescriptor TokenFilters(Elastic.Clients.Elasticsearch.Analysis.TokenFilters? tokenFilters) { - NormalizersValue = normalizers; + TokenFiltersValue = tokenFilters; return Self; } - public IndexSettingsAnalysisDescriptor Normalizers(Analysis.NormalizersDescriptor descriptor) + public IndexSettingsAnalysisDescriptor TokenFilters(Analysis.TokenFiltersDescriptor descriptor) { - NormalizersValue = descriptor.PromisedValue; + TokenFiltersValue = descriptor.PromisedValue; return Self; } - public IndexSettingsAnalysisDescriptor Normalizers(Action configure) + public IndexSettingsAnalysisDescriptor TokenFilters(Action configure) { - var descriptor = new Analysis.NormalizersDescriptor(); + var descriptor = new Analysis.TokenFiltersDescriptor(); configure?.Invoke(descriptor); - NormalizersValue = descriptor.PromisedValue; + TokenFiltersValue = descriptor.PromisedValue; return Self; } @@ -170,18 +170,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CharFiltersValue, options); } - if (TokenFiltersValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, TokenFiltersValue, options); - } - if (NormalizersValue is not null) { writer.WritePropertyName("normalizer"); JsonSerializer.Serialize(writer, NormalizersValue, options); } + if (TokenFiltersValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, TokenFiltersValue, options); + } + if (TokenizersValue is not null) { writer.WritePropertyName("tokenizer"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs index 54ef1808ff3..c407ecd45a4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexState.g.cs @@ -59,20 +59,32 @@ public IndexStateDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.DataStreamName? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? DefaultsValue { get; set; } private IndexSettingsDescriptor DefaultsDescriptor { get; set; } private Action> DefaultsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action> MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action> SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.DataStreamName? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + public IndexStateDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.DataStreamName? dataStream) + { + DataStreamValue = dataStream; + return Self; + } /// /// Default settings, included when the request's `include_default` is `true`. @@ -101,6 +113,33 @@ public IndexStateDescriptor Defaults(Action + /// Data lifecycle applicable if this is a data stream. + /// + public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexStateDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) { MappingsDescriptor = null; @@ -149,48 +188,21 @@ public IndexStateDescriptor Settings(Action Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.DataStreamName? dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// Data lifecycle applicable if this is a data stream. - /// - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + if (DefaultsDescriptor is not null) { writer.WritePropertyName("defaults"); @@ -207,6 +219,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DefaultsValue, options); } + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -239,34 +267,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } @@ -279,20 +279,32 @@ public IndexStateDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.DataStreamName? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? DefaultsValue { get; set; } private IndexSettingsDescriptor DefaultsDescriptor { get; set; } private Action DefaultsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.DataStreamName? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + public IndexStateDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.DataStreamName? dataStream) + { + DataStreamValue = dataStream; + return Self; + } /// /// Default settings, included when the request's `include_default` is `true`. @@ -321,6 +333,33 @@ public IndexStateDescriptor Defaults(Action configure) return Self; } + /// + /// Data lifecycle applicable if this is a data stream. + /// + public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexStateDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) { MappingsDescriptor = null; @@ -369,48 +408,21 @@ public IndexStateDescriptor Settings(Action configure) return Self; } - public IndexStateDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.DataStreamName? dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// Data lifecycle applicable if this is a data stream. - /// - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexStateDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + if (DefaultsDescriptor is not null) { writer.WritePropertyName("defaults"); @@ -427,6 +439,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DefaultsValue, options); } + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -459,34 +487,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs index 7eee240ee80..6cb440dd3cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs @@ -58,16 +58,49 @@ public IndexTemplateMappingDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action> MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action> SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + /// + /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
+ ///
+ public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } /// /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
@@ -123,42 +156,31 @@ public IndexTemplateMappingDescriptor Settings(Action - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -191,28 +213,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } @@ -225,16 +225,49 @@ public IndexTemplateMappingDescriptor() : base() { } + private IDictionary? AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } + private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } private Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } private Action MappingsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } private IndexSettingsDescriptor SettingsDescriptor { get; set; } private Action SettingsDescriptorAction { get; set; } - private IDictionary? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } + + /// + /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
+ ///
+ public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexTemplateMappingDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } /// /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
@@ -290,42 +323,31 @@ public IndexTemplateMappingDescriptor Settings(Action c return Self; } - /// - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateMappingDescriptor Aliases(Func, FluentDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + if (MappingsDescriptor is not null) { writer.WritePropertyName("mappings"); @@ -358,28 +380,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SettingsValue, options); } - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs index 9e8c151bc1a..b2c5bc768e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class MappingLimitSettingsDimensionFields { /// - /// [preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will
apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ /// [preview] This functionality is in technical preview and may be changed or removed in a future release.
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
///
[JsonInclude, JsonPropertyName("limit")] public int? Limit { get; set; } @@ -47,7 +47,7 @@ public MappingLimitSettingsDimensionFieldsDescriptor() : base() private int? LimitValue { get; set; } /// - /// [preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will
apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ /// [preview] This functionality is in technical preview and may be changed or removed in a future release.
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
///
public MappingLimitSettingsDimensionFieldsDescriptor Limit(int? limit) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs index 14a88551964..c69247a04d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs @@ -38,7 +38,8 @@ public sealed partial class RemoveAction /// /// Aliases for the action.
Index alias names support date math.
///
- [JsonInclude, JsonPropertyName("aliases"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexAlias))] + [JsonInclude, JsonPropertyName("aliases")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.IndexAlias))] public ICollection? Aliases { get; set; } /// 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 2b6c37aec2f..7e2f967e813 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -68,54 +68,18 @@ public AppendProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private bool? AllowDuplicatesValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private ICollection ValueValue { get; set; } - public AppendProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// If `false`, the processor does not append values already present in the field. /// @@ -161,6 +125,42 @@ public AppendProcessorDescriptor IgnoreFailure(bool? ignoreFailure = return Self; } + public AppendProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AppendProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public AppendProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -179,6 +179,32 @@ public AppendProcessorDescriptor Value(ICollection value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowDuplicatesValue.HasValue) + { + writer.WritePropertyName("allow_duplicates"); + writer.WriteBooleanValue(AllowDuplicatesValue.Value); + } + + 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -210,32 +236,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (AllowDuplicatesValue.HasValue) - { - writer.WritePropertyName("allow_duplicates"); - writer.WriteBooleanValue(AllowDuplicatesValue.Value); - } - - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -256,54 +256,18 @@ public AppendProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private bool? AllowDuplicatesValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private ICollection ValueValue { get; set; } - public AppendProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// If `false`, the processor does not append values already present in the field. /// @@ -358,6 +322,42 @@ public AppendProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public AppendProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AppendProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AppendProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public AppendProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -376,6 +376,32 @@ public AppendProcessorDescriptor Value(ICollection value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowDuplicatesValue.HasValue) + { + writer.WritePropertyName("allow_duplicates"); + writer.WriteBooleanValue(AllowDuplicatesValue.Value); + } + + 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -407,32 +433,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (AllowDuplicatesValue.HasValue) - { - writer.WritePropertyName("allow_duplicates"); - writer.WriteBooleanValue(AllowDuplicatesValue.Value); - } - - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs index 3fd43491d7a..f6f0d705e87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs @@ -93,10 +93,6 @@ public AttachmentProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } @@ -104,47 +100,15 @@ public AttachmentProcessorDescriptor() : base() private bool? IgnoreMissingValue { get; set; } private long? IndexedCharsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? IndexedCharsFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? ResourceNameValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public AttachmentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -217,6 +181,42 @@ public AttachmentProcessorDescriptor IndexedCharsField(Expres return Self; } + public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Array of properties to select to be stored.
Can be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`.
///
@@ -262,37 +262,6 @@ public AttachmentProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -331,6 +300,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IndexedCharsFieldValue, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -367,10 +367,6 @@ public AttachmentProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } @@ -378,47 +374,15 @@ public AttachmentProcessorDescriptor() : base() private bool? IgnoreMissingValue { get; set; } private long? IndexedCharsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? IndexedCharsFieldValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? ResourceNameValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public AttachmentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -509,6 +473,42 @@ public AttachmentProcessorDescriptor IndexedCharsField(Expression? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public AttachmentProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Array of properties to select to be stored.
Can be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`.
///
@@ -563,37 +563,6 @@ public AttachmentProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public BytesProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public BytesProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public BytesProcessorDescriptor IgnoreMissing(bool? ignoreMissing = t return Self; } + public BytesProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public BytesProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public BytesProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public BytesProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public BytesProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public BytesProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public BytesProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public BytesProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public BytesProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public BytesProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public BytesProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public BytesProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private double ErrorDistanceValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Ingest.ShapeType ShapeTypeValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public CircleProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CircleProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -185,6 +149,42 @@ public CircleProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public CircleProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CircleProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Which field mapping type is to be used when processing the circle: `geo_shape` or `shape`. /// @@ -221,6 +221,34 @@ public CircleProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private double ErrorDistanceValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Ingest.ShapeType ShapeTypeValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public CircleProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CircleProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -419,6 +383,42 @@ public CircleProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public CircleProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CircleProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CircleProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Which field mapping type is to be used when processing the circle: `geo_shape` or `shape`. /// @@ -464,6 +464,34 @@ public CircleProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Ingest.ConvertType TypeValue { get; set; } - public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public ConvertProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -169,6 +133,42 @@ public ConvertProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public ConvertProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -205,6 +205,32 @@ public ConvertProcessorDescriptor Type(Elastic.Clients.Elasticsearch. 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"); @@ -236,32 +262,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -288,55 +288,19 @@ public ConvertProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Ingest.ConvertType TypeValue { get; set; } - public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public ConvertProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -391,6 +355,42 @@ public ConvertProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public ConvertProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public ConvertProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -436,6 +436,32 @@ public ConvertProcessorDescriptor Type(Elastic.Clients.Elasticsearch.Ingest.Conv 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"); @@ -467,32 +493,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs index 822929e3c32..8760d328fb2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs @@ -93,58 +93,22 @@ public CsvProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private object? EmptyValueValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? QuoteValue { get; set; } private string? SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Fields TargetFieldsValue { get; set; } private bool? TrimValue { get; set; } - public CsvProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CsvProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -199,6 +163,42 @@ public CsvProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tru return Self; } + public CsvProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CsvProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Quote used in CSV, has to be single character string. /// @@ -244,37 +244,6 @@ public CsvProcessorDescriptor Trim(bool? trim = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -307,6 +276,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(QuoteValue)) { writer.WritePropertyName("quote"); @@ -345,58 +345,22 @@ public CsvProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private object? EmptyValueValue { 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? QuoteValue { get; set; } private string? SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Fields TargetFieldsValue { get; set; } private bool? TrimValue { get; set; } - public CsvProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public CsvProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -460,6 +424,42 @@ public CsvProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public CsvProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public CsvProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public CsvProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Quote used in CSV, has to be single character string. /// @@ -505,37 +505,6 @@ public CsvProcessorDescriptor Trim(bool? trim = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -568,6 +537,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(QuoteValue)) { writer.WritePropertyName("quote"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs index 2b8cc759589..d1304d6f130 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs @@ -92,10 +92,6 @@ public DateIndexNameProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private ICollection DateFormatsValue { get; set; } private string DateRoundingValue { get; set; } private string? DescriptionValue { get; set; } @@ -105,45 +101,13 @@ public DateIndexNameProcessorDescriptor() : base() private string? IndexNameFormatValue { get; set; } private string? IndexNamePrefixValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private string? TimezoneValue { get; set; } - public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.
Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
///
@@ -225,6 +189,42 @@ public DateIndexNameProcessorDescriptor Locale(string? locale) return Self; } + public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateIndexNameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -243,37 +243,6 @@ public DateIndexNameProcessorDescriptor Timezone(string? timezone) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - writer.WritePropertyName("date_formats"); JsonSerializer.Serialize(writer, DateFormatsValue, options); writer.WritePropertyName("date_rounding"); @@ -316,6 +285,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(LocaleValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -340,10 +340,6 @@ public DateIndexNameProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private ICollection DateFormatsValue { get; set; } private string DateRoundingValue { get; set; } private string? DescriptionValue { get; set; } @@ -353,45 +349,13 @@ public DateIndexNameProcessorDescriptor() : base() private string? IndexNameFormatValue { get; set; } private string? IndexNamePrefixValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private string? TimezoneValue { get; set; } - public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.
Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
///
@@ -482,6 +446,42 @@ public DateIndexNameProcessorDescriptor Locale(string? locale) return Self; } + public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateIndexNameProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateIndexNameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -500,37 +500,6 @@ public DateIndexNameProcessorDescriptor Timezone(string? timezone) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - writer.WritePropertyName("date_formats"); JsonSerializer.Serialize(writer, DateFormatsValue, options); writer.WritePropertyName("date_rounding"); @@ -573,6 +542,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(LocaleValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs index cc660104868..02f2d12565e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs @@ -81,56 +81,20 @@ public DateProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private ICollection FormatsValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } private string? TimezoneValue { get; set; } - public DateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DateProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -185,6 +149,42 @@ public DateProcessorDescriptor Locale(string? locale) return Self; } + public DateProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -221,6 +221,34 @@ public DateProcessorDescriptor Timezone(string? timezone) 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); + writer.WritePropertyName("formats"); + JsonSerializer.Serialize(writer, FormatsValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (!string.IsNullOrEmpty(LocaleValue)) + { + writer.WritePropertyName("locale"); + writer.WriteStringValue(LocaleValue); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -252,34 +280,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("formats"); - JsonSerializer.Serialize(writer, FormatsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -310,56 +310,20 @@ public DateProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private ICollection FormatsValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? LocaleValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } private string? TimezoneValue { get; set; } - public DateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DateProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -423,6 +387,42 @@ public DateProcessorDescriptor Locale(string? locale) return Self; } + public DateProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DateProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DateProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DateProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public DateProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -468,6 +468,34 @@ public DateProcessorDescriptor Timezone(string? timezone) 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); + writer.WritePropertyName("formats"); + JsonSerializer.Serialize(writer, FormatsValue, options); + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (!string.IsNullOrEmpty(LocaleValue)) + { + writer.WritePropertyName("locale"); + writer.WriteStringValue(LocaleValue); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -499,34 +527,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("formats"); - JsonSerializer.Serialize(writer, FormatsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs index b4164216f18..a7b083ffe65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs @@ -74,55 +74,19 @@ public DissectProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? AppendSeparatorValue { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string? TagValue { get; set; } - public DissectProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The character(s) that separate the appended fields. /// @@ -177,6 +141,42 @@ public DissectProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public DissectProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DissectProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to apply to the field. /// @@ -195,37 +195,6 @@ public DissectProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(AppendSeparatorValue)) { writer.WritePropertyName("append_separator"); @@ -258,6 +227,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + writer.WritePropertyName("pattern"); writer.WriteStringValue(PatternValue); if (!string.IsNullOrEmpty(TagValue)) @@ -278,55 +278,19 @@ public DissectProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? AppendSeparatorValue { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string? TagValue { get; set; } - public DissectProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The character(s) that separate the appended fields. /// @@ -390,6 +354,42 @@ public DissectProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public DissectProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DissectProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DissectProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to apply to the field. /// @@ -408,37 +408,6 @@ public DissectProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(AppendSeparatorValue)) { writer.WritePropertyName("append_separator"); @@ -471,6 +440,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + writer.WritePropertyName("pattern"); writer.WriteStringValue(PatternValue); if (!string.IsNullOrEmpty(TagValue)) 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 dc7544cd246..36a5b18c094 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs @@ -63,53 +63,17 @@ public DotExpanderProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } - public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DotExpanderProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public DotExpanderProcessorDescriptor IgnoreFailure(bool? ignoreFailu return Self; } + public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The field that contains the field to expand.
Only required if the field to expand is part another object field, because the `field` option can only understand leaf fields.
///
@@ -164,6 +164,26 @@ public DotExpanderProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -195,26 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); @@ -239,53 +239,17 @@ public DotExpanderProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? PathValue { get; set; } private string? TagValue { get; set; } - public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public DotExpanderProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -331,6 +295,42 @@ public DotExpanderProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public DotExpanderProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The field that contains the field to expand.
Only required if the field to expand is part another object field, because the `field` option can only understand leaf fields.
///
@@ -349,6 +349,26 @@ public DotExpanderProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -380,26 +400,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(PathValue)) { writer.WritePropertyName("path"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs index b6e2ef4e742..a1bd4ec8319 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs @@ -51,15 +51,33 @@ public DropProcessorDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } private string? TagValue { get; set; } + public DropProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public DropProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + public DropProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -96,24 +114,6 @@ public DropProcessorDescriptor OnFailure(params Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public DropProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - public DropProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -123,6 +123,24 @@ public DropProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -154,24 +172,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -190,15 +190,33 @@ public DropProcessorDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } private string? TagValue { get; set; } + public DropProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public DropProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + public DropProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -235,24 +253,6 @@ public DropProcessorDescriptor OnFailure(params Action[] co return Self; } - public DropProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public DropProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - public DropProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -262,6 +262,24 @@ public DropProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -293,24 +311,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs index 95d63f90eb3..e0ade8a97eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs @@ -93,58 +93,22 @@ public EnrichProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 int? MaxMatchesValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string PolicyNameValue { get; set; } private Elastic.Clients.Elasticsearch.GeoShapeRelation? ShapeRelationValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field TargetFieldValue { get; set; } - public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public EnrichProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -199,6 +163,42 @@ public EnrichProcessorDescriptor MaxMatches(int? maxMatches) return Self; } + public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -253,37 +253,6 @@ public EnrichProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -316,6 +285,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxMatchesValue.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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (OverrideValue.HasValue) { writer.WritePropertyName("override"); @@ -350,58 +350,22 @@ public EnrichProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 int? MaxMatchesValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string PolicyNameValue { get; set; } private Elastic.Clients.Elasticsearch.GeoShapeRelation? ShapeRelationValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field TargetFieldValue { get; set; } - public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public EnrichProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -465,6 +429,42 @@ public EnrichProcessorDescriptor MaxMatches(int? maxMatches) return Self; } + public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public EnrichProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -528,37 +528,6 @@ public EnrichProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string MessageValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } + public FailProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public FailProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// The error message thrown by the processor.
Supports template snippets.
+ ///
+ public FailProcessorDescriptor Message(string message) + { + MessageValue = message; + return Self; + } + public FailProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -103,33 +130,6 @@ public FailProcessorDescriptor OnFailure(params Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public FailProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The error message thrown by the processor.
Supports template snippets.
- ///
- public FailProcessorDescriptor Message(string message) - { - MessageValue = message; - return Self; - } - public FailProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -139,6 +139,26 @@ public FailProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + writer.WritePropertyName("message"); + writer.WriteStringValue(MessageValue); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -170,26 +190,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - writer.WritePropertyName("message"); - writer.WriteStringValue(MessageValue); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -208,16 +208,43 @@ public FailProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string MessageValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } + public FailProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + public FailProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// The error message thrown by the processor.
Supports template snippets.
+ ///
+ public FailProcessorDescriptor Message(string message) + { + MessageValue = message; + return Self; + } + public FailProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -254,33 +281,6 @@ public FailProcessorDescriptor OnFailure(params Action[] co return Self; } - public FailProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public FailProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The error message thrown by the processor.
Supports template snippets.
- ///
- public FailProcessorDescriptor Message(string message) - { - MessageValue = message; - return Self; - } - public FailProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -290,6 +290,26 @@ public FailProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + writer.WritePropertyName("message"); + writer.WriteStringValue(MessageValue); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -321,26 +341,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - writer.WritePropertyName("message"); - writer.WriteStringValue(MessageValue); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs index ba32382e45d..4dbbded05cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs @@ -69,6 +69,11 @@ public ForeachProcessorDescriptor() : 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 ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } @@ -76,13 +81,53 @@ public ForeachProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Ingest.Processor ProcessorValue { get; set; } private ProcessorDescriptor ProcessorDescriptor { get; set; } private Action> ProcessorDescriptorAction { get; set; } - 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 string? TagValue { get; set; } + public ForeachProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public ForeachProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. + /// + public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + public ForeachProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -146,51 +191,6 @@ public ForeachProcessorDescriptor Processor(Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ForeachProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. - /// - public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - public ForeachProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -200,6 +200,32 @@ public ForeachProcessorDescriptor Tag(string? tag) 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"); @@ -247,32 +273,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -291,6 +291,11 @@ public ForeachProcessorDescriptor() : 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 ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } @@ -298,13 +303,62 @@ public ForeachProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Ingest.Processor ProcessorValue { get; set; } private ProcessorDescriptor ProcessorDescriptor { get; set; } private Action ProcessorDescriptorAction { get; set; } - 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 string? TagValue { get; set; } + public ForeachProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// Field containing array or object values. + /// + public ForeachProcessorDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public ForeachProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. + /// + public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) + { + IgnoreMissingValue = ignoreMissing; + return Self; + } + public ForeachProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -368,60 +422,6 @@ public ForeachProcessorDescriptor Processor(Action configur return Self; } - public ForeachProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// Field containing array or object values. - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ForeachProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// If `true`, the processor silently exits without changing the document if the `field` is `null` or missing. - /// - public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - public ForeachProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -431,6 +431,32 @@ public ForeachProcessorDescriptor Tag(string? tag) 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"); @@ -478,32 +504,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); 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 19c2f4edd0f..1043128485b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs @@ -86,10 +86,6 @@ public GeoIpProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -97,46 +93,14 @@ public GeoIpProcessorDescriptor() : base() private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. /// @@ -200,6 +164,42 @@ public GeoIpProcessorDescriptor IgnoreMissing(bool? ignoreMissing = t return Self; } + public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what properties are added to the `target_field` based on the geoip lookup. /// @@ -236,37 +236,6 @@ public GeoIpProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DatabaseFileValue)) { writer.WritePropertyName("database_file"); @@ -305,6 +274,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -335,10 +335,6 @@ public GeoIpProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DatabaseFileValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -346,46 +342,14 @@ public GeoIpProcessorDescriptor() : base() private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. /// @@ -458,6 +422,42 @@ public GeoIpProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GeoIpProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what properties are added to the `target_field` based on the geoip lookup. /// @@ -503,37 +503,6 @@ public GeoIpProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 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? TagValue { get; set; } private bool? TraceMatchValue { get; set; } - public GrokProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GrokProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -176,6 +140,42 @@ public GrokProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tr return Self; } + public GrokProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GrokProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor.
Patterns matching existing names will override the pre-existing definition.
///
@@ -212,6 +212,32 @@ public GrokProcessorDescriptor TraceMatch(bool? traceMatch = true) 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"); @@ -243,32 +269,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PatternDefinitionsValue is not null) { writer.WritePropertyName("pattern_definitions"); @@ -301,56 +301,20 @@ public GrokProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 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? TagValue { get; set; } private bool? TraceMatchValue { get; set; } - public GrokProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GrokProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -405,6 +369,42 @@ public GrokProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public GrokProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GrokProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GrokProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor.
Patterns matching existing names will override the pre-existing definition.
///
@@ -441,6 +441,32 @@ public GrokProcessorDescriptor TraceMatch(bool? traceMatch = true) 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"); @@ -472,32 +498,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PatternDefinitionsValue is not null) { writer.WritePropertyName("pattern_definitions"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs index 9b06772878c..4c5ad7c0c72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs @@ -81,56 +81,20 @@ public GsubProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string ReplacementValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public GsubProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GsubProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -176,6 +140,42 @@ public GsubProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tr return Self; } + public GsubProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GsubProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to be replaced. /// @@ -221,6 +221,32 @@ public GsubProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string PatternValue { get; set; } private string ReplacementValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public GsubProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public GsubProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -410,6 +374,42 @@ public GsubProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public GsubProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public GsubProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public GsubProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The pattern to be replaced. /// @@ -464,6 +464,32 @@ public GsubProcessorDescriptor TargetField(Expression? FieldMapValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private Elastic.Clients.Elasticsearch.Ingest.InferenceConfig? InferenceConfigValue { get; set; } private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action> InferenceConfigDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Id ModelIdValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } private Action>[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? FieldMapValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Id ModelIdValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } + public InferenceProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
+ ///
+ public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) + { + FieldMapValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InferenceProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -117,6 +144,15 @@ public InferenceProcessorDescriptor InferenceConfig(Action + /// The ID or alias for the trained model, or the ID of the deployment. + /// + public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Id modelId) + { + ModelIdValue = modelId; + return Self; + } + public InferenceProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -153,42 +189,6 @@ public InferenceProcessorDescriptor OnFailure(params Action Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
- ///
- public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) - { - FieldMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InferenceProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Id modelId) - { - ModelIdValue = modelId; - return Self; - } - public InferenceProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -216,6 +216,30 @@ public InferenceProcessorDescriptor TargetField(Expression? FieldMapValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } private Elastic.Clients.Elasticsearch.Ingest.InferenceConfig? InferenceConfigValue { get; set; } private InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action InferenceConfigDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Id ModelIdValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } private Action[] OnFailureDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? FieldMapValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Id ModelIdValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } + public InferenceProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
+ ///
+ public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) + { + FieldMapValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public InferenceProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + /// /// Contains the inference type and its options. /// @@ -355,6 +382,15 @@ public InferenceProcessorDescriptor InferenceConfig(Action + /// The ID or alias for the trained model, or the ID of the deployment. + /// + public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Id modelId) + { + ModelIdValue = modelId; + return Self; + } + public InferenceProcessorDescriptor OnFailure(ICollection? onFailure) { OnFailureDescriptor = null; @@ -391,42 +427,6 @@ public InferenceProcessorDescriptor OnFailure(params Action return Self; } - public InferenceProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// Maps the document field names to the known field names of the model.
This mapping takes precedence over any default mappings provided in the model configuration.
- ///
- public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) - { - FieldMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public InferenceProcessorDescriptor If(string? ifValue) - { - IfValue = ifValue; - return Self; - } - - public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Id modelId) - { - ModelIdValue = modelId; - return Self; - } - public InferenceProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -463,6 +463,30 @@ public InferenceProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public JoinProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public JoinProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -153,6 +117,42 @@ public JoinProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public JoinProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JoinProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The separator character. /// @@ -189,6 +189,26 @@ public JoinProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public JoinProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public JoinProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -359,6 +323,42 @@ public JoinProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public JoinProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JoinProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JoinProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The separator character. /// @@ -404,6 +404,26 @@ public JoinProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private bool? AddToRootValue { get; set; } private Elastic.Clients.Elasticsearch.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategyValue { get; set; } private bool? AllowDuplicateKeysValue { get; set; } @@ -91,45 +87,13 @@ public JsonProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public JsonProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// Flag that forces the parsed JSON to be added at the top level of the document.
`target_field` must not be set when this option is chosen.
///
@@ -193,6 +157,42 @@ public JsonProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public JsonProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JsonProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public JsonProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -220,37 +220,6 @@ public JsonProcessorDescriptor TargetField(Expression(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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (AddToRootValue.HasValue) { writer.WritePropertyName("add_to_root"); @@ -289,6 +258,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreFailureValue.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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -313,10 +313,6 @@ public JsonProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private bool? AddToRootValue { get; set; } private Elastic.Clients.Elasticsearch.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategyValue { get; set; } private bool? AllowDuplicateKeysValue { get; set; } @@ -324,45 +320,13 @@ public JsonProcessorDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public JsonProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// Flag that forces the parsed JSON to be added at the top level of the document.
`target_field` must not be set when this option is chosen.
///
@@ -435,6 +399,42 @@ public JsonProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public JsonProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public JsonProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public JsonProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public JsonProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -471,37 +471,6 @@ public JsonProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private ICollection? ExcludeKeysValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -129,6 +125,10 @@ public KeyValueProcessorDescriptor() : base() private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } private ICollection? IncludeKeysValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? PrefixValue { get; set; } private bool? StripBracketsValue { get; set; } private string? TagValue { get; set; } @@ -137,42 +137,6 @@ public KeyValueProcessorDescriptor() : base() private string? TrimValueValue { get; set; } private string ValueSplitValue { get; set; } - public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public KeyValueProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -245,6 +209,42 @@ public KeyValueProcessorDescriptor IncludeKeys(ICollection? i return Self; } + public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Prefix to be added to extracted keys. /// @@ -317,37 +317,6 @@ public KeyValueProcessorDescriptor ValueSplit(string valueSplit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -388,6 +357,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeKeysValue, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(PrefixValue)) { writer.WritePropertyName("prefix"); @@ -438,10 +438,6 @@ public KeyValueProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private ICollection? ExcludeKeysValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -450,6 +446,10 @@ public KeyValueProcessorDescriptor() : base() private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } private ICollection? IncludeKeysValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? PrefixValue { get; set; } private bool? StripBracketsValue { get; set; } private string? TagValue { get; set; } @@ -458,42 +458,6 @@ public KeyValueProcessorDescriptor() : base() private string? TrimValueValue { get; set; } private string ValueSplitValue { get; set; } - public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public KeyValueProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -575,6 +539,42 @@ public KeyValueProcessorDescriptor IncludeKeys(ICollection? includeKeys) return Self; } + public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public KeyValueProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Prefix to be added to extracted keys. /// @@ -656,37 +656,6 @@ public KeyValueProcessorDescriptor ValueSplit(string valueSplit) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (!string.IsNullOrEmpty(DescriptionValue)) { writer.WritePropertyName("description"); @@ -727,6 +696,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeKeysValue, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (!string.IsNullOrEmpty(PrefixValue)) { writer.WritePropertyName("prefix"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs index 3480de8fd28..723210729de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs @@ -69,54 +69,18 @@ public LowercaseProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public LowercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public LowercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public LowercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public LowercaseProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public LowercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public LowercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public LowercaseProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public LowercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public LowercaseProcessorDescriptor TargetField(Expression + /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. + /// + [JsonInclude, JsonPropertyName("_meta")] + public IDictionary Meta { get; set; } + /// /// Description of the ingest pipeline. /// @@ -62,6 +68,8 @@ public PipelineDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private IDictionary MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action> OnFailureDescriptorAction { get; set; } @@ -70,9 +78,26 @@ public PipelineDescriptor() : base() private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action> ProcessorsDescriptorAction { get; set; } private Action>[] ProcessorsDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PipelineDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. + /// + public PipelineDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. /// @@ -151,15 +176,6 @@ public PipelineDescriptor Processors(params Action - /// Description of the ingest pipeline. - /// - public PipelineDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. /// @@ -172,6 +188,14 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -234,12 +258,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); @@ -258,6 +276,8 @@ public PipelineDescriptor() : base() { } + private string? DescriptionValue { get; set; } + private IDictionary MetaValue { get; set; } private ICollection? OnFailureValue { get; set; } private ProcessorDescriptor OnFailureDescriptor { get; set; } private Action OnFailureDescriptorAction { get; set; } @@ -266,9 +286,26 @@ public PipelineDescriptor() : base() private ProcessorDescriptor ProcessorsDescriptor { get; set; } private Action ProcessorsDescriptorAction { get; set; } private Action[] ProcessorsDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } private long? VersionValue { get; set; } + /// + /// Description of the ingest pipeline. + /// + public PipelineDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. + /// + public PipelineDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + /// /// Processors to run immediately after a processor failure. /// @@ -347,15 +384,6 @@ public PipelineDescriptor Processors(params Action[] config return Self; } - /// - /// Description of the ingest pipeline. - /// - public PipelineDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - /// /// Version number used by external systems to track ingest pipelines. /// @@ -368,6 +396,14 @@ public PipelineDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -430,12 +466,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ProcessorsValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - if (VersionValue is not null) { writer.WritePropertyName("version"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs index 70c5c441a12..67d4e79c148 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs @@ -63,53 +63,17 @@ public PipelineProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingPipelineValue { get; set; } private Elastic.Clients.Elasticsearch.Name NameValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public PipelineProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public PipelineProcessorDescriptor Name(Elastic.Clients.Elasticsearch return Self; } + public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public PipelineProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -155,6 +155,32 @@ public PipelineProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingPipelineValue.HasValue) + { + writer.WritePropertyName("ignore_missing_pipeline"); + writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); + } + + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -186,32 +212,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingPipelineValue.HasValue) - { - writer.WritePropertyName("ignore_missing_pipeline"); - writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -230,53 +230,17 @@ public PipelineProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingPipelineValue { get; set; } private Elastic.Clients.Elasticsearch.Name NameValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public PipelineProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -313,6 +277,42 @@ public PipelineProcessorDescriptor Name(Elastic.Clients.Elasticsearch.Name name) return Self; } + public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public PipelineProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public PipelineProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -322,6 +322,32 @@ public PipelineProcessorDescriptor Tag(string? tag) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (IgnoreMissingPipelineValue.HasValue) + { + writer.WritePropertyName("ignore_missing_pipeline"); + writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); + } + + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); if (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -353,32 +379,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingPipelineValue.HasValue) - { - writer.WritePropertyName("ignore_missing_pipeline"); - writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); if (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); 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 59b67d92e27..ebd6e35a895 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Processor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Processor.g.cs @@ -70,6 +70,7 @@ internal Processor(string variantName, object variant) public static Processor Pipeline(Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor pipelineProcessor) => new Processor("pipeline", pipelineProcessor); 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); public static Processor Set(Elastic.Clients.Elasticsearch.Ingest.SetProcessor setProcessor) => new Processor("set", setProcessor); public static Processor SetSecurityUser(Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessor setSecurityUserProcessor) => new Processor("set_security_user", setSecurityUserProcessor); public static Processor Sort(Elastic.Clients.Elasticsearch.Ingest.SortProcessor sortProcessor) => new Processor("sort", sortProcessor); @@ -272,6 +273,13 @@ public override Processor Read(ref Utf8JsonReader reader, Type typeToConvert, Js return new Processor(propertyName, variant); } + if (propertyName == "reroute") + { + var variant = JsonSerializer.Deserialize(ref reader, options); + reader.Read(); + return new Processor(propertyName, variant); + } + if (propertyName == "set") { var variant = JsonSerializer.Deserialize(ref reader, options); @@ -414,6 +422,9 @@ public override void Write(Utf8JsonWriter writer, Processor value, JsonSerialize case "rename": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.RenameProcessor)value.Variant, options); break; + case "reroute": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.RerouteProcessor)value.Variant, options); + break; case "set": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Ingest.SetProcessor)value.Variant, options); break; @@ -526,6 +537,8 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Remove(Action> configure) => Set(configure, "remove"); public ProcessorDescriptor Rename(RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); public ProcessorDescriptor Rename(Action> configure) => Set(configure, "rename"); + public ProcessorDescriptor Reroute(RerouteProcessor rerouteProcessor) => Set(rerouteProcessor, "reroute"); + public ProcessorDescriptor Reroute(Action> configure) => Set(configure, "reroute"); public ProcessorDescriptor Set(SetProcessor setProcessor) => Set(setProcessor, "set"); public ProcessorDescriptor Set(Action> configure) => Set(configure, "set"); public ProcessorDescriptor SetSecurityUser(SetSecurityUserProcessor setSecurityUserProcessor) => Set(setSecurityUserProcessor, "set_security_user"); @@ -671,6 +684,9 @@ private ProcessorDescriptor Set(object variant, string variantName) public ProcessorDescriptor Rename(RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); public ProcessorDescriptor Rename(Action configure) => Set(configure, "rename"); public ProcessorDescriptor Rename(Action> configure) => Set(configure, "rename"); + public ProcessorDescriptor Reroute(RerouteProcessor rerouteProcessor) => Set(rerouteProcessor, "reroute"); + public ProcessorDescriptor Reroute(Action configure) => Set(configure, "reroute"); + public ProcessorDescriptor Reroute(Action> configure) => Set(configure, "reroute"); public ProcessorDescriptor Set(SetProcessor setProcessor) => Set(setProcessor, "set"); public ProcessorDescriptor Set(Action configure) => Set(configure, "set"); public ProcessorDescriptor Set(Action> configure) => Set(configure, "set"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs index 21cc3064479..e8c8619e0c0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs @@ -63,53 +63,17 @@ public RemoveProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Fields FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RemoveProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public RemoveProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RemoveProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -155,6 +155,32 @@ public RemoveProcessorDescriptor Tag(string? tag) 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"); @@ -186,32 +212,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); @@ -230,53 +230,17 @@ public RemoveProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Fields FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } private bool? IgnoreMissingValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } - public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RemoveProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -313,6 +277,42 @@ public RemoveProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RemoveProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RemoveProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -322,6 +322,32 @@ public RemoveProcessorDescriptor Tag(string? tag) 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"); @@ -353,32 +379,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (!string.IsNullOrEmpty(TagValue)) { writer.WritePropertyName("tag"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs index ad4f971a9e8..521662e3ac3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs @@ -69,54 +69,18 @@ public RenameProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field TargetFieldValue { get; set; } - public RenameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RenameProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public RenameProcessorDescriptor IgnoreMissing(bool? ignoreMissing = return Self; } + public RenameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RenameProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RenameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public RenameProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field TargetFieldValue { get; set; } - public RenameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public RenameProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -368,6 +332,42 @@ public RenameProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public RenameProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RenameProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RenameProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public RenameProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -404,6 +404,32 @@ public RenameProcessorDescriptor TargetField(Expression + /// Field references or a static value for the dataset part of the data stream name.
In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
Example values are nginx.access and nginx.error.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.dataset}} + /// + [JsonInclude, JsonPropertyName("dataset")] + [SingleOrManyCollectionConverter(typeof(string))] + public ICollection? Dataset { get; set; } + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// A static value for the target. Can’t be set when the dataset or namespace option is set. + /// + [JsonInclude, JsonPropertyName("destination")] + public string? Destination { get; set; } + [JsonInclude, JsonPropertyName("if")] + public string? If { get; set; } + [JsonInclude, JsonPropertyName("ignore_failure")] + public bool? IgnoreFailure { get; set; } + + /// + /// Field references or a static value for the namespace part of the data stream name. See the criteria for
index names for allowed characters. Must be no longer than 100 characters.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.namespace}} + ///
+ [JsonInclude, JsonPropertyName("namespace")] + [SingleOrManyCollectionConverter(typeof(string))] + public ICollection? Namespace { get; set; } + [JsonInclude, JsonPropertyName("on_failure")] + public ICollection? OnFailure { get; set; } + [JsonInclude, JsonPropertyName("tag")] + public string? Tag { get; set; } + + public static implicit operator Processor(RerouteProcessor rerouteProcessor) => Ingest.Processor.Reroute(rerouteProcessor); +} + +public sealed partial class RerouteProcessorDescriptor : SerializableDescriptor> +{ + internal RerouteProcessorDescriptor(Action> configure) => configure.Invoke(this); + + public RerouteProcessorDescriptor() : base() + { + } + + private ICollection? DatasetValue { get; set; } + private string? DescriptionValue { get; set; } + private string? DestinationValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private ICollection? NamespaceValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } + private string? TagValue { get; set; } + + /// + /// Field references or a static value for the dataset part of the data stream name.
In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
Example values are nginx.access and nginx.error.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.dataset}} + ///
+ public RerouteProcessorDescriptor Dataset(ICollection? dataset) + { + DatasetValue = dataset; + return Self; + } + + public RerouteProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// A static value for the target. Can’t be set when the dataset or namespace option is set. + /// + public RerouteProcessorDescriptor Destination(string? destination) + { + DestinationValue = destination; + return Self; + } + + public RerouteProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public RerouteProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// Field references or a static value for the namespace part of the data stream name. See the criteria for
index names for allowed characters. Must be no longer than 100 characters.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.namespace}} + ///
+ public RerouteProcessorDescriptor Namespace(ICollection? @namespace) + { + NamespaceValue = @namespace; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RerouteProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DatasetValue is not null) + { + writer.WritePropertyName("dataset"); + SingleOrManySerializationHelper.Serialize(DatasetValue, writer, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(DestinationValue)) + { + writer.WritePropertyName("destination"); + writer.WriteStringValue(DestinationValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (NamespaceValue is not null) + { + writer.WritePropertyName("namespace"); + SingleOrManySerializationHelper.Serialize(NamespaceValue, writer, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class RerouteProcessorDescriptor : SerializableDescriptor +{ + internal RerouteProcessorDescriptor(Action configure) => configure.Invoke(this); + + public RerouteProcessorDescriptor() : base() + { + } + + private ICollection? DatasetValue { get; set; } + private string? DescriptionValue { get; set; } + private string? DestinationValue { get; set; } + private string? IfValue { get; set; } + private bool? IgnoreFailureValue { get; set; } + private ICollection? NamespaceValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } + private string? TagValue { get; set; } + + /// + /// Field references or a static value for the dataset part of the data stream name.
In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
Example values are nginx.access and nginx.error.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.dataset}} + ///
+ public RerouteProcessorDescriptor Dataset(ICollection? dataset) + { + DatasetValue = dataset; + return Self; + } + + public RerouteProcessorDescriptor Description(string? description) + { + DescriptionValue = description; + return Self; + } + + /// + /// A static value for the target. Can’t be set when the dataset or namespace option is set. + /// + public RerouteProcessorDescriptor Destination(string? destination) + { + DestinationValue = destination; + return Self; + } + + public RerouteProcessorDescriptor If(string? ifValue) + { + IfValue = ifValue; + return Self; + } + + public RerouteProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) + { + IgnoreFailureValue = ignoreFailure; + return Self; + } + + /// + /// Field references or a static value for the namespace part of the data stream name. See the criteria for
index names for allowed characters. Must be no longer than 100 characters.
+ /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
When resolving field references, the processor replaces invalid characters with _. Uses the part
of the index name as a fallback if all field references resolve to a null, missing, or non-string value.
+ /// default {{data_stream.namespace}} + ///
+ public RerouteProcessorDescriptor Namespace(ICollection? @namespace) + { + NamespaceValue = @namespace; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public RerouteProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + + public RerouteProcessorDescriptor Tag(string? tag) + { + TagValue = tag; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DatasetValue is not null) + { + writer.WritePropertyName("dataset"); + SingleOrManySerializationHelper.Serialize(DatasetValue, writer, options); + } + + if (!string.IsNullOrEmpty(DescriptionValue)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(DescriptionValue); + } + + if (!string.IsNullOrEmpty(DestinationValue)) + { + writer.WritePropertyName("destination"); + writer.WriteStringValue(DestinationValue); + } + + if (!string.IsNullOrEmpty(IfValue)) + { + writer.WritePropertyName("if"); + writer.WriteStringValue(IfValue); + } + + if (IgnoreFailureValue.HasValue) + { + writer.WritePropertyName("ignore_failure"); + writer.WriteBooleanValue(IgnoreFailureValue.Value); + } + + if (NamespaceValue is not null) + { + writer.WritePropertyName("namespace"); + SingleOrManySerializationHelper.Serialize(NamespaceValue, writer, 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + + if (!string.IsNullOrEmpty(TagValue)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(TagValue); + } + + writer.WriteEndObject(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs index a092d7ed188..d272f8dae9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs @@ -86,10 +86,6 @@ public SetProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Field? CopyFromValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -97,46 +93,14 @@ public SetProcessorDescriptor() : base() private bool? IgnoreEmptyValueValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? MediaTypeValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string? TagValue { get; set; } private object? ValueValue { get; set; } - public SetProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
Supported data types are `boolean`, `number`, `array`, `object`, `string`, `date`, etc.
///
@@ -209,6 +173,42 @@ public SetProcessorDescriptor MediaType(string? mediaType) return Self; } + public SetProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If `true` processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -236,37 +236,6 @@ public SetProcessorDescriptor Value(object? value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (CopyFromValue is not null) { writer.WritePropertyName("copy_from"); @@ -305,6 +274,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(MediaTypeValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (OverrideValue.HasValue) { writer.WritePropertyName("override"); @@ -335,10 +335,6 @@ public SetProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Field? CopyFromValue { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -346,46 +342,14 @@ public SetProcessorDescriptor() : base() private bool? IgnoreEmptyValueValue { get; set; } private bool? IgnoreFailureValue { get; set; } private string? MediaTypeValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private bool? OverrideValue { get; set; } private string? TagValue { get; set; } private object? ValueValue { get; set; } - public SetProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - /// /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
Supported data types are `boolean`, `number`, `array`, `object`, `string`, `date`, etc.
///
@@ -476,6 +440,42 @@ public SetProcessorDescriptor MediaType(string? mediaType) return Self; } + public SetProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// If `true` processor will update fields with pre-existing non-null-valued field.
When set to `false`, such fields will not be touched.
///
@@ -503,37 +503,6 @@ public SetProcessorDescriptor Value(object? value) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - 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 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 ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - if (CopyFromValue is not null) { writer.WritePropertyName("copy_from"); @@ -572,6 +541,37 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(MediaTypeValue); } + 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 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 ProcessorDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else if (OnFailureValue is not null) + { + writer.WritePropertyName("on_failure"); + JsonSerializer.Serialize(writer, OnFailureValue, options); + } + if (OverrideValue.HasValue) { writer.WritePropertyName("override"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs index c9a8066e784..05d6ab11dce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs @@ -63,53 +63,17 @@ public SetSecurityUserProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } - public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SetSecurityUserProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -146,6 +110,42 @@ public SetSecurityUserProcessorDescriptor IgnoreFailure(bool? ignoreF return Self; } + public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what user related properties are added to the field. /// @@ -164,6 +164,26 @@ public SetSecurityUserProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -195,26 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -239,53 +239,17 @@ public SetSecurityUserProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? PropertiesValue { get; set; } private string? TagValue { get; set; } - public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SetSecurityUserProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -331,6 +295,42 @@ public SetSecurityUserProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SetSecurityUserProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Controls what user related properties are added to the field. /// @@ -349,6 +349,26 @@ public SetSecurityUserProcessorDescriptor Tag(string? tag) 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 (OnFailureDescriptor is not null) { writer.WritePropertyName("on_failure"); @@ -380,26 +400,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, OnFailureValue, options); } - 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 (PropertiesValue is not null) { writer.WritePropertyName("properties"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs index f08d4cee88d..0e983359ff6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs @@ -69,54 +69,18 @@ public SortProcessorDescriptor() : base() { } - private ICollection? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? OrderValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public SortProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SortProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SortProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SortProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -153,6 +117,42 @@ public SortProcessorDescriptor IgnoreFailure(bool? ignoreFailure = tr return Self; } + public SortProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SortProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SortProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The sort order to use.
Accepts `"asc"` or `"desc"`.
///
@@ -189,6 +189,26 @@ public SortProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } private string? DescriptionValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? IfValue { get; set; } private bool? IgnoreFailureValue { get; set; } + private ICollection? OnFailureValue { get; set; } + private ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? OrderValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public SortProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SortProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SortProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SortProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -363,6 +327,42 @@ public SortProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) return Self; } + public SortProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SortProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SortProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SortProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// The sort order to use.
Accepts `"asc"` or `"desc"`.
///
@@ -408,6 +408,26 @@ public SortProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private bool? PreserveTrailingValue { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public SplitProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SplitProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -176,6 +140,42 @@ public SplitProcessorDescriptor IgnoreMissing(bool? ignoreMissing = t return Self; } + public SplitProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SplitProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Preserves empty trailing fields, if any. /// @@ -221,6 +221,32 @@ public SplitProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private bool? PreserveTrailingValue { get; set; } private string SeparatorValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public SplitProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public SplitProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -414,6 +378,42 @@ public SplitProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public SplitProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public SplitProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public SplitProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + /// /// Preserves empty trailing fields, if any. /// @@ -468,6 +468,32 @@ public SplitProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public TrimProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public TrimProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public TrimProcessorDescriptor IgnoreMissing(bool? ignoreMissing = tr return Self; } + public TrimProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public TrimProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public TrimProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public TrimProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public TrimProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public TrimProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public TrimProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public TrimProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public TrimProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public TrimProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public TrimProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public TrimProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UppercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public UppercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UppercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public UppercaseProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UppercaseProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public UppercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UppercaseProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UppercaseProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public UppercaseProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UrlDecodeProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -162,6 +126,42 @@ public UrlDecodeProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UrlDecodeProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -189,6 +189,32 @@ public UrlDecodeProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UrlDecodeProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -372,6 +336,42 @@ public UrlDecodeProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UrlDecodeProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UrlDecodeProcessorDescriptor Tag(string? tag) { TagValue = tag; @@ -408,6 +408,32 @@ public UrlDecodeProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action> OnFailureDescriptorAction { get; set; } + private Action>[] OnFailureDescriptorActions { get; set; } private ICollection? OptionsValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UserAgentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -172,6 +136,42 @@ public UserAgentProcessorDescriptor IgnoreMissing(bool? ignoreMissing return Self; } + public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(Action> configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(params Action>[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UserAgentProcessorDescriptor Options(ICollection? options) { OptionsValue = options; @@ -214,6 +214,32 @@ public UserAgentProcessorDescriptor TargetField(Expression? OnFailureValue { get; set; } - private ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } 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 ProcessorDescriptor OnFailureDescriptor { get; set; } + private Action OnFailureDescriptorAction { get; set; } + private Action[] OnFailureDescriptorActions { get; set; } private ICollection? OptionsValue { get; set; } private string? RegexFileValue { get; set; } private string? TagValue { get; set; } private Elastic.Clients.Elasticsearch.Field? TargetFieldValue { get; set; } - public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - public UserAgentProcessorDescriptor Description(string? description) { DescriptionValue = description; @@ -411,6 +375,42 @@ public UserAgentProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) return Self; } + public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) + { + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureValue = onFailure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(ProcessorDescriptor descriptor) + { + OnFailureValue = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = null; + OnFailureDescriptor = descriptor; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(Action configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorActions = null; + OnFailureDescriptorAction = configure; + return Self; + } + + public UserAgentProcessorDescriptor OnFailure(params Action[] configure) + { + OnFailureValue = null; + OnFailureDescriptor = null; + OnFailureDescriptorAction = null; + OnFailureDescriptorActions = configure; + return Self; + } + public UserAgentProcessorDescriptor Options(ICollection? options) { OptionsValue = options; @@ -462,6 +462,32 @@ public UserAgentProcessorDescriptor TargetField(Expression /// Filters for the kNN search query /// - [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? Filter { get; set; } /// @@ -86,12 +87,12 @@ public KnnQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private long kValue { get; set; } private long NumCandidatesValue { get; set; } private ICollection? QueryVectorValue { get; set; } @@ -100,6 +101,33 @@ public KnnQueryDescriptor() : base() private Action QueryVectorBuilderDescriptorAction { get; set; } private float? SimilarityValue { get; set; } + /// + /// Boost value to apply to kNN scores + /// + public KnnQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// Filters for the kNN search query /// @@ -139,33 +167,6 @@ public KnnQueryDescriptor Filter(params Action - /// Boost value to apply to kNN scores - /// - public KnnQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The final number of nearest neighbors to return as top hits /// @@ -232,6 +233,14 @@ public KnnQueryDescriptor Similarity(float? similarity) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -261,14 +270,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WritePropertyName("k"); writer.WriteNumberValue(kValue); writer.WritePropertyName("num_candidates"); @@ -313,12 +314,12 @@ public KnnQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private long kValue { get; set; } private long NumCandidatesValue { get; set; } private ICollection? QueryVectorValue { get; set; } @@ -327,6 +328,42 @@ public KnnQueryDescriptor() : base() private Action QueryVectorBuilderDescriptorAction { get; set; } private float? SimilarityValue { get; set; } + /// + /// Boost value to apply to kNN scores + /// + public KnnQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + /// /// Filters for the kNN search query /// @@ -366,42 +403,6 @@ public KnnQueryDescriptor Filter(params Action[] confi return Self; } - /// - /// Boost value to apply to kNN scores - /// - public KnnQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// The name of the vector field to search against - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - /// /// The final number of nearest neighbors to return as top hits /// @@ -468,6 +469,14 @@ public KnnQueryDescriptor Similarity(float? similarity) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -497,14 +506,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WritePropertyName("k"); writer.WriteNumberValue(kValue); writer.WritePropertyName("num_candidates"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs index e386924e7e5..caf23a9ddd1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -72,11 +72,11 @@ public CompletionPropertyDescriptor() : base() { } + private string? AnalyzerValue { get; set; } private ICollection? ContextsValue { get; set; } private SuggestContextDescriptor ContextsDescriptor { get; set; } private Action> ContextsDescriptorAction { get; set; } private Action>[] ContextsDescriptorActions { get; set; } - private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? CopyToValue { get; set; } private bool? DocValuesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } @@ -91,6 +91,12 @@ public CompletionPropertyDescriptor() : base() private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + public CompletionPropertyDescriptor Analyzer(string? analyzer) + { + AnalyzerValue = analyzer; + return Self; + } + public CompletionPropertyDescriptor Contexts(ICollection? contexts) { ContextsDescriptor = null; @@ -127,12 +133,6 @@ public CompletionPropertyDescriptor Contexts(params Action Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - public CompletionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { CopyToValue = copyTo; @@ -242,6 +242,12 @@ public CompletionPropertyDescriptor Store(bool? store = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (!string.IsNullOrEmpty(AnalyzerValue)) + { + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); + } + if (ContextsDescriptor is not null) { writer.WritePropertyName("contexts"); @@ -273,12 +279,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ContextsValue, options); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - if (CopyToValue is not null) { writer.WritePropertyName("copy_to"); @@ -390,11 +390,11 @@ public CompletionPropertyDescriptor() : base() { } + private string? AnalyzerValue { get; set; } private ICollection? ContextsValue { get; set; } private SuggestContextDescriptor ContextsDescriptor { get; set; } private Action ContextsDescriptorAction { get; set; } private Action[] ContextsDescriptorActions { get; set; } - private string? AnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? CopyToValue { get; set; } private bool? DocValuesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } @@ -409,6 +409,12 @@ public CompletionPropertyDescriptor() : base() private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + public CompletionPropertyDescriptor Analyzer(string? analyzer) + { + AnalyzerValue = analyzer; + return Self; + } + public CompletionPropertyDescriptor Contexts(ICollection? contexts) { ContextsDescriptor = null; @@ -445,12 +451,6 @@ public CompletionPropertyDescriptor Contexts(params Action ShortNumber(PropertyName propertyName, ShortNumberProperty shortNumberProperty) => AssignVariant(propertyName, shortNumberProperty); public PropertiesDescriptor ShortNumber(Expression> propertyName) => AssignVariant, ShortNumberProperty>(propertyName, null); public PropertiesDescriptor ShortNumber(Expression> propertyName, Action> configure) => AssignVariant, ShortNumberProperty>(propertyName, configure); + public PropertiesDescriptor SparseVector(PropertyName propertyName) => AssignVariant, SparseVectorProperty>(propertyName, null); + public PropertiesDescriptor SparseVector(PropertyName propertyName, Action> configure) => AssignVariant, SparseVectorProperty>(propertyName, configure); + public PropertiesDescriptor SparseVector(PropertyName propertyName, SparseVectorProperty sparseVectorProperty) => AssignVariant(propertyName, sparseVectorProperty); + public PropertiesDescriptor SparseVector(Expression> propertyName) => AssignVariant, SparseVectorProperty>(propertyName, null); + public PropertiesDescriptor SparseVector(Expression> propertyName, Action> configure) => AssignVariant, SparseVectorProperty>(propertyName, configure); public PropertiesDescriptor Text(PropertyName propertyName) => AssignVariant, TextProperty>(propertyName, null); public PropertiesDescriptor Text(PropertyName propertyName, Action> configure) => AssignVariant, TextProperty>(propertyName, configure); public PropertiesDescriptor Text(PropertyName propertyName, TextProperty textProperty) => AssignVariant(propertyName, textProperty); @@ -370,6 +375,8 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "flattened": return JsonSerializer.Deserialize(ref reader, options); + case "sparse_vector": + return JsonSerializer.Deserialize(ref reader, options); case "dense_vector": return JsonSerializer.Deserialize(ref reader, options); case "aggregate_metric_double": @@ -509,6 +516,9 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "flattened": JsonSerializer.Serialize(writer, value, typeof(FlattenedProperty), options); return; + case "sparse_vector": + JsonSerializer.Serialize(writer, value, typeof(SparseVectorProperty), options); + return; case "dense_vector": JsonSerializer.Serialize(writer, value, typeof(DenseVectorProperty), options); return; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs new file mode 100644 index 00000000000..9813b414160 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs @@ -0,0 +1,285 @@ +// 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 SparseVectorProperty : IProperty +{ + [JsonInclude, JsonPropertyName("dynamic")] + public Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? Dynamic { get; set; } + [JsonInclude, JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Fields { get; set; } + [JsonInclude, JsonPropertyName("ignore_above")] + public int? IgnoreAbove { get; set; } + [JsonInclude, JsonPropertyName("meta")] + public IDictionary? Meta { get; set; } + [JsonInclude, JsonPropertyName("properties")] + public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "sparse_vector"; +} + +public sealed partial class SparseVectorPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor +{ + internal SparseVectorPropertyDescriptor(Action> configure) => configure.Invoke(this); + + public SparseVectorPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + + public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + public SparseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("sparse_vector"); + writer.WriteEndObject(); + } + + SparseVectorProperty IBuildableDescriptor.Build() => new() + { + Dynamic = DynamicValue, + Fields = FieldsValue, + IgnoreAbove = IgnoreAboveValue, + Meta = MetaValue, + Properties = PropertiesValue + }; +} + +public sealed partial class SparseVectorPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SparseVectorPropertyDescriptor(Action configure) => configure.Invoke(this); + + public SparseVectorPropertyDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } + private int? IgnoreAboveValue { get; set; } + private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + + public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + { + DynamicValue = dynamic; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.Properties? fields) + { + FieldsValue = fields; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(PropertiesDescriptor descriptor) + { + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Fields(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + FieldsValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) + { + IgnoreAboveValue = ignoreAbove; + return Self; + } + + public SparseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + { + PropertiesValue = properties; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(PropertiesDescriptor descriptor) + { + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + public SparseVectorPropertyDescriptor Properties(Action> configure) + { + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (IgnoreAboveValue.HasValue) + { + writer.WritePropertyName("ignore_above"); + writer.WriteNumberValue(IgnoreAboveValue.Value); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("sparse_vector"); + writer.WriteEndObject(); + } + + SparseVectorProperty IBuildableDescriptor.Build() => new() + { + Dynamic = DynamicValue, + Fields = FieldsValue, + IgnoreAbove = IgnoreAboveValue, + Meta = MetaValue, + Properties = PropertiesValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs index 84ff122abf8..0774af6216d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs @@ -71,285 +71,301 @@ public TypeMappingDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Mapping.AllField? AllFieldValue { get; set; } + private AllFieldDescriptor AllFieldDescriptor { get; set; } + private Action AllFieldDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? DataStreamTimestampValue { get; set; } private DataStreamTimestampDescriptor DataStreamTimestampDescriptor { get; set; } private Action DataStreamTimestampDescriptorAction { get; set; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } + private bool? EnabledValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNamesValue { get; set; } private FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.IndexField? IndexFieldValue { get; set; } + private IndexFieldDescriptor IndexFieldDescriptor { get; set; } + private Action IndexFieldDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } private RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.SizeField? SizeValue { get; set; } private SizeFieldDescriptor SizeDescriptor { get; set; } private Action SizeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.SourceField? SourceValue { get; set; } private SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.AllField? AllFieldValue { get; set; } - private AllFieldDescriptor AllFieldDescriptor { get; set; } - private Action AllFieldDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.IndexField? IndexFieldValue { get; set; } - private IndexFieldDescriptor IndexFieldDescriptor { get; set; } - private Action IndexFieldDescriptorAction { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? dataStreamTimestamp) + public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Mapping.AllField? allField) { - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampValue = dataStreamTimestamp; + AllFieldDescriptor = null; + AllFieldDescriptorAction = null; + AllFieldValue = allField; return Self; } - public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) + public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampDescriptor = descriptor; + AllFieldValue = null; + AllFieldDescriptorAction = null; + AllFieldDescriptor = descriptor; return Self; } - public TypeMappingDescriptor DataStreamTimestamp(Action configure) + public TypeMappingDescriptor AllField(Action configure) { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = configure; + AllFieldValue = null; + AllFieldDescriptor = null; + AllFieldDescriptorAction = configure; return Self; } - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) + public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? dataStreamTimestamp) { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampValue = dataStreamTimestamp; return Self; } - public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) + public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampDescriptor = descriptor; return Self; } - public TypeMappingDescriptor FieldNames(Action configure) + public TypeMappingDescriptor DataStreamTimestamp(Action configure) { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) + public TypeMappingDescriptor DateDetection(bool? dateDetection = true) { - MetaValue = selector?.Invoke(new FluentDictionary()); + DateDetectionValue = dateDetection; return Self; } - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) + public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; + DynamicValue = dynamic; return Self; } - public TypeMappingDescriptor Routing(RoutingFieldDescriptor descriptor) + public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } - public TypeMappingDescriptor Routing(Action configure) + public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; + DynamicTemplatesValue = dynamicTemplates; return Self; } - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Mapping.SizeField? size) + public TypeMappingDescriptor Enabled(bool? enabled = true) { - SizeDescriptor = null; - SizeDescriptorAction = null; - SizeValue = size; + EnabledValue = enabled; return Self; } - public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) + public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) { - SizeValue = null; - SizeDescriptorAction = null; - SizeDescriptor = descriptor; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - public TypeMappingDescriptor Size(Action configure) + public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) { - SizeValue = null; - SizeDescriptor = null; - SizeDescriptorAction = configure; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + public TypeMappingDescriptor FieldNames(Action configure) { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) + public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Mapping.IndexField? indexField) { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; + IndexFieldDescriptor = null; + IndexFieldDescriptorAction = null; + IndexFieldValue = indexField; return Self; } - public TypeMappingDescriptor Source(Action configure) + public TypeMappingDescriptor IndexField(IndexFieldDescriptor descriptor) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + IndexFieldValue = null; + IndexFieldDescriptorAction = null; + IndexFieldDescriptor = descriptor; return Self; } - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Mapping.AllField? allField) + public TypeMappingDescriptor IndexField(Action configure) { - AllFieldDescriptor = null; - AllFieldDescriptorAction = null; - AllFieldValue = allField; + IndexFieldValue = null; + IndexFieldDescriptor = null; + IndexFieldDescriptorAction = configure; return Self; } - public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) + public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) { - AllFieldValue = null; - AllFieldDescriptorAction = null; - AllFieldDescriptor = descriptor; + MetaValue = selector?.Invoke(new FluentDictionary()); return Self; } - public TypeMappingDescriptor AllField(Action configure) + public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) { - AllFieldValue = null; - AllFieldDescriptor = null; - AllFieldDescriptorAction = configure; + NumericDetectionValue = numericDetection; return Self; } - public TypeMappingDescriptor DateDetection(bool? dateDetection = true) + public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) { - DateDetectionValue = dateDetection; + PropertiesValue = properties; return Self; } - public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + public TypeMappingDescriptor Properties(PropertiesDescriptor descriptor) { - DynamicValue = dynamic; + PropertiesValue = descriptor.PromisedValue; return Self; } - public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public TypeMappingDescriptor Properties(Action> configure) { - DynamicDateFormatsValue = dynamicDateFormats; + var descriptor = new PropertiesDescriptor(); + configure?.Invoke(descriptor); + PropertiesValue = descriptor.PromisedValue; return Self; } - public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) { - DynamicTemplatesValue = dynamicTemplates; + RoutingDescriptor = null; + RoutingDescriptorAction = null; + RoutingValue = routing; return Self; } - public TypeMappingDescriptor Enabled(bool? enabled = true) + public TypeMappingDescriptor Routing(RoutingFieldDescriptor descriptor) { - EnabledValue = enabled; + RoutingValue = null; + RoutingDescriptorAction = null; + RoutingDescriptor = descriptor; return Self; } - public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Mapping.IndexField? indexField) + public TypeMappingDescriptor Routing(Action configure) { - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = null; - IndexFieldValue = indexField; + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; return Self; } - public TypeMappingDescriptor IndexField(IndexFieldDescriptor descriptor) + public TypeMappingDescriptor Runtime(Func, FluentDictionary> selector) { - IndexFieldValue = null; - IndexFieldDescriptorAction = null; - IndexFieldDescriptor = descriptor; + RuntimeValue = selector?.Invoke(new FluentDictionary()); return Self; } - public TypeMappingDescriptor IndexField(Action configure) + public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Mapping.SizeField? size) { - IndexFieldValue = null; - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = configure; + SizeDescriptor = null; + SizeDescriptorAction = null; + SizeValue = size; return Self; } - public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) + public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) { - NumericDetectionValue = numericDetection; + SizeValue = null; + SizeDescriptorAction = null; + SizeDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) + public TypeMappingDescriptor Size(Action configure) { - PropertiesValue = properties; + SizeValue = null; + SizeDescriptor = null; + SizeDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Properties(PropertiesDescriptor descriptor) + public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) { - PropertiesValue = descriptor.PromisedValue; + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; return Self; } - public TypeMappingDescriptor Properties(Action> configure) + public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) { - var descriptor = new PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Runtime(Func, FluentDictionary> selector) + public TypeMappingDescriptor Source(Action configure) { - RuntimeValue = selector?.Invoke(new FluentDictionary()); + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (DataStreamTimestampDescriptor is not null) + if (AllFieldDescriptor is not null) { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, DataStreamTimestampDescriptor, options); + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldDescriptor, options); } - else if (DataStreamTimestampDescriptorAction is not null) + else if (AllFieldDescriptorAction is not null) { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, new DataStreamTimestampDescriptor(DataStreamTimestampDescriptorAction), options); + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); + } + else if (AllFieldValue is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldValue, options); + } + + if (DataStreamTimestampDescriptor is not null) + { + writer.WritePropertyName("_data_stream_timestamp"); + JsonSerializer.Serialize(writer, DataStreamTimestampDescriptor, options); + } + else if (DataStreamTimestampDescriptorAction is not null) + { + writer.WritePropertyName("_data_stream_timestamp"); + JsonSerializer.Serialize(writer, new DataStreamTimestampDescriptor(DataStreamTimestampDescriptorAction), options); } else if (DataStreamTimestampValue is not null) { @@ -357,6 +373,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamTimestampValue, options); } + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); + } + + if (EnabledValue.HasValue) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(EnabledValue.Value); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -373,12 +419,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldNamesValue, options); } + if (IndexFieldDescriptor is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); + } + else if (IndexFieldDescriptorAction is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); + } + else if (IndexFieldValue is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldValue, options); + } + if (MetaValue is not null) { writer.WritePropertyName("_meta"); JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -395,6 +469,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SizeDescriptor is not null) { writer.WritePropertyName("_size"); @@ -427,86 +507,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (AllFieldDescriptor is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldDescriptor, options); - } - else if (AllFieldDescriptorAction is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); - } - else if (AllFieldValue is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldValue, options); - } - - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (IndexFieldDescriptor is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); - } - else if (IndexFieldDescriptorAction is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); - } - else if (IndexFieldValue is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - writer.WriteEndObject(); } } @@ -519,214 +519,136 @@ public TypeMappingDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Mapping.AllField? AllFieldValue { get; set; } + private AllFieldDescriptor AllFieldDescriptor { get; set; } + private Action AllFieldDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? DataStreamTimestampValue { get; set; } private DataStreamTimestampDescriptor DataStreamTimestampDescriptor { get; set; } private Action DataStreamTimestampDescriptorAction { get; set; } + private bool? DateDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } + private ICollection? DynamicDateFormatsValue { get; set; } + private ICollection>? DynamicTemplatesValue { get; set; } + private bool? EnabledValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? FieldNamesValue { get; set; } private FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } private Action FieldNamesDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.IndexField? IndexFieldValue { get; set; } + private IndexFieldDescriptor IndexFieldDescriptor { get; set; } + private Action IndexFieldDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } + private bool? NumericDetectionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.RoutingField? RoutingValue { get; set; } private RoutingFieldDescriptor RoutingDescriptor { get; set; } private Action RoutingDescriptorAction { get; set; } + private IDictionary? RuntimeValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.SizeField? SizeValue { get; set; } private SizeFieldDescriptor SizeDescriptor { get; set; } private Action SizeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Mapping.SourceField? SourceValue { get; set; } private SourceFieldDescriptor SourceDescriptor { get; set; } private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.AllField? AllFieldValue { get; set; } - private AllFieldDescriptor AllFieldDescriptor { get; set; } - private Action AllFieldDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.IndexField? IndexFieldValue { get; set; } - private IndexFieldDescriptor IndexFieldDescriptor { get; set; } - private Action IndexFieldDescriptorAction { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary? RuntimeValue { get; set; } - - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? dataStreamTimestamp) - { - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampValue = dataStreamTimestamp; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Action configure) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor FieldNames(Action configure) - { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public TypeMappingDescriptor Routing(RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Mapping.SizeField? size) + public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Mapping.AllField? allField) { - SizeDescriptor = null; - SizeDescriptorAction = null; - SizeValue = size; + AllFieldDescriptor = null; + AllFieldDescriptorAction = null; + AllFieldValue = allField; return Self; } - public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) + public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) { - SizeValue = null; - SizeDescriptorAction = null; - SizeDescriptor = descriptor; + AllFieldValue = null; + AllFieldDescriptorAction = null; + AllFieldDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Size(Action configure) + public TypeMappingDescriptor AllField(Action configure) { - SizeValue = null; - SizeDescriptor = null; - SizeDescriptorAction = configure; + AllFieldValue = null; + AllFieldDescriptor = null; + AllFieldDescriptorAction = configure; return Self; } - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Mapping.DataStreamTimestamp? dataStreamTimestamp) { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampValue = dataStreamTimestamp; return Self; } - public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) + public TypeMappingDescriptor DataStreamTimestamp(DataStreamTimestampDescriptor descriptor) { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptorAction = null; + DataStreamTimestampDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Source(Action configure) + public TypeMappingDescriptor DataStreamTimestamp(Action configure) { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; + DataStreamTimestampValue = null; + DataStreamTimestampDescriptor = null; + DataStreamTimestampDescriptorAction = configure; return Self; } - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Mapping.AllField? allField) + public TypeMappingDescriptor DateDetection(bool? dateDetection = true) { - AllFieldDescriptor = null; - AllFieldDescriptorAction = null; - AllFieldValue = allField; + DateDetectionValue = dateDetection; return Self; } - public TypeMappingDescriptor AllField(AllFieldDescriptor descriptor) + public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { - AllFieldValue = null; - AllFieldDescriptorAction = null; - AllFieldDescriptor = descriptor; + DynamicValue = dynamic; return Self; } - public TypeMappingDescriptor AllField(Action configure) + public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) { - AllFieldValue = null; - AllFieldDescriptor = null; - AllFieldDescriptorAction = configure; + DynamicDateFormatsValue = dynamicDateFormats; return Self; } - public TypeMappingDescriptor DateDetection(bool? dateDetection = true) + public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) { - DateDetectionValue = dateDetection; + DynamicTemplatesValue = dynamicTemplates; return Self; } - public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) + public TypeMappingDescriptor Enabled(bool? enabled = true) { - DynamicValue = dynamic; + EnabledValue = enabled; return Self; } - public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) + public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Mapping.FieldNamesField? fieldNames) { - DynamicDateFormatsValue = dynamicDateFormats; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = null; + FieldNamesValue = fieldNames; return Self; } - public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) + public TypeMappingDescriptor FieldNames(FieldNamesFieldDescriptor descriptor) { - DynamicTemplatesValue = dynamicTemplates; + FieldNamesValue = null; + FieldNamesDescriptorAction = null; + FieldNamesDescriptor = descriptor; return Self; } - public TypeMappingDescriptor Enabled(bool? enabled = true) + public TypeMappingDescriptor FieldNames(Action configure) { - EnabledValue = enabled; + FieldNamesValue = null; + FieldNamesDescriptor = null; + FieldNamesDescriptorAction = configure; return Self; } @@ -754,6 +676,12 @@ public TypeMappingDescriptor IndexField(Action configure) return Self; } + public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) { NumericDetectionValue = numericDetection; @@ -780,15 +708,103 @@ public TypeMappingDescriptor Properties(Action configure) + { + RoutingValue = null; + RoutingDescriptor = null; + RoutingDescriptorAction = configure; + return Self; + } + public TypeMappingDescriptor Runtime(Func, FluentDictionary> selector) { RuntimeValue = selector?.Invoke(new FluentDictionary()); return Self; } + public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Mapping.SizeField? size) + { + SizeDescriptor = null; + SizeDescriptorAction = null; + SizeValue = size; + return Self; + } + + public TypeMappingDescriptor Size(SizeFieldDescriptor descriptor) + { + SizeValue = null; + SizeDescriptorAction = null; + SizeDescriptor = descriptor; + return Self; + } + + public TypeMappingDescriptor Size(Action configure) + { + SizeValue = null; + SizeDescriptor = null; + SizeDescriptorAction = configure; + return Self; + } + + public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Mapping.SourceField? source) + { + SourceDescriptor = null; + SourceDescriptorAction = null; + SourceValue = source; + return Self; + } + + public TypeMappingDescriptor Source(SourceFieldDescriptor descriptor) + { + SourceValue = null; + SourceDescriptorAction = null; + SourceDescriptor = descriptor; + return Self; + } + + public TypeMappingDescriptor Source(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllFieldDescriptor is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldDescriptor, options); + } + else if (AllFieldDescriptorAction is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); + } + else if (AllFieldValue is not null) + { + writer.WritePropertyName("all_field"); + JsonSerializer.Serialize(writer, AllFieldValue, options); + } + if (DataStreamTimestampDescriptor is not null) { writer.WritePropertyName("_data_stream_timestamp"); @@ -805,6 +821,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamTimestampValue, options); } + if (DateDetectionValue.HasValue) + { + writer.WritePropertyName("date_detection"); + writer.WriteBooleanValue(DateDetectionValue.Value); + } + + if (DynamicValue is not null) + { + writer.WritePropertyName("dynamic"); + JsonSerializer.Serialize(writer, DynamicValue, options); + } + + if (DynamicDateFormatsValue is not null) + { + writer.WritePropertyName("dynamic_date_formats"); + JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); + } + + if (DynamicTemplatesValue is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); + } + + if (EnabledValue.HasValue) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(EnabledValue.Value); + } + if (FieldNamesDescriptor is not null) { writer.WritePropertyName("_field_names"); @@ -821,12 +867,40 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldNamesValue, options); } + if (IndexFieldDescriptor is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); + } + else if (IndexFieldDescriptorAction is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); + } + else if (IndexFieldValue is not null) + { + writer.WritePropertyName("index_field"); + JsonSerializer.Serialize(writer, IndexFieldValue, options); + } + if (MetaValue is not null) { writer.WritePropertyName("_meta"); JsonSerializer.Serialize(writer, MetaValue, options); } + if (NumericDetectionValue.HasValue) + { + writer.WritePropertyName("numeric_detection"); + writer.WriteBooleanValue(NumericDetectionValue.Value); + } + + if (PropertiesValue is not null) + { + writer.WritePropertyName("properties"); + JsonSerializer.Serialize(writer, PropertiesValue, options); + } + if (RoutingDescriptor is not null) { writer.WritePropertyName("_routing"); @@ -843,6 +917,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RoutingValue, options); } + if (RuntimeValue is not null) + { + writer.WritePropertyName("runtime"); + JsonSerializer.Serialize(writer, RuntimeValue, options); + } + if (SizeDescriptor is not null) { writer.WritePropertyName("_size"); @@ -875,86 +955,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SourceValue, options); } - if (AllFieldDescriptor is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldDescriptor, options); - } - else if (AllFieldDescriptorAction is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, new AllFieldDescriptor(AllFieldDescriptorAction), options); - } - else if (AllFieldValue is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldValue, options); - } - - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (IndexFieldDescriptor is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); - } - else if (IndexFieldDescriptorAction is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, new IndexFieldDescriptor(IndexFieldDescriptorAction), options); - } - else if (IndexFieldValue is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs index d9e960b0fb4..eb9c499b142 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs @@ -50,10 +50,10 @@ public NestedSortValueDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action> NestedDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Field PathValue { get; set; } public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) @@ -80,6 +80,12 @@ public NestedSortValueDescriptor Filter(Action MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) { NestedDescriptor = null; @@ -104,12 +110,6 @@ public NestedSortValueDescriptor Nested(Action MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - public NestedSortValueDescriptor Path(Elastic.Clients.Elasticsearch.Field path) { PathValue = path; @@ -141,6 +141,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -157,12 +163,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - writer.WritePropertyName("path"); JsonSerializer.Serialize(writer, PathValue, options); writer.WriteEndObject(); @@ -180,10 +180,10 @@ public NestedSortValueDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action NestedDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.Field PathValue { get; set; } public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) @@ -210,6 +210,12 @@ public NestedSortValueDescriptor Filter(Action configu return Self; } + public NestedSortValueDescriptor MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) { NestedDescriptor = null; @@ -234,12 +240,6 @@ public NestedSortValueDescriptor Nested(Action config return Self; } - public NestedSortValueDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - public NestedSortValueDescriptor Path(Elastic.Clients.Elasticsearch.Field path) { PathValue = path; @@ -277,6 +277,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FilterValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -293,12 +299,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - writer.WritePropertyName("path"); JsonSerializer.Serialize(writer, PathValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs index 0a2c39b9714..60fd5a8353b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs @@ -37,7 +37,8 @@ public sealed partial class BoolQuery : SearchQuery /// /// The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
///
- [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? Filter { get; set; } /// @@ -49,19 +50,22 @@ public sealed partial class BoolQuery : SearchQuery /// /// The clause (query) must appear in matching documents and will contribute to the score. /// - [JsonInclude, JsonPropertyName("must"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("must")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? Must { get; set; } /// /// The clause (query) must not appear in the matching documents.
Because scoring is ignored, a score of `0` is returned for all documents.
///
- [JsonInclude, JsonPropertyName("must_not"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("must_not")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? MustNot { get; set; } /// /// The clause (query) should appear in the matching document. /// - [JsonInclude, JsonPropertyName("should"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + [JsonInclude, JsonPropertyName("should")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? Should { get; set; } public static implicit operator Query(BoolQuery boolQuery) => QueryDsl.Query.Bool(boolQuery); @@ -77,10 +81,12 @@ public BoolQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private ICollection? MustValue { get; set; } private QueryDescriptor MustDescriptor { get; set; } private Action> MustDescriptorAction { get; set; } @@ -89,13 +95,17 @@ public BoolQueryDescriptor() : base() private QueryDescriptor MustNotDescriptor { get; set; } private Action> MustNotDescriptorAction { get; set; } private Action>[] MustNotDescriptorActions { get; set; } + private string? QueryNameValue { get; set; } private ICollection? ShouldValue { get; set; } private QueryDescriptor ShouldDescriptor { get; set; } private Action> ShouldDescriptorAction { get; set; } private Action>[] ShouldDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } + + public BoolQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
@@ -136,6 +146,15 @@ public BoolQueryDescriptor Filter(params Action + /// Specifies the number or percentage of `should` clauses returned documents must match. + ///
+ public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The clause (query) must appear in matching documents and will contribute to the score. /// @@ -214,6 +233,12 @@ public BoolQueryDescriptor MustNot(params Action QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// The clause (query) should appear in the matching document. /// @@ -253,30 +278,15 @@ public BoolQueryDescriptor Should(params Action QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public BoolQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Specifies the number or percentage of `should` clauses returned documents must match. - /// - public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -306,6 +316,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MustDescriptor is not null) { writer.WritePropertyName("must"); @@ -364,6 +380,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MustNotValue, writer, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ShouldDescriptor is not null) { writer.WritePropertyName("should"); @@ -393,24 +415,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(ShouldValue, writer, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - writer.WriteEndObject(); } } @@ -423,10 +427,12 @@ public BoolQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection? FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private ICollection? MustValue { get; set; } private QueryDescriptor MustDescriptor { get; set; } private Action MustDescriptorAction { get; set; } @@ -435,13 +441,17 @@ public BoolQueryDescriptor() : base() private QueryDescriptor MustNotDescriptor { get; set; } private Action MustNotDescriptorAction { get; set; } private Action[] MustNotDescriptorActions { get; set; } + private string? QueryNameValue { get; set; } private ICollection? ShouldValue { get; set; } private QueryDescriptor ShouldDescriptor { get; set; } private Action ShouldDescriptorAction { get; set; } private Action[] ShouldDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } + + public BoolQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
@@ -482,6 +492,15 @@ public BoolQueryDescriptor Filter(params Action[] configure) return Self; } + /// + /// Specifies the number or percentage of `should` clauses returned documents must match. + /// + public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The clause (query) must appear in matching documents and will contribute to the score. /// @@ -560,6 +579,12 @@ public BoolQueryDescriptor MustNot(params Action[] configure) return Self; } + public BoolQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// The clause (query) should appear in the matching document. /// @@ -599,30 +624,15 @@ public BoolQueryDescriptor Should(params Action[] configure) return Self; } - public BoolQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public BoolQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Specifies the number or percentage of `should` clauses returned documents must match. - /// - public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -652,6 +662,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MustDescriptor is not null) { writer.WritePropertyName("must"); @@ -710,6 +726,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(MustNotValue, writer, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ShouldDescriptor is not null) { writer.WritePropertyName("should"); @@ -739,24 +761,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(ShouldValue, writer, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs index 902c7005d99..6b6630c9d45 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs @@ -65,15 +65,21 @@ public BoostingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query NegativeValue { get; set; } private QueryDescriptor NegativeDescriptor { get; set; } private Action> NegativeDescriptorAction { get; set; } + private double NegativeBoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query PositiveValue { get; set; } private QueryDescriptor PositiveDescriptor { get; set; } private Action> PositiveDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private double NegativeBoostValue { get; set; } + + public BoostingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Query used to decrease the relevance score of matching documents. @@ -102,6 +108,15 @@ public BoostingQueryDescriptor Negative(Action + /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. + /// + public BoostingQueryDescriptor NegativeBoost(double negativeBoost) + { + NegativeBoostValue = negativeBoost; + return Self; + } + /// /// Any returned documents must match this query. /// @@ -135,24 +150,15 @@ public BoostingQueryDescriptor QueryName(string? queryName) return Self; } - public BoostingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. - /// - public BoostingQueryDescriptor NegativeBoost(double negativeBoost) - { - NegativeBoostValue = negativeBoost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (NegativeDescriptor is not null) { writer.WritePropertyName("negative"); @@ -169,6 +175,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NegativeValue, options); } + writer.WritePropertyName("negative_boost"); + writer.WriteNumberValue(NegativeBoostValue); if (PositiveDescriptor is not null) { writer.WritePropertyName("positive"); @@ -191,14 +199,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("negative_boost"); - writer.WriteNumberValue(NegativeBoostValue); writer.WriteEndObject(); } } @@ -211,15 +211,21 @@ public BoostingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query NegativeValue { get; set; } private QueryDescriptor NegativeDescriptor { get; set; } private Action NegativeDescriptorAction { get; set; } + private double NegativeBoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query PositiveValue { get; set; } private QueryDescriptor PositiveDescriptor { get; set; } private Action PositiveDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private double NegativeBoostValue { get; set; } + + public BoostingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Query used to decrease the relevance score of matching documents. @@ -248,6 +254,15 @@ public BoostingQueryDescriptor Negative(Action configure) return Self; } + /// + /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. + /// + public BoostingQueryDescriptor NegativeBoost(double negativeBoost) + { + NegativeBoostValue = negativeBoost; + return Self; + } + /// /// Any returned documents must match this query. /// @@ -281,24 +296,15 @@ public BoostingQueryDescriptor QueryName(string? queryName) return Self; } - public BoostingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query. - /// - public BoostingQueryDescriptor NegativeBoost(double negativeBoost) - { - NegativeBoostValue = negativeBoost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (NegativeDescriptor is not null) { writer.WritePropertyName("negative"); @@ -315,6 +321,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NegativeValue, options); } + writer.WritePropertyName("negative_boost"); + writer.WriteNumberValue(NegativeBoostValue); if (PositiveDescriptor is not null) { writer.WritePropertyName("positive"); @@ -337,14 +345,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("negative_boost"); - writer.WriteNumberValue(NegativeBoostValue); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs index d1cff88e2c9..b7d278c5920 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs @@ -83,21 +83,15 @@ public CombinedFieldsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Fields FieldsValue { get; set; } private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsOperator? OperatorValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQueryValue { get; set; } - public CombinedFieldsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If true, match phrase queries are automatically created for multi-term synonyms. /// @@ -149,6 +143,12 @@ public CombinedFieldsQueryDescriptor Query(string query) return Self; } + public CombinedFieldsQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter. /// @@ -161,12 +161,6 @@ public CombinedFieldsQueryDescriptor ZeroTermsQuery(Elastic.Clients.E protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -195,6 +189,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); @@ -213,21 +213,15 @@ public CombinedFieldsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Fields FieldsValue { get; set; } private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsOperator? OperatorValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQueryValue { get; set; } - public CombinedFieldsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If true, match phrase queries are automatically created for multi-term synonyms. /// @@ -279,6 +273,12 @@ public CombinedFieldsQueryDescriptor Query(string query) return Self; } + public CombinedFieldsQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter. /// @@ -291,12 +291,6 @@ public CombinedFieldsQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -325,6 +319,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs index 2ce0a06f5d0..e3d04f9acd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs @@ -53,11 +53,17 @@ public ConstantScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public ConstantScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Filter query you wish to run. Any returned documents must match this query.
Filter queries do not calculate relevance scores.
To speed up performance, Elasticsearch automatically caches frequently used filter queries.
@@ -92,15 +98,15 @@ public ConstantScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ConstantScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -123,12 +129,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -141,11 +141,17 @@ public ConstantScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query FilterValue { get; set; } private QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public ConstantScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Filter query you wish to run. Any returned documents must match this query.
Filter queries do not calculate relevance scores.
To speed up performance, Elasticsearch automatically caches frequently used filter queries.
@@ -180,15 +186,15 @@ public ConstantScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ConstantScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (FilterDescriptor is not null) { writer.WritePropertyName("filter"); @@ -211,12 +217,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs index c069a3924fb..e5aef89e4a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs @@ -42,12 +42,6 @@ public override DateRangeQuery Read(ref Utf8JsonReader reader, Type typeToConver if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -90,6 +84,12 @@ public override DateRangeQuery Read(ref Utf8JsonReader reader, Type typeToConver continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "relation") { variant.Relation = JsonSerializer.Deserialize(ref reader, options); @@ -123,12 +123,6 @@ public override void Write(Utf8JsonWriter writer, DateRangeQuery value, JsonSeri writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -171,6 +165,12 @@ public override void Write(Utf8JsonWriter writer, DateRangeQuery value, JsonSeri JsonSerializer.Serialize(writer, value.Lte, options); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Relation is not null) { writer.WritePropertyName("relation"); @@ -272,7 +272,6 @@ public DateRangeQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? FormatValue { get; set; } @@ -281,16 +280,11 @@ public DateRangeQueryDescriptor(Expression> field) private Elastic.Clients.Elasticsearch.DateMath? GteValue { get; set; } private Elastic.Clients.Elasticsearch.DateMath? LtValue { get; set; } private Elastic.Clients.Elasticsearch.DateMath? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? RelationValue { get; set; } private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.DateMath? ToValue { get; set; } - public DateRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public DateRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -360,6 +354,12 @@ public DateRangeQueryDescriptor Lte(Elastic.Clients.Elasticsearch.Dat return Self; } + public DateRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public DateRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -388,12 +388,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -436,6 +430,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LteValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); @@ -474,7 +474,6 @@ public DateRangeQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? FormatValue { get; set; } @@ -483,16 +482,11 @@ public DateRangeQueryDescriptor(Field field) private Elastic.Clients.Elasticsearch.DateMath? GteValue { get; set; } private Elastic.Clients.Elasticsearch.DateMath? LtValue { get; set; } private Elastic.Clients.Elasticsearch.DateMath? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? RelationValue { get; set; } private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.DateMath? ToValue { get; set; } - public DateRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public DateRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -568,6 +562,12 @@ public DateRangeQueryDescriptor Lte(Elastic.Clients.Elasticsearch.DateMath? lte) return Self; } + public DateRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public DateRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -596,12 +596,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -644,6 +638,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LteValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs index a6e6e09758f..6238c55cfe7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs @@ -59,14 +59,20 @@ public DisMaxQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection QueriesValue { get; set; } private QueryDescriptor QueriesDescriptor { get; set; } private Action> QueriesDescriptorAction { get; set; } private Action>[] QueriesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private double? TieBreakerValue { get; set; } + public DisMaxQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// One or more query clauses.
Returned documents must match one or more of these queries.
If a document matches multiple queries, Elasticsearch uses the highest relevance score.
///
@@ -112,12 +118,6 @@ public DisMaxQueryDescriptor QueryName(string? queryName) return Self; } - public DisMaxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. /// @@ -130,6 +130,12 @@ public DisMaxQueryDescriptor TieBreaker(double? tieBreaker) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (QueriesDescriptor is not null) { writer.WritePropertyName("queries"); @@ -167,12 +173,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (TieBreakerValue.HasValue) { writer.WritePropertyName("tie_breaker"); @@ -191,14 +191,20 @@ public DisMaxQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection QueriesValue { get; set; } private QueryDescriptor QueriesDescriptor { get; set; } private Action QueriesDescriptorAction { get; set; } private Action[] QueriesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private double? TieBreakerValue { get; set; } + public DisMaxQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// One or more query clauses.
Returned documents must match one or more of these queries.
If a document matches multiple queries, Elasticsearch uses the highest relevance score.
///
@@ -244,12 +250,6 @@ public DisMaxQueryDescriptor QueryName(string? queryName) return Self; } - public DisMaxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. /// @@ -262,6 +262,12 @@ public DisMaxQueryDescriptor TieBreaker(double? tieBreaker) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (QueriesDescriptor is not null) { writer.WritePropertyName("queries"); @@ -299,12 +305,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (TieBreakerValue.HasValue) { writer.WritePropertyName("tie_breaker"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs index 081f0f9d6b8..9afe19e2d27 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs @@ -53,15 +53,9 @@ public ExistsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - - public ExistsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public ExistsQueryDescriptor Boost(float? boost) { @@ -87,15 +81,15 @@ public ExistsQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -104,6 +98,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } @@ -116,15 +116,9 @@ public ExistsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - - public ExistsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public ExistsQueryDescriptor Boost(float? boost) { @@ -159,15 +153,15 @@ public ExistsQueryDescriptor Field(Expression return Self; } + public ExistsQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -176,6 +170,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs index c33e5cb386c..76c68fc1ca4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs @@ -83,20 +83,35 @@ public FunctionScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } private ICollection? FunctionsValue { get; set; } private FunctionScoreDescriptor FunctionsDescriptor { get; set; } private Action> FunctionsDescriptorAction { get; set; } private Action>[] FunctionsDescriptorActions { get; set; } + private double? MaxBoostValue { get; set; } + private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } - private double? MaxBoostValue { get; set; } - private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreMode? ScoreModeValue { get; set; } + public FunctionScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Defines how he newly computed score is combined with the score of the query + /// + public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? boostMode) + { + BoostModeValue = boostMode; + return Self; + } + /// /// One or more functions that compute a new score for each document returned by the query. /// @@ -136,6 +151,24 @@ public FunctionScoreQueryDescriptor Functions(params Action + /// Restricts the new score to not exceed the provided limit. + ///
+ public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) + { + MaxBoostValue = maxBoost; + return Self; + } + + /// + /// Excludes documents that do not meet the provided score threshold. + /// + public FunctionScoreQueryDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// A query that determines the documents for which a new score is computed. /// @@ -169,39 +202,6 @@ public FunctionScoreQueryDescriptor QueryName(string? queryName) return Self; } - public FunctionScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Defines how he newly computed score is combined with the score of the query - /// - public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? boostMode) - { - BoostModeValue = boostMode; - return Self; - } - - /// - /// Restricts the new score to not exceed the provided limit. - /// - public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) - { - MaxBoostValue = maxBoost; - return Self; - } - - /// - /// Excludes documents that do not meet the provided score threshold. - /// - public FunctionScoreQueryDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Specifies how the computed scores are combined /// @@ -214,6 +214,18 @@ public FunctionScoreQueryDescriptor ScoreMode(Elastic.Clients.Elastic protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (BoostModeValue is not null) + { + writer.WritePropertyName("boost_mode"); + JsonSerializer.Serialize(writer, BoostModeValue, options); + } + if (FunctionsDescriptor is not null) { writer.WritePropertyName("functions"); @@ -245,6 +257,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FunctionsValue, options); } + if (MaxBoostValue.HasValue) + { + writer.WritePropertyName("max_boost"); + writer.WriteNumberValue(MaxBoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -267,30 +291,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostModeValue is not null) - { - writer.WritePropertyName("boost_mode"); - JsonSerializer.Serialize(writer, BoostModeValue, options); - } - - if (MaxBoostValue.HasValue) - { - writer.WritePropertyName("max_boost"); - writer.WriteNumberValue(MaxBoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); @@ -309,20 +309,35 @@ public FunctionScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } private ICollection? FunctionsValue { get; set; } private FunctionScoreDescriptor FunctionsDescriptor { get; set; } private Action FunctionsDescriptorAction { get; set; } private Action[] FunctionsDescriptorActions { get; set; } + private double? MaxBoostValue { get; set; } + private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } - private double? MaxBoostValue { get; set; } - private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreMode? ScoreModeValue { get; set; } + public FunctionScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Defines how he newly computed score is combined with the score of the query + /// + public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? boostMode) + { + BoostModeValue = boostMode; + return Self; + } + /// /// One or more functions that compute a new score for each document returned by the query. /// @@ -362,6 +377,24 @@ public FunctionScoreQueryDescriptor Functions(params Action + /// Restricts the new score to not exceed the provided limit. + ///
+ public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) + { + MaxBoostValue = maxBoost; + return Self; + } + + /// + /// Excludes documents that do not meet the provided score threshold. + /// + public FunctionScoreQueryDescriptor MinScore(double? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// A query that determines the documents for which a new score is computed. /// @@ -395,39 +428,6 @@ public FunctionScoreQueryDescriptor QueryName(string? queryName) return Self; } - public FunctionScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Defines how he newly computed score is combined with the score of the query - /// - public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? boostMode) - { - BoostModeValue = boostMode; - return Self; - } - - /// - /// Restricts the new score to not exceed the provided limit. - /// - public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) - { - MaxBoostValue = maxBoost; - return Self; - } - - /// - /// Excludes documents that do not meet the provided score threshold. - /// - public FunctionScoreQueryDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Specifies how the computed scores are combined /// @@ -440,6 +440,18 @@ public FunctionScoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Quer protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (BoostModeValue is not null) + { + writer.WritePropertyName("boost_mode"); + JsonSerializer.Serialize(writer, BoostModeValue, options); + } + if (FunctionsDescriptor is not null) { writer.WritePropertyName("functions"); @@ -471,6 +483,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FunctionsValue, options); } + if (MaxBoostValue.HasValue) + { + writer.WritePropertyName("max_boost"); + writer.WriteNumberValue(MaxBoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -493,30 +517,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostModeValue is not null) - { - writer.WritePropertyName("boost_mode"); - JsonSerializer.Serialize(writer, BoostModeValue, options); - } - - if (MaxBoostValue.HasValue) - { - writer.WritePropertyName("max_boost"); - writer.WriteNumberValue(MaxBoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs index b245938bc21..93cf84fa4be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs @@ -42,12 +42,6 @@ public override FuzzyQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -72,6 +66,12 @@ public override FuzzyQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -105,12 +105,6 @@ public override void Write(Utf8JsonWriter writer, FuzzyQuery value, JsonSerializ writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -135,6 +129,12 @@ public override void Write(Utf8JsonWriter writer, FuzzyQuery value, JsonSerializ writer.WriteNumberValue(value.PrefixLength.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -229,22 +229,16 @@ public FuzzyQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Fuzziness? FuzzinessValue { get; set; } private int? MaxExpansionsValue { get; set; } private int? PrefixLengthValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private bool? TranspositionsValue { get; set; } private object ValueValue { get; set; } - public FuzzyQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public FuzzyQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -290,6 +284,12 @@ public FuzzyQueryDescriptor PrefixLength(int? prefixLength) return Self; } + public FuzzyQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Number of beginning characters left unchanged when creating expansions. /// @@ -324,12 +324,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -354,6 +348,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PrefixLengthValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -388,22 +388,16 @@ public FuzzyQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Fuzziness? FuzzinessValue { get; set; } private int? MaxExpansionsValue { get; set; } private int? PrefixLengthValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private bool? TranspositionsValue { get; set; } private object ValueValue { get; set; } - public FuzzyQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public FuzzyQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -455,6 +449,12 @@ public FuzzyQueryDescriptor PrefixLength(int? prefixLength) return Self; } + public FuzzyQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Number of beginning characters left unchanged when creating expansions. /// @@ -489,12 +489,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -519,6 +513,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PrefixLengthValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs index 5063b5a6545..7cbbde5a2ae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs @@ -39,12 +39,6 @@ public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToC if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -57,6 +51,12 @@ public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToC continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "validation_method") { variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, GeoBoundingBoxQuery value, Jso JsonSerializer.Serialize(writer, value.BoundingBox, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -105,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, GeoBoundingBoxQuery value, Jso writer.WriteBooleanValue(value.IgnoreUnmapped.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ValidationMethod is not null) { writer.WritePropertyName("validation_method"); @@ -146,18 +146,12 @@ public GeoBoundingBoxQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.GeoBounds BoundingBoxValue { get; set; } - - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } public GeoBoundingBoxQueryDescriptor Boost(float? boost) { @@ -174,6 +168,12 @@ public GeoBoundingBoxQueryDescriptor IgnoreUnmapped(bool? ignoreUnmap return Self; } + public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -211,12 +211,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BoundingBoxValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -229,6 +223,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); @@ -247,18 +247,12 @@ public GeoBoundingBoxQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.GeoBounds BoundingBoxValue { get; set; } - - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } public GeoBoundingBoxQueryDescriptor Boost(float? boost) { @@ -275,6 +269,12 @@ public GeoBoundingBoxQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) return Self; } + public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -318,12 +318,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BoundingBoxValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -336,6 +330,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs index 0db472596a1..7c7e305dde8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs @@ -39,12 +39,6 @@ public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConv if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -63,6 +57,18 @@ public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConv continue; } + if (property == "ignore_unmapped") + { + variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "validation_method") { variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); @@ -93,12 +99,6 @@ public override void Write(Utf8JsonWriter writer, GeoDistanceQuery value, JsonSe JsonSerializer.Serialize(writer, value.Location, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -113,6 +113,18 @@ public override void Write(Utf8JsonWriter writer, GeoDistanceQuery value, JsonSe JsonSerializer.Serialize(writer, value.DistanceType, options); } + if (value.IgnoreUnmapped.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(value.IgnoreUnmapped.Value); + } + + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ValidationMethod is not null) { writer.WritePropertyName("validation_method"); @@ -139,6 +151,11 @@ public sealed partial class GeoDistanceQuery : SearchQuery ///
public Elastic.Clients.Elasticsearch.GeoDistanceType? DistanceType { get; set; } public Elastic.Clients.Elasticsearch.Field Field { get; set; } + + /// + /// Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
+ ///
+ public bool? IgnoreUnmapped { get; set; } public Elastic.Clients.Elasticsearch.GeoLocation Location { get; set; } /// @@ -159,20 +176,15 @@ public GeoDistanceQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private string DistanceValue { get; set; } private Elastic.Clients.Elasticsearch.GeoDistanceType? DistanceTypeValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.GeoLocation LocationValue { get; set; } - public GeoDistanceQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoDistanceQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -197,6 +209,21 @@ public GeoDistanceQueryDescriptor DistanceType(Elastic.Clients.Elasti return Self; } + /// + /// Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
+ ///
+ public GeoDistanceQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + public GeoDistanceQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -234,12 +261,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LocationValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -254,6 +275,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DistanceTypeValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); @@ -272,20 +305,15 @@ public GeoDistanceQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private string DistanceValue { get; set; } private Elastic.Clients.Elasticsearch.GeoDistanceType? DistanceTypeValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.GeoLocation LocationValue { get; set; } - public GeoDistanceQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoDistanceQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -310,6 +338,21 @@ public GeoDistanceQueryDescriptor DistanceType(Elastic.Clients.Elasticsearch.Geo return Self; } + /// + /// Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
+ ///
+ public GeoDistanceQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + + public GeoDistanceQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
Set to `COERCE` to also try to infer correct latitude or longitude.
///
@@ -353,12 +396,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, LocationValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -373,6 +410,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DistanceTypeValue, options); } + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs index f756906ad13..97b2ea591a6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs @@ -39,12 +39,6 @@ public override GeoPolygonQuery Read(ref Utf8JsonReader reader, Type typeToConve if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -57,6 +51,12 @@ public override GeoPolygonQuery Read(ref Utf8JsonReader reader, Type typeToConve continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "validation_method") { variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, GeoPolygonQuery value, JsonSer JsonSerializer.Serialize(writer, value.Polygon, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -105,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, GeoPolygonQuery value, JsonSer writer.WriteBooleanValue(value.IgnoreUnmapped.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ValidationMethod is not null) { writer.WritePropertyName("validation_method"); @@ -138,21 +138,15 @@ public GeoPolygonQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonPoints PolygonValue { get; set; } private GeoPolygonPointsDescriptor PolygonDescriptor { get; set; } private Action PolygonDescriptorAction { get; set; } - public GeoPolygonQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoPolygonQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -165,6 +159,12 @@ public GeoPolygonQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped return Self; } + public GeoPolygonQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public GeoPolygonQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? validationMethod) { ValidationMethodValue = validationMethod; @@ -227,12 +227,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -245,6 +239,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); @@ -263,21 +263,15 @@ public GeoPolygonQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonPoints PolygonValue { get; set; } private GeoPolygonPointsDescriptor PolygonDescriptor { get; set; } private Action PolygonDescriptorAction { get; set; } - public GeoPolygonQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public GeoPolygonQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -290,6 +284,12 @@ public GeoPolygonQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) return Self; } + public GeoPolygonQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public GeoPolygonQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? validationMethod) { ValidationMethodValue = validationMethod; @@ -358,12 +358,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -376,6 +370,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValidationMethodValue is not null) { writer.WritePropertyName("validation_method"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs index c27b4a1f057..367d29f1e10 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs @@ -89,20 +89,35 @@ public HasChildQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } + private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private int? MaxChildrenValue { get; set; } - private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } private string TypeValue { get; set; } + public HasChildQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. + /// + public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -130,6 +145,24 @@ public HasChildQueryDescriptor InnerHits(Action + /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + + /// + /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MinChildren(int? minChildren) + { + MinChildrenValue = minChildren; + return Self; + } + /// /// Query you wish to run on child documents of the `type` field.
If a child document matches the search, the query returns the parent document.
///
@@ -163,39 +196,6 @@ public HasChildQueryDescriptor QueryName(string? queryName) return Self; } - public HasChildQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. - /// - public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MinChildren(int? minChildren) - { - MinChildrenValue = minChildren; - return Self; - } - /// /// Indicates how scores for matching child documents affect the root parent document’s relevance score. /// @@ -217,6 +217,18 @@ public HasChildQueryDescriptor Type(string type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -233,6 +245,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + + if (MinChildrenValue.HasValue) + { + writer.WritePropertyName("min_children"); + writer.WriteNumberValue(MinChildrenValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -255,30 +279,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (MinChildrenValue.HasValue) - { - writer.WritePropertyName("min_children"); - writer.WriteNumberValue(MinChildrenValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); @@ -299,20 +299,35 @@ public HasChildQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } + private int? MaxChildrenValue { get; set; } + private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private int? MaxChildrenValue { get; set; } - private int? MinChildrenValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } private string TypeValue { get; set; } + public HasChildQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. + /// + public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -340,6 +355,24 @@ public HasChildQueryDescriptor InnerHits(Action return Self; } + /// + /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MaxChildren(int? maxChildren) + { + MaxChildrenValue = maxChildren; + return Self; + } + + /// + /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
+ ///
+ public HasChildQueryDescriptor MinChildren(int? minChildren) + { + MinChildrenValue = minChildren; + return Self; + } + /// /// Query you wish to run on child documents of the `type` field.
If a child document matches the search, the query returns the parent document.
///
@@ -373,39 +406,6 @@ public HasChildQueryDescriptor QueryName(string? queryName) return Self; } - public HasChildQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. - /// - public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
- ///
- public HasChildQueryDescriptor MinChildren(int? minChildren) - { - MinChildrenValue = minChildren; - return Self; - } - /// /// Indicates how scores for matching child documents affect the root parent document’s relevance score. /// @@ -427,6 +427,18 @@ public HasChildQueryDescriptor Type(string type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -443,6 +455,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + if (MaxChildrenValue.HasValue) + { + writer.WritePropertyName("max_children"); + writer.WriteNumberValue(MaxChildrenValue.Value); + } + + if (MinChildrenValue.HasValue) + { + writer.WritePropertyName("min_children"); + writer.WriteNumberValue(MinChildrenValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -465,30 +489,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (MinChildrenValue.HasValue) - { - writer.WritePropertyName("min_children"); - writer.WriteNumberValue(MinChildrenValue.Value); - } - if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs index 87885d7c857..49abf7d34eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs @@ -77,18 +77,33 @@ public HasParentQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } + private string ParentTypeValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string ParentTypeValue { get; set; } private bool? ScoreValue { get; set; } + public HasParentQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
+ ///
+ public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -116,6 +131,15 @@ public HasParentQueryDescriptor InnerHits(Action + /// Name of the parent relationship mapped for the `join` field. + ///
+ public HasParentQueryDescriptor ParentType(string parentType) + { + ParentTypeValue = parentType; + return Self; + } + /// /// Query you wish to run on parent documents of the `parent_type` field.
If a parent document matches the search, the query returns its child documents.
///
@@ -149,30 +173,6 @@ public HasParentQueryDescriptor QueryName(string? queryName) return Self; } - public HasParentQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
- ///
- public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Name of the parent relationship mapped for the `join` field. - /// - public HasParentQueryDescriptor ParentType(string parentType) - { - ParentTypeValue = parentType; - return Self; - } - /// /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. /// @@ -185,6 +185,18 @@ public HasParentQueryDescriptor Score(bool? score = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -201,6 +213,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("parent_type"); + JsonSerializer.Serialize(writer, ParentTypeValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -223,20 +237,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("parent_type"); - JsonSerializer.Serialize(writer, ParentTypeValue, options); if (ScoreValue.HasValue) { writer.WritePropertyName("score"); @@ -255,18 +255,33 @@ public HasParentQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } + private string ParentTypeValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string ParentTypeValue { get; set; } private bool? ScoreValue { get; set; } + public HasParentQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
+ ///
+ public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -294,6 +309,15 @@ public HasParentQueryDescriptor InnerHits(Action + /// Name of the parent relationship mapped for the `join` field. + ///
+ public HasParentQueryDescriptor ParentType(string parentType) + { + ParentTypeValue = parentType; + return Self; + } + /// /// Query you wish to run on parent documents of the `parent_type` field.
If a parent document matches the search, the query returns its child documents.
///
@@ -327,30 +351,6 @@ public HasParentQueryDescriptor QueryName(string? queryName) return Self; } - public HasParentQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
- ///
- public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Name of the parent relationship mapped for the `join` field. - /// - public HasParentQueryDescriptor ParentType(string parentType) - { - ParentTypeValue = parentType; - return Self; - } - /// /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. /// @@ -363,6 +363,18 @@ public HasParentQueryDescriptor Score(bool? score = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -379,6 +391,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("parent_type"); + JsonSerializer.Serialize(writer, ParentTypeValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -401,20 +415,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("parent_type"); - JsonSerializer.Serialize(writer, ParentTypeValue, options); if (ScoreValue.HasValue) { writer.WritePropertyName("score"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs index ac7d9013185..5fe15e69ef4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs @@ -53,19 +53,19 @@ public IdsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Ids? ValuesValue { get; set; } - public IdsQueryDescriptor QueryName(string? queryName) + public IdsQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public IdsQueryDescriptor Boost(float? boost) + public IdsQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -81,18 +81,18 @@ public IdsQueryDescriptor Values(Elastic.Clients.Elasticsearch.Ids? values) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ValuesValue is not null) { writer.WritePropertyName("values"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs index fe69ede394d..9d97b5dd8cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs @@ -62,16 +62,43 @@ public IntervalsAllOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action> IntervalsDescriptorAction { get; set; } private Action>[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } private int? MaxGapsValue { get; set; } private bool? OrderedValue { get; set; } + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAllOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. /// @@ -111,33 +138,6 @@ public IntervalsAllOfDescriptor Intervals(params Action - /// Rule used to filter returned intervals. - /// - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Maximum number of positions between the matching terms.
Intervals produced by the rules further apart than this are not considered matches.
///
@@ -159,6 +159,22 @@ public IntervalsAllOfDescriptor Ordered(bool? ordered = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -190,22 +206,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (MaxGapsValue.HasValue) { writer.WritePropertyName("max_gaps"); @@ -230,16 +230,43 @@ public IntervalsAllOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action IntervalsDescriptorAction { get; set; } private Action[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } private int? MaxGapsValue { get; set; } private bool? OrderedValue { get; set; } + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAllOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + /// /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. /// @@ -279,33 +306,6 @@ public IntervalsAllOfDescriptor Intervals(params Action[] c return Self; } - /// - /// Rule used to filter returned intervals. - /// - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAllOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - /// /// Maximum number of positions between the matching terms.
Intervals produced by the rules further apart than this are not considered matches.
///
@@ -327,6 +327,22 @@ public IntervalsAllOfDescriptor Ordered(bool? ordered = true) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -358,22 +374,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - if (MaxGapsValue.HasValue) { writer.WritePropertyName("max_gaps"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs index 086358509bb..1eaae533892 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs @@ -50,13 +50,40 @@ public IntervalsAnyOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action> IntervalsDescriptorAction { get; set; } private Action>[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } + + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } /// /// An array of rules to match. @@ -97,36 +124,25 @@ public IntervalsAnyOfDescriptor Intervals(params Action - /// Rule used to filter returned intervals. - /// - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -158,22 +174,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - writer.WriteEndObject(); } } @@ -186,13 +186,40 @@ public IntervalsAnyOfDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } + private IntervalsFilterDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } private ICollection IntervalsValue { get; set; } private IntervalsDescriptor IntervalsDescriptor { get; set; } private Action IntervalsDescriptorAction { get; set; } private Action[] IntervalsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } + + /// + /// Rule used to filter returned intervals. + /// + public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public IntervalsAnyOfDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } /// /// An array of rules to match. @@ -233,36 +260,25 @@ public IntervalsAnyOfDescriptor Intervals(params Action[] c return Self; } - /// - /// Rule used to filter returned intervals. - /// - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + if (IntervalsDescriptor is not null) { writer.WritePropertyName("intervals"); @@ -294,22 +310,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IntervalsValue, options); } - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs index daaf66c1f42..bfbad9fe569 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs @@ -261,15 +261,9 @@ private IntervalsQueryDescriptor Set(object variant, string variantNa return Self; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - - public IntervalsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public IntervalsQueryDescriptor Boost(float? boost) { @@ -289,6 +283,12 @@ public IntervalsQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public IntervalsQueryDescriptor AllOf(IntervalsAllOf intervalsAllOf) => Set(intervalsAllOf, "all_of"); public IntervalsQueryDescriptor AllOf(Action> configure) => Set(configure, "all_of"); public IntervalsQueryDescriptor AnyOf(IntervalsAnyOf intervalsAnyOf) => Set(intervalsAnyOf, "any_of"); @@ -307,18 +307,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); @@ -376,15 +376,9 @@ private IntervalsQueryDescriptor Set(object variant, string variantName) return Self; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - - public IntervalsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public IntervalsQueryDescriptor Boost(float? boost) { @@ -410,6 +404,12 @@ public IntervalsQueryDescriptor Field(Expression Set(intervalsAllOf, "all_of"); public IntervalsQueryDescriptor AllOf(Action configure) => Set(configure, "all_of"); public IntervalsQueryDescriptor AllOf(Action> configure) => Set(configure, "all_of"); @@ -434,18 +434,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs index 541b2937532..1645a4a94d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -66,45 +66,45 @@ public LikeDocumentDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } private Fields? FieldsValue { get; set; } + private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } /// - /// ID of a document. + /// A document not present in the index. /// - public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) + public LikeDocumentDescriptor Doc(object? doc) { - IdValue = id; + DocValue = doc; return Self; } - /// - /// Index of a document. - /// - public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + public LikeDocumentDescriptor Fields(Fields? fields) { - IndexValue = index; + FieldsValue = fields; return Self; } /// - /// A document not present in the index. + /// ID of a document. /// - public LikeDocumentDescriptor Doc(object? doc) + public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) { - DocValue = doc; + IdValue = id; return Self; } - public LikeDocumentDescriptor Fields(Fields? fields) + /// + /// Index of a document. + /// + public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) { - FieldsValue = fields; + IndexValue = index; return Self; } @@ -135,18 +135,6 @@ public LikeDocumentDescriptor VersionType(Elastic.Clients.Elasticsear protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); @@ -159,6 +147,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); @@ -195,45 +195,45 @@ public LikeDocumentDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private object? DocValue { get; set; } private Fields? FieldsValue { get; set; } + private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } /// - /// ID of a document. + /// A document not present in the index. /// - public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) + public LikeDocumentDescriptor Doc(object? doc) { - IdValue = id; + DocValue = doc; return Self; } - /// - /// Index of a document. - /// - public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + public LikeDocumentDescriptor Fields(Fields? fields) { - IndexValue = index; + FieldsValue = fields; return Self; } /// - /// A document not present in the index. + /// ID of a document. /// - public LikeDocumentDescriptor Doc(object? doc) + public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) { - DocValue = doc; + IdValue = id; return Self; } - public LikeDocumentDescriptor Fields(Fields? fields) + /// + /// Index of a document. + /// + public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) { - FieldsValue = fields; + IndexValue = index; return Self; } @@ -264,18 +264,6 @@ public LikeDocumentDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionT protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - if (DocValue is not null) { writer.WritePropertyName("doc"); @@ -288,6 +276,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } + if (IdValue is not null) + { + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs index c312715eaea..5e9658d7347 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs @@ -47,36 +47,36 @@ public MatchAllQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } - public MatchAllQueryDescriptor QueryName(string? queryName) + public MatchAllQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public MatchAllQueryDescriptor Boost(float? boost) + public MatchAllQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs index cd0a6354ccf..9a3506456ed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs @@ -42,12 +42,6 @@ public override MatchBoolPrefixQuery Read(ref Utf8JsonReader reader, Type typeTo if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -107,6 +101,12 @@ public override MatchBoolPrefixQuery Read(ref Utf8JsonReader reader, Type typeTo variant.Query = JsonSerializer.Deserialize(ref reader, options); continue; } + + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } } } @@ -123,12 +123,6 @@ public override void Write(Utf8JsonWriter writer, MatchBoolPrefixQuery value, Js writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -185,6 +179,12 @@ public override void Write(Utf8JsonWriter writer, MatchBoolPrefixQuery value, Js writer.WritePropertyName("query"); writer.WriteStringValue(value.Query); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WriteEndObject(); writer.WriteEndObject(); return; @@ -280,7 +280,6 @@ public MatchBoolPrefixQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -292,12 +291,7 @@ public MatchBoolPrefixQueryDescriptor(Expression> field) private Elastic.Clients.Elasticsearch.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } - - public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } /// /// Analyzer used to convert the text in the query value into tokens. @@ -398,6 +392,12 @@ public MatchBoolPrefixQueryDescriptor Query(string query) return Self; } + public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -405,12 +405,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -467,6 +461,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } @@ -487,7 +487,6 @@ public MatchBoolPrefixQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } @@ -499,12 +498,7 @@ public MatchBoolPrefixQueryDescriptor(Field field) private Elastic.Clients.Elasticsearch.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } - - public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } /// /// Analyzer used to convert the text in the query value into tokens. @@ -611,6 +605,12 @@ public MatchBoolPrefixQueryDescriptor Query(string query) return Self; } + public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -618,12 +618,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -680,6 +674,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs index 22d40401af0..0375a3da343 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs @@ -47,36 +47,36 @@ public MatchNoneQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } - public MatchNoneQueryDescriptor QueryName(string? queryName) + public MatchNoneQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public MatchNoneQueryDescriptor Boost(float? boost) + public MatchNoneQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs index 43dc39ce5f5..de5e1e8b602 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs @@ -42,12 +42,6 @@ public override MatchPhrasePrefixQuery Read(ref Utf8JsonReader reader, Type type if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -72,6 +66,12 @@ public override MatchPhrasePrefixQuery Read(ref Utf8JsonReader reader, Type type continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "slop") { variant.Slop = JsonSerializer.Deserialize(ref reader, options); @@ -99,12 +99,6 @@ public override void Write(Utf8JsonWriter writer, MatchPhrasePrefixQuery value, writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -125,6 +119,12 @@ public override void Write(Utf8JsonWriter writer, MatchPhrasePrefixQuery value, writer.WritePropertyName("query"); writer.WriteStringValue(value.Query); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Slop.HasValue) { writer.WritePropertyName("slop"); @@ -212,21 +212,15 @@ public MatchPhrasePrefixQueryDescriptor(Expression> fiel FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private int? MaxExpansionsValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert text in the query value into tokens. /// @@ -272,6 +266,12 @@ public MatchPhrasePrefixQueryDescriptor Query(string query) return Self; } + public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -297,12 +297,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -323,6 +317,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -355,21 +355,15 @@ public MatchPhrasePrefixQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private int? MaxExpansionsValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert text in the query value into tokens. /// @@ -421,6 +415,12 @@ public MatchPhrasePrefixQueryDescriptor Query(string query) return Self; } + public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -446,12 +446,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -472,6 +466,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs index d0e137b8a10..1c310ccd112 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs @@ -42,12 +42,6 @@ public override MatchPhraseQuery Read(ref Utf8JsonReader reader, Type typeToConv if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -66,6 +60,12 @@ public override MatchPhraseQuery Read(ref Utf8JsonReader reader, Type typeToConv continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "slop") { variant.Slop = JsonSerializer.Deserialize(ref reader, options); @@ -93,12 +93,6 @@ public override void Write(Utf8JsonWriter writer, MatchPhraseQuery value, JsonSe writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -113,6 +107,12 @@ public override void Write(Utf8JsonWriter writer, MatchPhraseQuery value, JsonSe writer.WritePropertyName("query"); writer.WriteStringValue(value.Query); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Slop.HasValue) { writer.WritePropertyName("slop"); @@ -195,20 +195,14 @@ public MatchPhraseQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhraseQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -245,6 +239,12 @@ public MatchPhraseQueryDescriptor Query(string query) return Self; } + public MatchPhraseQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -270,12 +270,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -290,6 +284,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -322,20 +322,14 @@ public MatchPhraseQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchPhraseQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -378,6 +372,12 @@ public MatchPhraseQueryDescriptor Query(string query) return Self; } + public MatchPhraseQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -403,12 +403,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -423,6 +417,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs index afa19135ea5..88ed5380bb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs @@ -42,12 +42,6 @@ public override MatchQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "analyzer") { variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); @@ -120,6 +114,12 @@ public override MatchQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "zero_terms_query") { variant.ZeroTermsQuery = JsonSerializer.Deserialize(ref reader, options); @@ -141,12 +141,6 @@ public override void Write(Utf8JsonWriter writer, MatchQuery value, JsonSerializ writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (!string.IsNullOrEmpty(value.Analyzer)) { writer.WritePropertyName("analyzer"); @@ -215,6 +209,12 @@ public override void Write(Utf8JsonWriter writer, MatchQuery value, JsonSerializ writer.WritePropertyName("query"); JsonSerializer.Serialize(writer, value.Query, options); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.ZeroTermsQuery is not null) { writer.WritePropertyName("zero_terms_query"); @@ -331,7 +331,6 @@ public MatchQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -345,14 +344,9 @@ public MatchQueryDescriptor(Expression> field) private Elastic.Clients.Elasticsearch.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -470,6 +464,12 @@ public MatchQueryDescriptor Query(string query) return Self; } + public MatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter. /// @@ -486,12 +486,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -560,6 +554,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); JsonSerializer.Serialize(writer, QueryValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); @@ -586,7 +586,6 @@ public MatchQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -600,14 +599,9 @@ public MatchQueryDescriptor(Field field) private Elastic.Clients.Elasticsearch.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -731,6 +725,12 @@ public MatchQueryDescriptor Query(string query) return Self; } + public MatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter. /// @@ -747,12 +747,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -821,6 +815,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); JsonSerializer.Serialize(writer, QueryValue, options); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (ZeroTermsQueryValue is not null) { writer.WritePropertyName("zero_terms_query"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs index 293cef031e8..7a2e089afb0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -67,7 +67,8 @@ public sealed partial class MoreLikeThisQuery : SearchQuery /// /// Specifies free form text and/or a single or multiple documents for which you want to find similar documents. /// - [JsonInclude, JsonPropertyName("like"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Like))] + [JsonInclude, JsonPropertyName("like")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Like))] public ICollection Like { get; set; } /// @@ -130,7 +131,8 @@ public sealed partial class MoreLikeThisQuery : SearchQuery /// /// Used in combination with `like` to exclude documents that match a set of terms. /// - [JsonInclude, JsonPropertyName("unlike"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Like))] + [JsonInclude, JsonPropertyName("unlike")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Like))] public ICollection? Unlike { get; set; } [JsonInclude, JsonPropertyName("version")] public long? Version { get; set; } @@ -150,7 +152,6 @@ public MoreLikeThisQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private double? BoostTermsValue { get; set; } @@ -162,22 +163,17 @@ public MoreLikeThisQueryDescriptor() : base() private int? MaxQueryTermsValue { get; set; } private int? MaxWordLengthValue { get; set; } private int? MinDocFreqValue { get; set; } + private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } private ICollection? UnlikeValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// The analyzer that is used to analyze the free form text.
Defaults to the analyzer associated with the first field in fields.
///
@@ -274,6 +270,15 @@ public MoreLikeThisQueryDescriptor MinDocFreq(int? minDocFreq) return Self; } + /// + /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// + public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The minimum term frequency below which the terms are ignored from the input document. /// @@ -293,20 +298,17 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) } /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// Overrides the default analyzer. /// - public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { - MinimumShouldMatchValue = minimumShouldMatch; + PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) + public MoreLikeThisQueryDescriptor QueryName(string? queryName) { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); + QueryNameValue = queryName; return Self; } @@ -349,12 +351,6 @@ public MoreLikeThisQueryDescriptor VersionType(Elastic.Clients.Elasti protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -417,6 +413,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinDocFreqValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinTermFreqValue.HasValue) { writer.WritePropertyName("min_term_freq"); @@ -429,18 +431,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); @@ -483,7 +485,6 @@ public MoreLikeThisQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private float? BoostValue { get; set; } private double? BoostTermsValue { get; set; } @@ -495,22 +496,17 @@ public MoreLikeThisQueryDescriptor() : base() private int? MaxQueryTermsValue { get; set; } private int? MaxWordLengthValue { get; set; } private int? MinDocFreqValue { get; set; } + private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private IDictionary? PerFieldAnalyzerValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } private ICollection? UnlikeValue { get; set; } private long? VersionValue { get; set; } private Elastic.Clients.Elasticsearch.VersionType? VersionTypeValue { get; set; } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// The analyzer that is used to analyze the free form text.
Defaults to the analyzer associated with the first field in fields.
///
@@ -607,6 +603,15 @@ public MoreLikeThisQueryDescriptor MinDocFreq(int? minDocFreq) return Self; } + /// + /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// + public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + { + MinimumShouldMatchValue = minimumShouldMatch; + return Self; + } + /// /// The minimum term frequency below which the terms are ignored from the input document. /// @@ -626,20 +631,17 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) } /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. + /// Overrides the default analyzer. /// - public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.MinimumShouldMatch? minimumShouldMatch) + public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { - MinimumShouldMatchValue = minimumShouldMatch; + PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) + public MoreLikeThisQueryDescriptor QueryName(string? queryName) { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); + QueryNameValue = queryName; return Self; } @@ -682,12 +684,6 @@ public MoreLikeThisQueryDescriptor VersionType(Elastic.Clients.Elasticsearch.Ver protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -750,6 +746,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinDocFreqValue.Value); } + if (MinimumShouldMatchValue is not null) + { + writer.WritePropertyName("minimum_should_match"); + JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); + } + if (MinTermFreqValue.HasValue) { writer.WritePropertyName("min_term_freq"); @@ -762,18 +764,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - if (PerFieldAnalyzerValue is not null) { writer.WritePropertyName("per_field_analyzer"); JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs index fb7d3b17848..715e844e8e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs @@ -143,7 +143,6 @@ public MultiMatchQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -157,17 +156,12 @@ public MultiMatchQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private double? TieBreakerValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? TypeValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MultiMatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -282,6 +276,12 @@ public MultiMatchQueryDescriptor Query(string query) return Self; } + public MultiMatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -321,12 +321,6 @@ public MultiMatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elast protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -401,6 +395,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -437,7 +437,6 @@ public MultiMatchQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private string? AnalyzerValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } @@ -451,17 +450,12 @@ public MultiMatchQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.Operator? OperatorValue { get; set; } private int? PrefixLengthValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } private double? TieBreakerValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? TypeValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - public MultiMatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// Analyzer used to convert the text in the query value into tokens. /// @@ -576,6 +570,12 @@ public MultiMatchQueryDescriptor Query(string query) return Self; } + public MultiMatchQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Maximum number of positions allowed between matching tokens. /// @@ -615,12 +615,6 @@ public MultiMatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Qu protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); @@ -695,6 +689,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs index 5277e8c2a55..777d56afc0c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs @@ -77,18 +77,33 @@ public NestedQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action> InnerHitsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } + public NestedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. + /// + public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -116,6 +131,24 @@ public NestedQueryDescriptor InnerHits(Action + /// Path to the nested object you wish to search. + ///
+ public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Field path) + { + PathValue = path; + return Self; + } + + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Expression> path) + { + PathValue = path; + return Self; + } + /// /// Query you wish to run on nested objects in the path. /// @@ -149,39 +182,6 @@ public NestedQueryDescriptor QueryName(string? queryName) return Self; } - public NestedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Field path) - { - PathValue = path; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - /// /// How scores for matching child objects affect the root parent document’s relevance score. /// @@ -194,6 +194,18 @@ public NestedQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -210,6 +222,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("path"); + JsonSerializer.Serialize(writer, PathValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -232,20 +246,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); @@ -264,18 +264,33 @@ public NestedQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private bool? IgnoreUnmappedValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } private Action InnerHitsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Field PathValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } + public NestedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. + /// + public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) + { + IgnoreUnmappedValue = ignoreUnmapped; + return Self; + } + /// /// If defined, each search hit will contain inner hits. /// @@ -303,6 +318,33 @@ public NestedQueryDescriptor InnerHits(Action c return Self; } + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Field path) + { + PathValue = path; + return Self; + } + + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Expression> path) + { + PathValue = path; + return Self; + } + + /// + /// Path to the nested object you wish to search. + /// + public NestedQueryDescriptor Path(Expression> path) + { + PathValue = path; + return Self; + } + /// /// Query you wish to run on nested objects in the path. /// @@ -336,48 +378,6 @@ public NestedQueryDescriptor QueryName(string? queryName) return Self; } - public NestedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Field path) - { - PathValue = path; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// Path to the nested object you wish to search. - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - /// /// How scores for matching child objects affect the root parent document’s relevance score. /// @@ -390,6 +390,18 @@ public NestedQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.QueryDsl.Ch protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (IgnoreUnmappedValue.HasValue) + { + writer.WritePropertyName("ignore_unmapped"); + writer.WriteBooleanValue(IgnoreUnmappedValue.Value); + } + if (InnerHitsDescriptor is not null) { writer.WritePropertyName("inner_hits"); @@ -406,6 +418,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InnerHitsValue, options); } + writer.WritePropertyName("path"); + JsonSerializer.Serialize(writer, PathValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -428,20 +442,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); if (ScoreModeValue is not null) { writer.WritePropertyName("score_mode"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs index fe9bb03c0d5..f38bff250de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs @@ -42,12 +42,6 @@ public override NumberRangeQuery Read(ref Utf8JsonReader reader, Type typeToConv if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -84,6 +78,12 @@ public override NumberRangeQuery Read(ref Utf8JsonReader reader, Type typeToConv continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "relation") { variant.Relation = JsonSerializer.Deserialize(ref reader, options); @@ -111,12 +111,6 @@ public override void Write(Utf8JsonWriter writer, NumberRangeQuery value, JsonSe writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -153,6 +147,12 @@ public override void Write(Utf8JsonWriter writer, NumberRangeQuery value, JsonSe writer.WriteNumberValue(value.Lte.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Relation is not null) { writer.WritePropertyName("relation"); @@ -238,7 +238,6 @@ public NumberRangeQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private double? FromValue { get; set; } @@ -246,15 +245,10 @@ public NumberRangeQueryDescriptor(Expression> field) private double? GteValue { get; set; } private double? LtValue { get; set; } private double? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? RelationValue { get; set; } private double? ToValue { get; set; } - public NumberRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public NumberRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -315,6 +309,12 @@ public NumberRangeQueryDescriptor Lte(double? lte) return Self; } + public NumberRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public NumberRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -334,12 +334,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -376,6 +370,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(LteValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); @@ -408,7 +408,6 @@ public NumberRangeQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private double? FromValue { get; set; } @@ -416,15 +415,10 @@ public NumberRangeQueryDescriptor(Field field) private double? GteValue { get; set; } private double? LtValue { get; set; } private double? LteValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? RelationValue { get; set; } private double? ToValue { get; set; } - public NumberRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public NumberRangeQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -491,6 +485,12 @@ public NumberRangeQueryDescriptor Lte(double? lte) return Self; } + public NumberRangeQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public NumberRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? relation) { RelationValue = relation; @@ -510,12 +510,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -552,6 +546,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(LteValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RelationValue is not null) { writer.WritePropertyName("relation"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs index 7d32964305d..5ddb78d7935 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs @@ -65,18 +65,12 @@ public ParentIdQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; } private bool? IgnoreUnmappedValue { get; set; } + private string? QueryNameValue { get; set; } private string? TypeValue { get; set; } - public ParentIdQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public ParentIdQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -101,6 +95,12 @@ public ParentIdQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) return Self; } + public ParentIdQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Name of the child relationship mapped for the `join` field. /// @@ -113,12 +113,6 @@ public ParentIdQueryDescriptor Type(string? type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -137,6 +131,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IgnoreUnmappedValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (TypeValue is not null) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs index 3d2117d9189..8878c97f417 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs @@ -101,7 +101,6 @@ public PercolateQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private object? DocumentValue { get; set; } private ICollection? DocumentsValue { get; set; } @@ -110,15 +109,10 @@ public PercolateQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private string? NameValue { get; set; } private string? PreferenceValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } - public PercolateQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PercolateQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -197,6 +191,12 @@ public PercolateQueryDescriptor Preference(string? preference) return Self; } + public PercolateQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Routing used to fetch document to percolate. /// @@ -218,12 +218,6 @@ public PercolateQueryDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -268,6 +262,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(PreferenceValue); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); @@ -292,7 +292,6 @@ public PercolateQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private object? DocumentValue { get; set; } private ICollection? DocumentsValue { get; set; } @@ -301,15 +300,10 @@ public PercolateQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } private string? NameValue { get; set; } private string? PreferenceValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private long? VersionValue { get; set; } - public PercolateQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PercolateQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -397,6 +391,12 @@ public PercolateQueryDescriptor Preference(string? preference) return Self; } + public PercolateQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Routing used to fetch document to percolate. /// @@ -418,12 +418,6 @@ public PercolateQueryDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -468,6 +462,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(PreferenceValue); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RoutingValue is not null) { writer.WritePropertyName("routing"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs index 7d97a67bf1b..8d7aebe10b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs @@ -201,11 +201,17 @@ private PinnedQueryDescriptor Set(object variant, string variantName) return Self; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action> OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public PinnedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. @@ -240,15 +246,15 @@ public PinnedQueryDescriptor QueryName(string? queryName) return Self; } - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -271,12 +277,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); @@ -325,11 +325,17 @@ private PinnedQueryDescriptor Set(object variant, string variantName) return Self; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public PinnedQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. @@ -364,15 +370,15 @@ public PinnedQueryDescriptor QueryName(string? queryName) return Self; } - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -395,12 +401,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (!string.IsNullOrEmpty(ContainedVariantName)) { writer.WritePropertyName(ContainedVariantName); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs index 23dadc62704..c043457820c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs @@ -42,12 +42,6 @@ public override PrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -60,6 +54,12 @@ public override PrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, PrefixQuery value, JsonSeriali writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -105,6 +99,12 @@ public override void Write(Utf8JsonWriter writer, PrefixQuery value, JsonSeriali writer.WriteBooleanValue(value.CaseInsensitive.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -178,19 +178,13 @@ public PrefixQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public PrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PrefixQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -218,6 +212,12 @@ public PrefixQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -243,12 +243,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -261,6 +255,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -289,19 +289,13 @@ public PrefixQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public PrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public PrefixQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -335,6 +329,12 @@ public PrefixQueryDescriptor Field(Expression return Self; } + public PrefixQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -360,12 +360,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -378,6 +372,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs index c1971acf4d9..c3e2e2488f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs @@ -193,10 +193,9 @@ public QueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AllowLeadingWildcardValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field? DefaultFieldValue { get; set; } @@ -214,6 +213,7 @@ public QueryStringQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private double? PhraseSlopValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteAnalyzerValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } private string? RewriteValue { get; set; } @@ -221,12 +221,6 @@ public QueryStringQueryDescriptor() : base() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? TypeValue { get; set; } - public QueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string. /// @@ -237,20 +231,20 @@ public QueryStringQueryDescriptor AllowLeadingWildcard(bool? allowLea } /// - /// If `true`, the query attempts to analyze wildcard terms in the query string. + /// Analyzer used to convert text in the query string into tokens. /// - public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) + public QueryStringQueryDescriptor Analyzer(string? analyzer) { - AnalyzeWildcardValue = analyzeWildcard; + AnalyzerValue = analyzer; return Self; } /// - /// Analyzer used to convert text in the query string into tokens. + /// If `true`, the query attempts to analyze wildcard terms in the query string. /// - public QueryStringQueryDescriptor Analyzer(string? analyzer) + public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) { - AnalyzerValue = analyzer; + AnalyzeWildcardValue = analyzeWildcard; return Self; } @@ -410,6 +404,12 @@ public QueryStringQueryDescriptor Query(string query) return Self; } + public QueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Analyzer used to convert quoted text in the query string into tokens.
For quoted text, this parameter overrides the analyzer specified in the `analyzer` parameter.
///
@@ -467,30 +467,24 @@ public QueryStringQueryDescriptor Type(Elastic.Clients.Elasticsearch. protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AllowLeadingWildcardValue.HasValue) { writer.WritePropertyName("allow_leading_wildcard"); writer.WriteBooleanValue(AllowLeadingWildcardValue.Value); } - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); writer.WriteStringValue(AnalyzerValue); } + if (AnalyzeWildcardValue.HasValue) + { + writer.WritePropertyName("analyze_wildcard"); + writer.WriteBooleanValue(AnalyzeWildcardValue.Value); + } + if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -589,6 +583,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteAnalyzerValue)) { writer.WritePropertyName("quote_analyzer"); @@ -637,10 +637,9 @@ public QueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private bool? AllowLeadingWildcardValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field? DefaultFieldValue { get; set; } @@ -658,6 +657,7 @@ public QueryStringQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private double? PhraseSlopValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteAnalyzerValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } private string? RewriteValue { get; set; } @@ -665,12 +665,6 @@ public QueryStringQueryDescriptor() : base() private string? TimeZoneValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? TypeValue { get; set; } - public QueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - /// /// If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string. /// @@ -681,20 +675,20 @@ public QueryStringQueryDescriptor AllowLeadingWildcard(bool? allowLeadingWildcar } /// - /// If `true`, the query attempts to analyze wildcard terms in the query string. + /// Analyzer used to convert text in the query string into tokens. /// - public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) + public QueryStringQueryDescriptor Analyzer(string? analyzer) { - AnalyzeWildcardValue = analyzeWildcard; + AnalyzerValue = analyzer; return Self; } /// - /// Analyzer used to convert text in the query string into tokens. + /// If `true`, the query attempts to analyze wildcard terms in the query string. /// - public QueryStringQueryDescriptor Analyzer(string? analyzer) + public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) { - AnalyzerValue = analyzer; + AnalyzeWildcardValue = analyzeWildcard; return Self; } @@ -863,6 +857,12 @@ public QueryStringQueryDescriptor Query(string query) return Self; } + public QueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Analyzer used to convert quoted text in the query string into tokens.
For quoted text, this parameter overrides the analyzer specified in the `analyzer` parameter.
///
@@ -920,30 +920,24 @@ public QueryStringQueryDescriptor Type(Elastic.Clients.Elasticsearch.QueryDsl.Te protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (AllowLeadingWildcardValue.HasValue) { writer.WritePropertyName("allow_leading_wildcard"); writer.WriteBooleanValue(AllowLeadingWildcardValue.Value); } - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - if (!string.IsNullOrEmpty(AnalyzerValue)) { writer.WritePropertyName("analyzer"); writer.WriteStringValue(AnalyzerValue); } + if (AnalyzeWildcardValue.HasValue) + { + writer.WritePropertyName("analyze_wildcard"); + writer.WriteBooleanValue(AnalyzeWildcardValue.Value); + } + if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -1042,6 +1036,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteAnalyzerValue)) { writer.WritePropertyName("quote_analyzer"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs index e32fdc9fd30..84be1ed2a29 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs @@ -77,7 +77,6 @@ public RankFeatureQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionLinear? LinearValue { get; set; } @@ -86,6 +85,7 @@ public RankFeatureQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionLogarithm? LogValue { get; set; } private RankFeatureFunctionLogarithmDescriptor LogDescriptor { get; set; } private Action LogDescriptorAction { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSaturation? SaturationValue { get; set; } private RankFeatureFunctionSaturationDescriptor SaturationDescriptor { get; set; } private Action SaturationDescriptorAction { get; set; } @@ -93,12 +93,6 @@ public RankFeatureQueryDescriptor() : base() private RankFeatureFunctionSigmoidDescriptor SigmoidDescriptor { get; set; } private Action SigmoidDescriptorAction { get; set; } - public RankFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RankFeatureQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -177,6 +171,12 @@ public RankFeatureQueryDescriptor Log(Action QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Saturation function used to boost relevance scores based on the value of the rank feature `field`. /// @@ -234,12 +234,6 @@ public RankFeatureQueryDescriptor Sigmoid(Action LogDescriptorAction { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSaturation? SaturationValue { get; set; } private RankFeatureFunctionSaturationDescriptor SaturationDescriptor { get; set; } private Action SaturationDescriptorAction { get; set; } @@ -340,12 +340,6 @@ public RankFeatureQueryDescriptor() : base() private RankFeatureFunctionSigmoidDescriptor SigmoidDescriptor { get; set; } private Action SigmoidDescriptorAction { get; set; } - public RankFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RankFeatureQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -433,6 +427,12 @@ public RankFeatureQueryDescriptor Log(Action /// Saturation function used to boost relevance scores based on the value of the rank feature `field`. ///
@@ -490,12 +490,6 @@ public RankFeatureQueryDescriptor Sigmoid(Action(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -72,6 +66,12 @@ public override RegexpQuery Read(ref Utf8JsonReader reader, Type typeToConvert, continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -99,12 +99,6 @@ public override void Write(Utf8JsonWriter writer, RegexpQuery value, JsonSeriali writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -129,6 +123,12 @@ public override void Write(Utf8JsonWriter writer, RegexpQuery value, JsonSeriali writer.WriteNumberValue(value.MaxDeterminizedStates.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -212,21 +212,15 @@ public RegexpQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? FlagsValue { get; set; } private int? MaxDeterminizedStatesValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public RegexpQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RegexpQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -272,6 +266,12 @@ public RegexpQueryDescriptor MaxDeterminizedStates(int? maxDeterminiz return Self; } + public RegexpQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -297,12 +297,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -327,6 +321,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -355,21 +355,15 @@ public RegexpQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string? FlagsValue { get; set; } private int? MaxDeterminizedStatesValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string ValueValue { get; set; } - public RegexpQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public RegexpQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -421,6 +415,12 @@ public RegexpQueryDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) return Self; } + public RegexpQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -446,12 +446,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -476,6 +470,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs index f565c688a99..55bbb289dd4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs @@ -53,14 +53,26 @@ public RuleQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action> OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.Id RulesetIdValue { get; set; } + public RuleQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public RuleQueryDescriptor MatchCriteria(object matchCriteria) + { + MatchCriteriaValue = matchCriteria; + return Self; + } + public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.QueryDsl.Query organic) { OrganicDescriptor = null; @@ -91,18 +103,6 @@ public RuleQueryDescriptor QueryName(string? queryName) return Self; } - public RuleQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public RuleQueryDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Id rulesetId) { RulesetIdValue = rulesetId; @@ -112,6 +112,14 @@ public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Id protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -134,14 +142,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); writer.WritePropertyName("ruleset_id"); JsonSerializer.Serialize(writer, RulesetIdValue, options); writer.WriteEndObject(); @@ -156,14 +156,26 @@ public RuleQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query OrganicValue { get; set; } private QueryDescriptor OrganicDescriptor { get; set; } private Action OrganicDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private object MatchCriteriaValue { get; set; } private Elastic.Clients.Elasticsearch.Id RulesetIdValue { get; set; } + public RuleQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public RuleQueryDescriptor MatchCriteria(object matchCriteria) + { + MatchCriteriaValue = matchCriteria; + return Self; + } + public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.QueryDsl.Query organic) { OrganicDescriptor = null; @@ -194,18 +206,6 @@ public RuleQueryDescriptor QueryName(string? queryName) return Self; } - public RuleQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public RuleQueryDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Id rulesetId) { RulesetIdValue = rulesetId; @@ -215,6 +215,14 @@ public RuleQueryDescriptor RulesetId(Elastic.Clients.Elasticsearch.Id rulesetId) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); if (OrganicDescriptor is not null) { writer.WritePropertyName("organic"); @@ -237,14 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); writer.WritePropertyName("ruleset_id"); JsonSerializer.Serialize(writer, RulesetIdValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs index b989c0a78b8..d500a5087e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs @@ -53,19 +53,19 @@ public ScriptQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Script ScriptValue { get; set; } - public ScriptQueryDescriptor QueryName(string? queryName) + public ScriptQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public ScriptQueryDescriptor Boost(float? boost) + public ScriptQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -81,18 +81,18 @@ public ScriptQueryDescriptor Script(Elastic.Clients.Elasticsearch.Script script) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("script"); JsonSerializer.Serialize(writer, ScriptValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs index e15966f273d..ba2aff293a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs @@ -65,14 +65,29 @@ public ScriptScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Script ScriptValue { get; set; } + public ScriptScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Documents with a score lower than this floating point number are excluded from the search results. + /// + public ScriptScoreQueryDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// Query used to return documents. /// @@ -106,21 +121,6 @@ public ScriptScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ScriptScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - public ScriptScoreQueryDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Script used to compute the score of documents returned by the query.
Important: final relevance scores from the `script_score` query cannot be negative.
///
@@ -133,6 +133,18 @@ public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -155,18 +167,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - writer.WritePropertyName("script"); JsonSerializer.Serialize(writer, ScriptValue, options); writer.WriteEndObject(); @@ -181,14 +181,29 @@ public ScriptScoreQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query QueryValue { get; set; } private QueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private float? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Script ScriptValue { get; set; } + public ScriptScoreQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Documents with a score lower than this floating point number are excluded from the search results. + /// + public ScriptScoreQueryDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + /// /// Query used to return documents. /// @@ -222,21 +237,6 @@ public ScriptScoreQueryDescriptor QueryName(string? queryName) return Self; } - public ScriptScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - public ScriptScoreQueryDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - /// /// Script used to compute the score of documents returned by the query.
Important: final relevance scores from the `script_score` query cannot be negative.
///
@@ -249,6 +249,18 @@ public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearch.Script sc protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -271,18 +283,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - writer.WritePropertyName("script"); JsonSerializer.Serialize(writer, ScriptValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs index 1a0d737a61e..eaf6120d8f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs @@ -125,9 +125,8 @@ public SimpleQueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperatorValue { get; set; } @@ -139,11 +138,15 @@ public SimpleQueryStringQueryDescriptor() : base() private bool? LenientValue { get; set; } private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } - public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + /// + /// Analyzer used to convert text in the query string into tokens. + /// + public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) { - QueryNameValue = queryName; + AnalyzerValue = analyzer; return Self; } @@ -156,15 +159,6 @@ public SimpleQueryStringQueryDescriptor AnalyzeWildcard(bool? analyze return Self; } - /// - /// Analyzer used to convert text in the query string into tokens. - /// - public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - /// /// If `true`, the parser creates a match_phrase query for each multi-position token. /// @@ -261,6 +255,12 @@ public SimpleQueryStringQueryDescriptor Query(string query) return Self; } + public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Suffix appended to quoted text in the query string. /// @@ -273,10 +273,10 @@ public SimpleQueryStringQueryDescriptor QuoteFieldSuffix(string? quot protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) + if (!string.IsNullOrEmpty(AnalyzerValue)) { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); } if (AnalyzeWildcardValue.HasValue) @@ -285,12 +285,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(AnalyzeWildcardValue.Value); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -353,6 +347,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) { writer.WritePropertyName("quote_field_suffix"); @@ -371,9 +371,8 @@ public SimpleQueryStringQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } private string? AnalyzerValue { get; set; } + private bool? AnalyzeWildcardValue { get; set; } private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperatorValue { get; set; } @@ -385,11 +384,15 @@ public SimpleQueryStringQueryDescriptor() : base() private bool? LenientValue { get; set; } private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private string QueryValue { get; set; } + private string? QueryNameValue { get; set; } private string? QuoteFieldSuffixValue { get; set; } - public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + /// + /// Analyzer used to convert text in the query string into tokens. + /// + public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) { - QueryNameValue = queryName; + AnalyzerValue = analyzer; return Self; } @@ -402,15 +405,6 @@ public SimpleQueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = return Self; } - /// - /// Analyzer used to convert text in the query string into tokens. - /// - public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - /// /// If `true`, the parser creates a match_phrase query for each multi-position token. /// @@ -507,6 +501,12 @@ public SimpleQueryStringQueryDescriptor Query(string query) return Self; } + public SimpleQueryStringQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Suffix appended to quoted text in the query string. /// @@ -519,10 +519,10 @@ public SimpleQueryStringQueryDescriptor QuoteFieldSuffix(string? quoteFieldSuffi protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) + if (!string.IsNullOrEmpty(AnalyzerValue)) { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); + writer.WritePropertyName("analyzer"); + writer.WriteStringValue(AnalyzerValue); } if (AnalyzeWildcardValue.HasValue) @@ -531,12 +531,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(AnalyzeWildcardValue.Value); } - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) { writer.WritePropertyName("auto_generate_synonyms_phrase_query"); @@ -599,6 +593,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) { writer.WritePropertyName("quote_field_suffix"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs index bcc25ebd8c3..c6e398c4dee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs @@ -60,11 +60,11 @@ public SpanContainingQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery BigValue { get; set; } private SpanQueryDescriptor BigDescriptor { get; set; } private Action> BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action> LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
@@ -93,6 +93,12 @@ public SpanContainingQueryDescriptor Big(Action Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
///
@@ -126,12 +132,6 @@ public SpanContainingQueryDescriptor QueryName(string? queryName) return Self; } - public SpanContainingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -151,6 +151,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -173,12 +179,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -194,11 +194,11 @@ public SpanContainingQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery BigValue { get; set; } private SpanQueryDescriptor BigDescriptor { get; set; } private Action BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
@@ -227,6 +227,12 @@ public SpanContainingQueryDescriptor Big(Action configure) return Self; } + public SpanContainingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `big` that contain matches from `little` are returned.
///
@@ -260,12 +266,6 @@ public SpanContainingQueryDescriptor QueryName(string? queryName) return Self; } - public SpanContainingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -285,6 +285,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -307,12 +313,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs index 5f1c8d038e1..71353483a38 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs @@ -49,12 +49,30 @@ public SpanFieldMaskingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery QueryValue { get; set; } private SpanQueryDescriptor QueryDescriptor { get; set; } private Action> QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + + public SpanFieldMaskingQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public SpanFieldMaskingQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery query) { @@ -86,27 +104,17 @@ public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) return Self; } - public SpanFieldMaskingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -129,14 +137,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WriteEndObject(); } } @@ -149,70 +149,78 @@ public SpanFieldMaskingQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery QueryValue { get; set; } private SpanQueryDescriptor QueryDescriptor { get; set; } private Action QueryDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery query) + public SpanFieldMaskingQueryDescriptor Boost(float? boost) { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; + BoostValue = boost; return Self; } - public SpanFieldMaskingQueryDescriptor Query(SpanQueryDescriptor descriptor) + public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; + FieldValue = field; return Self; } - public SpanFieldMaskingQueryDescriptor Query(Action configure) + public SpanFieldMaskingQueryDescriptor Field(Expression> field) { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; + FieldValue = field; return Self; } - public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) + public SpanFieldMaskingQueryDescriptor Field(Expression> field) { - QueryNameValue = queryName; + FieldValue = field; return Self; } - public SpanFieldMaskingQueryDescriptor Boost(float? boost) + public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery query) { - BoostValue = boost; + QueryDescriptor = null; + QueryDescriptorAction = null; + QueryValue = query; return Self; } - public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + public SpanFieldMaskingQueryDescriptor Query(SpanQueryDescriptor descriptor) { - FieldValue = field; + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptor = descriptor; return Self; } - public SpanFieldMaskingQueryDescriptor Field(Expression> field) + public SpanFieldMaskingQueryDescriptor Query(Action configure) { - FieldValue = field; + QueryValue = null; + QueryDescriptor = null; + QueryDescriptorAction = configure; return Self; } - public SpanFieldMaskingQueryDescriptor Field(Expression> field) + public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) { - FieldValue = field; + QueryNameValue = queryName; return Self; } protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); if (QueryDescriptor is not null) { writer.WritePropertyName("query"); @@ -235,14 +243,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs index de8d35e12c2..136bac1a35d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs @@ -57,12 +57,27 @@ public SpanFirstQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int EndValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery MatchValue { get; set; } private SpanQueryDescriptor MatchDescriptor { get; set; } private Action> MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int EndValue { get; set; } + + public SpanFirstQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Controls the maximum end position permitted in a match. + /// + public SpanFirstQueryDescriptor End(int end) + { + EndValue = end; + return Self; + } /// /// Can be any other span type query. @@ -97,24 +112,17 @@ public SpanFirstQueryDescriptor QueryName(string? queryName) return Self; } - public SpanFirstQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Controls the maximum end position permitted in a match. - /// - public SpanFirstQueryDescriptor End(int end) - { - EndValue = end; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("end"); + writer.WriteNumberValue(EndValue); if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -137,14 +145,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("end"); - writer.WriteNumberValue(EndValue); writer.WriteEndObject(); } } @@ -157,12 +157,27 @@ public SpanFirstQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int EndValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery MatchValue { get; set; } private SpanQueryDescriptor MatchDescriptor { get; set; } private Action MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int EndValue { get; set; } + + public SpanFirstQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// Controls the maximum end position permitted in a match. + /// + public SpanFirstQueryDescriptor End(int end) + { + EndValue = end; + return Self; + } /// /// Can be any other span type query. @@ -197,24 +212,17 @@ public SpanFirstQueryDescriptor QueryName(string? queryName) return Self; } - public SpanFirstQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// Controls the maximum end position permitted in a match. - /// - public SpanFirstQueryDescriptor End(int end) - { - EndValue = end; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("end"); + writer.WriteNumberValue(EndValue); if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -237,14 +245,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("end"); - writer.WriteNumberValue(EndValue); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs index 620f240e601..fab48652024 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs @@ -51,11 +51,17 @@ public SpanMultiTermQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query MatchValue { get; set; } private QueryDescriptor MatchDescriptor { get; set; } private Action> MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanMultiTermQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Should be a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query). @@ -90,15 +96,15 @@ public SpanMultiTermQueryDescriptor QueryName(string? queryName) return Self; } - public SpanMultiTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -121,12 +127,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -139,11 +139,17 @@ public SpanMultiTermQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.Query MatchValue { get; set; } private QueryDescriptor MatchDescriptor { get; set; } private Action MatchDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanMultiTermQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Should be a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query). @@ -178,15 +184,15 @@ public SpanMultiTermQueryDescriptor QueryName(string? queryName) return Self; } - public SpanMultiTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (MatchDescriptor is not null) { writer.WritePropertyName("match"); @@ -209,12 +215,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs index 9fa3eba78cd..69a0d69639d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs @@ -63,15 +63,21 @@ public SpanNearQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action> ClausesDescriptorAction { get; set; } private Action>[] ClausesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private bool? InOrderValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } + public SpanNearQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Array of one or more other span type queries. /// @@ -111,18 +117,6 @@ public SpanNearQueryDescriptor Clauses(params Action QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNearQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Controls whether matches are required to be in-order. /// @@ -132,6 +126,12 @@ public SpanNearQueryDescriptor InOrder(bool? inOrder = true) return Self; } + public SpanNearQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Controls the maximum number of intervening unmatched positions permitted. /// @@ -144,6 +144,12 @@ public SpanNearQueryDescriptor Slop(int? slop) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -175,24 +181,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ClausesValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (InOrderValue.HasValue) { writer.WritePropertyName("in_order"); writer.WriteBooleanValue(InOrderValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); @@ -211,15 +211,21 @@ public SpanNearQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action ClausesDescriptorAction { get; set; } private Action[] ClausesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } private bool? InOrderValue { get; set; } + private string? QueryNameValue { get; set; } private int? SlopValue { get; set; } + public SpanNearQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Array of one or more other span type queries. /// @@ -259,18 +265,6 @@ public SpanNearQueryDescriptor Clauses(params Action[] conf return Self; } - public SpanNearQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNearQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - /// /// Controls whether matches are required to be in-order. /// @@ -280,6 +274,12 @@ public SpanNearQueryDescriptor InOrder(bool? inOrder = true) return Self; } + public SpanNearQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Controls the maximum number of intervening unmatched positions permitted. /// @@ -292,6 +292,12 @@ public SpanNearQueryDescriptor Slop(int? slop) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -323,24 +329,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ClausesValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - if (InOrderValue.HasValue) { writer.WritePropertyName("in_order"); writer.WriteBooleanValue(InOrderValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (SlopValue.HasValue) { writer.WritePropertyName("slop"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs index 621e596b4c4..9775d15a427 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs @@ -75,17 +75,32 @@ public SpanNotQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int? DistValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery ExcludeValue { get; set; } private SpanQueryDescriptor ExcludeDescriptor { get; set; } private Action> ExcludeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery IncludeValue { get; set; } private SpanQueryDescriptor IncludeDescriptor { get; set; } private Action> IncludeDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int? DistValue { get; set; } private int? PostValue { get; set; } private int? PreValue { get; set; } + private string? QueryNameValue { get; set; } + + public SpanNotQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
+ ///
+ public SpanNotQueryDescriptor Dist(int? dist) + { + DistValue = dist; + return Self; + } /// /// Span query whose matches must not overlap those returned. @@ -141,27 +156,6 @@ public SpanNotQueryDescriptor Include(Action QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNotQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
- ///
- public SpanNotQueryDescriptor Dist(int? dist) - { - DistValue = dist; - return Self; - } - /// /// The number of tokens after the include span that can’t have overlap with the exclude span. /// @@ -180,9 +174,27 @@ public SpanNotQueryDescriptor Pre(int? pre) return Self; } + public SpanNotQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (DistValue.HasValue) + { + writer.WritePropertyName("dist"); + writer.WriteNumberValue(DistValue.Value); + } + if (ExcludeDescriptor is not null) { writer.WritePropertyName("exclude"); @@ -215,24 +227,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DistValue.HasValue) - { - writer.WritePropertyName("dist"); - writer.WriteNumberValue(DistValue.Value); - } - if (PostValue.HasValue) { writer.WritePropertyName("post"); @@ -245,6 +239,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PreValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } @@ -257,17 +257,32 @@ public SpanNotQueryDescriptor() : base() { } + private float? BoostValue { get; set; } + private int? DistValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery ExcludeValue { get; set; } private SpanQueryDescriptor ExcludeDescriptor { get; set; } private Action ExcludeDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery IncludeValue { get; set; } private SpanQueryDescriptor IncludeDescriptor { get; set; } private Action IncludeDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } - private int? DistValue { get; set; } private int? PostValue { get; set; } private int? PreValue { get; set; } + private string? QueryNameValue { get; set; } + + public SpanNotQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
+ ///
+ public SpanNotQueryDescriptor Dist(int? dist) + { + DistValue = dist; + return Self; + } /// /// Span query whose matches must not overlap those returned. @@ -323,27 +338,6 @@ public SpanNotQueryDescriptor Include(Action configure) return Self; } - public SpanNotQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanNotQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span.
Equivalent to setting both `pre` and `post`.
- ///
- public SpanNotQueryDescriptor Dist(int? dist) - { - DistValue = dist; - return Self; - } - /// /// The number of tokens after the include span that can’t have overlap with the exclude span. /// @@ -362,9 +356,27 @@ public SpanNotQueryDescriptor Pre(int? pre) return Self; } + public SpanNotQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (DistValue.HasValue) + { + writer.WritePropertyName("dist"); + writer.WriteNumberValue(DistValue.Value); + } + if (ExcludeDescriptor is not null) { writer.WritePropertyName("exclude"); @@ -397,24 +409,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DistValue.HasValue) - { - writer.WritePropertyName("dist"); - writer.WriteNumberValue(DistValue.Value); - } - if (PostValue.HasValue) { writer.WritePropertyName("post"); @@ -427,6 +421,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(PreValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs index 9f8aef7803a..382082eb6a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs @@ -51,12 +51,18 @@ public SpanOrQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action> ClausesDescriptorAction { get; set; } private Action>[] ClausesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanOrQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Array of one or more other span type queries. @@ -103,15 +109,15 @@ public SpanOrQueryDescriptor QueryName(string? queryName) return Self; } - public SpanOrQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -149,12 +155,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -167,12 +167,18 @@ public SpanOrQueryDescriptor() : base() { } + private float? BoostValue { get; set; } private ICollection ClausesValue { get; set; } private SpanQueryDescriptor ClausesDescriptor { get; set; } private Action ClausesDescriptorAction { get; set; } private Action[] ClausesDescriptorActions { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } + + public SpanOrQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } /// /// Array of one or more other span type queries. @@ -219,15 +225,15 @@ public SpanOrQueryDescriptor QueryName(string? queryName) return Self; } - public SpanOrQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (ClausesDescriptor is not null) { writer.WritePropertyName("clauses"); @@ -265,12 +271,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs index 79d53fdfb5e..9414bba2e55 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs @@ -42,15 +42,15 @@ public override SpanTermQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") + if (property == "boost") { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + variant.Boost = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "boost") + if (property == "_name") { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -75,18 +75,18 @@ public override void Write(Utf8JsonWriter writer, SpanTermQuery value, JsonSeria writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(value.Boost.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WritePropertyName("value"); writer.WriteStringValue(value.Value); writer.WriteEndObject(); @@ -138,17 +138,11 @@ public SpanTermQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string ValueValue { get; set; } - public SpanTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public SpanTermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -167,6 +161,12 @@ public SpanTermQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + public SpanTermQueryDescriptor Value(string value) { ValueValue = value; @@ -180,18 +180,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("value"); writer.WriteStringValue(ValueValue); writer.WriteEndObject(); @@ -214,17 +214,11 @@ public SpanTermQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string ValueValue { get; set; } - public SpanTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public SpanTermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -249,6 +243,12 @@ public SpanTermQueryDescriptor Field(Expression BigDescriptor { get; set; } private Action> BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action> LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
@@ -93,6 +93,12 @@ public SpanWithinQueryDescriptor Big(Action Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
///
@@ -126,12 +132,6 @@ public SpanWithinQueryDescriptor QueryName(string? queryName) return Self; } - public SpanWithinQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -151,6 +151,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -173,12 +179,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } @@ -194,11 +194,11 @@ public SpanWithinQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery BigValue { get; set; } private SpanQueryDescriptor BigDescriptor { get; set; } private Action BigDescriptorAction { get; set; } + private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.SpanQuery LittleValue { get; set; } private SpanQueryDescriptor LittleDescriptor { get; set; } private Action LittleDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private float? BoostValue { get; set; } /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
@@ -227,6 +227,12 @@ public SpanWithinQueryDescriptor Big(Action configure) return Self; } + public SpanWithinQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + /// /// Can be any span query.
Matching spans from `little` that are enclosed within `big` are returned.
///
@@ -260,12 +266,6 @@ public SpanWithinQueryDescriptor QueryName(string? queryName) return Self; } - public SpanWithinQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -285,6 +285,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, BigValue, options); } + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + if (LittleDescriptor is not null) { writer.WritePropertyName("little"); @@ -307,12 +313,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(QueryNameValue); } - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs index 1d1b370d454..b88a42069bd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs @@ -42,12 +42,6 @@ public override TermQuery Read(ref Utf8JsonReader reader, Type typeToConvert, Js if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -60,6 +54,12 @@ public override TermQuery Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "value") { variant.Value = JsonSerializer.Deserialize(ref reader, options); @@ -81,12 +81,6 @@ public override void Write(Utf8JsonWriter writer, TermQuery value, JsonSerialize writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -99,6 +93,12 @@ public override void Write(Utf8JsonWriter writer, TermQuery value, JsonSerialize writer.WriteBooleanValue(value.CaseInsensitive.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WritePropertyName("value"); JsonSerializer.Serialize(writer, value.Value, options); writer.WriteEndObject(); @@ -161,18 +161,12 @@ public TermQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue ValueValue { get; set; } - public TermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -200,6 +194,12 @@ public TermQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Term you wish to find in the provided field. /// @@ -216,12 +216,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -234,6 +228,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("value"); JsonSerializer.Serialize(writer, ValueValue, options); writer.WriteEndObject(); @@ -256,18 +256,12 @@ public TermQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue ValueValue { get; set; } - public TermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -301,6 +295,12 @@ public TermQueryDescriptor Field(Expression> return Self; } + public TermQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Term you wish to find in the provided field. /// @@ -317,12 +317,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -335,6 +329,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("value"); JsonSerializer.Serialize(writer, ValueValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs index 55970412e9d..25e4310fd77 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs @@ -39,15 +39,15 @@ public override TermsQuery Read(ref Utf8JsonReader reader, Type typeToConvert, J if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") + if (property == "boost") { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + variant.Boost = JsonSerializer.Deserialize(ref reader, options); continue; } - if (property == "boost") + if (property == "_name") { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -75,18 +75,18 @@ public override void Write(Utf8JsonWriter writer, TermsQuery value, JsonSerializ JsonSerializer.Serialize(writer, value.Terms, options); } - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(value.Boost.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WriteEndObject(); } } @@ -112,20 +112,20 @@ public TermsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.TermsQueryField TermsValue { get; set; } - public TermsQueryDescriptor QueryName(string? queryName) + public TermsQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public TermsQueryDescriptor Boost(float? boost) + public TermsQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -157,18 +157,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, TermsValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } @@ -181,20 +181,20 @@ public TermsQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } + private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.TermsQueryField TermsValue { get; set; } - public TermsQueryDescriptor QueryName(string? queryName) + public TermsQueryDescriptor Boost(float? boost) { - QueryNameValue = queryName; + BoostValue = boost; return Self; } - public TermsQueryDescriptor Boost(float? boost) + public TermsQueryDescriptor QueryName(string? queryName) { - BoostValue = boost; + QueryNameValue = queryName; return Self; } @@ -232,18 +232,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, TermsValue, options); } - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); writer.WriteNumberValue(BoostValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ 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 7b31a0b339d..93cf744a0b1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -42,12 +42,6 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -66,6 +60,12 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "terms") { variant.Terms = JsonSerializer.Deserialize>(ref reader, options); @@ -87,12 +87,6 @@ public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSeria writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -111,6 +105,12 @@ public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSeria JsonSerializer.Serialize(writer, value.MinimumShouldMatchScript, options); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WritePropertyName("terms"); JsonSerializer.Serialize(writer, value.Terms, options); writer.WriteEndObject(); @@ -178,19 +178,13 @@ public TermsSetQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? MinimumShouldMatchScriptValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection TermsValue { get; set; } - public TermsSetQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermsSetQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -236,6 +230,12 @@ public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clien return Self; } + public TermsSetQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Array of terms you wish to find in the provided field. /// @@ -252,12 +252,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -276,6 +270,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MinimumShouldMatchScriptValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("terms"); JsonSerializer.Serialize(writer, TermsValue, options); writer.WriteEndObject(); @@ -298,19 +298,13 @@ public TermsSetQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Field? MinimumShouldMatchFieldValue { get; set; } private Elastic.Clients.Elasticsearch.Script? MinimumShouldMatchScriptValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection TermsValue { get; set; } - public TermsSetQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public TermsSetQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -371,6 +365,12 @@ public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clients.Elastics return Self; } + public TermsSetQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Array of terms you wish to find in the provided field. /// @@ -387,12 +387,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -411,6 +405,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MinimumShouldMatchScriptValue, options); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WritePropertyName("terms"); JsonSerializer.Serialize(writer, TermsValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs index c7748608f21..e352e010ac7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs @@ -42,12 +42,6 @@ public override TextExpansionQuery Read(ref Utf8JsonReader reader, Type typeToCo if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -65,6 +59,12 @@ public override TextExpansionQuery Read(ref Utf8JsonReader reader, Type typeToCo variant.ModelText = JsonSerializer.Deserialize(ref reader, options); continue; } + + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } } } @@ -81,12 +81,6 @@ public override void Write(Utf8JsonWriter writer, TextExpansionQuery value, Json writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -97,6 +91,12 @@ public override void Write(Utf8JsonWriter writer, TextExpansionQuery value, Json writer.WriteStringValue(value.ModelId); writer.WritePropertyName("model_text"); writer.WriteStringValue(value.ModelText); + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + writer.WriteEndObject(); writer.WriteEndObject(); return; @@ -157,17 +157,11 @@ public TextExpansionQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string ModelIdValue { get; set; } private string ModelTextValue { get; set; } - - public TextExpansionQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public TextExpansionQueryDescriptor Boost(float? boost) { @@ -205,6 +199,12 @@ public TextExpansionQueryDescriptor ModelText(string modelText) return Self; } + public TextExpansionQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -212,12 +212,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -228,6 +222,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(ModelIdValue); writer.WritePropertyName("model_text"); writer.WriteStringValue(ModelTextValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } @@ -248,17 +248,11 @@ public TextExpansionQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private string ModelIdValue { get; set; } private string ModelTextValue { get; set; } - - public TextExpansionQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public TextExpansionQueryDescriptor Boost(float? boost) { @@ -302,6 +296,12 @@ public TextExpansionQueryDescriptor ModelText(string modelText) return Self; } + public TextExpansionQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { if (FieldValue is null) @@ -309,12 +309,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -325,6 +319,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(ModelIdValue); writer.WritePropertyName("model_text"); writer.WriteStringValue(ModelTextValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs index 3accfb7555a..825b0efb14f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs @@ -42,12 +42,6 @@ public override WildcardQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (reader.TokenType == JsonTokenType.PropertyName) { var property = reader.GetString(); - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - if (property == "boost") { variant.Boost = JsonSerializer.Deserialize(ref reader, options); @@ -60,6 +54,12 @@ public override WildcardQuery Read(ref Utf8JsonReader reader, Type typeToConvert continue; } + if (property == "_name") + { + variant.QueryName = JsonSerializer.Deserialize(ref reader, options); + continue; + } + if (property == "rewrite") { variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); @@ -93,12 +93,6 @@ public override void Write(Utf8JsonWriter writer, WildcardQuery value, JsonSeria writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(value.Field)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - if (value.Boost.HasValue) { writer.WritePropertyName("boost"); @@ -111,6 +105,12 @@ public override void Write(Utf8JsonWriter writer, WildcardQuery value, JsonSeria writer.WriteBooleanValue(value.CaseInsensitive.Value); } + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + if (value.Rewrite is not null) { writer.WritePropertyName("rewrite"); @@ -199,20 +199,14 @@ public WildcardQueryDescriptor(Expression> field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string? ValueValue { get; set; } private string? WildcardValue { get; set; } - public WildcardQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public WildcardQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -240,6 +234,12 @@ public WildcardQueryDescriptor Field(Expression QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + /// /// Method used to rewrite the query. /// @@ -274,12 +274,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -292,6 +286,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); @@ -330,20 +330,14 @@ public WildcardQueryDescriptor(Field field) FieldValue = field; } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private bool? CaseInsensitiveValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } private string? RewriteValue { get; set; } private string? ValueValue { get; set; } private string? WildcardValue { get; set; } - public WildcardQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - public WildcardQueryDescriptor Boost(float? boost) { BoostValue = boost; @@ -377,6 +371,12 @@ public WildcardQueryDescriptor Field(Expression /// Method used to rewrite the query. ///
@@ -411,12 +411,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -429,6 +423,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(CaseInsensitiveValue.Value); } + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + if (RewriteValue is not null) { writer.WritePropertyName("rewrite"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs index d01c724cddc..7e0d098cc6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs @@ -53,15 +53,9 @@ public WrapperQueryDescriptor() : base() { } - private string? QueryNameValue { get; set; } private float? BoostValue { get; set; } private string QueryValue { get; set; } - - public WrapperQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } + private string? QueryNameValue { get; set; } public WrapperQueryDescriptor Boost(float? boost) { @@ -78,15 +72,15 @@ public WrapperQueryDescriptor Query(string query) return Self; } + public WrapperQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - if (BoostValue.HasValue) { writer.WritePropertyName("boost"); @@ -95,6 +89,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("query"); writer.WriteStringValue(QueryValue); + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs index a0833f7c630..41dd3503ccf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs @@ -51,14 +51,20 @@ public ScriptSortDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action> NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Script ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptSortType? TypeValue { get; set; } + public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) + { + ModeValue = mode; + return Self; + } + public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) { NestedDescriptor = null; @@ -83,12 +89,6 @@ public ScriptSortDescriptor Nested(Action Mode(Elastic.Clients.Elasticsearch.SortMode? mode) - { - ModeValue = mode; - return Self; - } - public ScriptSortDescriptor Order(Elastic.Clients.Elasticsearch.SortOrder? order) { OrderValue = order; @@ -110,6 +110,12 @@ public ScriptSortDescriptor Type(Elastic.Clients.Elasticsearch.Script protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ModeValue is not null) + { + writer.WritePropertyName("mode"); + JsonSerializer.Serialize(writer, ModeValue, options); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -126,12 +132,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); @@ -158,14 +158,20 @@ public ScriptSortDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.NestedSortValue? NestedValue { get; set; } private NestedSortValueDescriptor NestedDescriptor { get; set; } private Action NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } private Elastic.Clients.Elasticsearch.SortOrder? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Script ScriptValue { get; set; } private Elastic.Clients.Elasticsearch.ScriptSortType? TypeValue { get; set; } + public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) + { + ModeValue = mode; + return Self; + } + public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.NestedSortValue? nested) { NestedDescriptor = null; @@ -190,12 +196,6 @@ public ScriptSortDescriptor Nested(Action configure) return Self; } - public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.SortMode? mode) - { - ModeValue = mode; - return Self; - } - public ScriptSortDescriptor Order(Elastic.Clients.Elasticsearch.SortOrder? order) { OrderValue = order; @@ -217,6 +217,12 @@ public ScriptSortDescriptor Type(Elastic.Clients.Elasticsearch.ScriptSortType? t protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ModeValue is not null) + { + writer.WritePropertyName("mode"); + JsonSerializer.Serialize(writer, ModeValue, options); + } + if (NestedDescriptor is not null) { writer.WritePropertyName("nested"); @@ -233,12 +239,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedValue, options); } - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - if (OrderValue is not null) { writer.WritePropertyName("order");