From deded015d3ebf6a2c61ea415e26378bfb8799733 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Sat, 26 Mar 2022 15:13:13 +0000 Subject: [PATCH] Add various global APIs (#6229) --- .../_Generated/Api/ApiUrlsLookup.g.cs | 9 + .../_Generated/Api/ExistsSourceRequest.g.cs | 194 +++++++++ .../_Generated/Api/ExistsSourceResponse.g.cs | 28 ++ .../_Generated/Api/FieldCapsRequest.g.cs | 258 ++++++++++++ .../_Generated/Api/FieldCapsResponse.g.cs | 35 ++ .../_Generated/Api/InfoRequest.g.cs | 53 +++ .../_Generated/Api/InfoResponse.g.cs | 47 +++ .../_Generated/Api/KnnSearchRequest.g.cs | 362 ++++++++++++++++ .../_Generated/Api/KnnSearchResponse.g.cs | 51 +++ .../_Generated/Api/RankEvalRequest.g.cs | 246 +++++++++++ .../_Generated/Api/RankEvalResponse.g.cs | 39 ++ .../_Generated/Api/ScriptContextRequest.g.cs | 53 +++ .../_Generated/Api/ScriptContextResponse.g.cs | 31 ++ .../Api/ScriptLanguagesRequest.g.cs | 53 +++ .../Api/ScriptLanguagesResponse.g.cs | 35 ++ .../_Generated/Api/SearchShardsRequest.g.cs | 134 ++++++ .../_Generated/Api/SearchShardsResponse.g.cs | 39 ++ .../_Generated/Api/TermsEnumRequest.g.cs | 397 ++++++++++++++++++ .../_Generated/Api/TermsEnumResponse.g.cs | 39 ++ .../Client/ElasticsearchClient.g.cs | 268 ++++++++++++ .../_Generated/Types/Context.g.cs | 37 ++ .../_Generated/Types/ContextMethod.g.cs | 41 ++ .../_Generated/Types/ContextMethodParam.g.cs | 37 ++ .../_Generated/Types/DocumentRating.g.cs | 85 ++++ .../Types/ElasticsearchVersionInfo.g.cs | 65 +++ .../_Generated/Types/Enums/Enums.Mapping.g.cs | 56 +++ .../_Generated/Types/FieldCapability.g.cs | 77 ++++ .../_Generated/Types/LanguageContext.g.cs | 37 ++ .../_Generated/Types/NodeAttributes.g.cs | 53 +++ .../_Generated/Types/NodeShard.g.cs | 65 +++ .../_Generated/Types/Query.g.cs | 171 ++++++++ .../_Generated/Types/RankEvalHit.g.cs | 41 ++ .../_Generated/Types/RankEvalHitItem.g.cs | 37 ++ .../_Generated/Types/RankEvalMetric.g.cs | 293 +++++++++++++ .../_Generated/Types/RankEvalMetricBase.g.cs | 61 +++ .../Types/RankEvalMetricDetail.g.cs | 45 ++ ...ankEvalMetricDiscountedCumulativeGain.g.cs | 75 ++++ .../RankEvalMetricExpectedReciprocalRank.g.cs | 71 ++++ .../RankEvalMetricMeanReciprocalRank.g.cs | 72 ++++ .../Types/RankEvalMetricPrecision.g.cs | 89 ++++ .../Types/RankEvalMetricRatingTreshold.g.cs | 75 ++++ .../Types/RankEvalMetricRecall.g.cs | 72 ++++ .../_Generated/Types/RankEvalQuery.g.cs | 185 ++++++++ .../_Generated/Types/RankEvalRequestItem.g.cs | 265 ++++++++++++ .../_Generated/Types/ShardStoreIndex.g.cs | 37 ++ .../_Generated/Types/UnratedDocument.g.cs | 37 ++ 46 files changed, 4550 insertions(+) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Context.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Query.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricBase.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDetail.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRatingTreshold.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalRequestItem.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs index d5173998ce3..644aed632ce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -44,6 +44,8 @@ internal static class ApiUrlsLookups internal static ApiUrls EqlSearch = new ApiUrls(new[] { "/{index}/_eql/search" }); internal static ApiUrls EqlGet = new ApiUrls(new[] { "/_eql/search/{id}" }); internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "/{index}/_doc/{id}" }); + internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "/{index}/_source/{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 GraphExplore = new ApiUrls(new[] { "/{index}/_graph/explore" }); internal static ApiUrls IndexLifecycleManagementDeleteLifecycle = new ApiUrls(new[] { "/_ilm/policy/{policy}" }); @@ -75,12 +77,14 @@ internal static class ApiUrlsLookups internal static ApiUrls IndexManagementSplit = new ApiUrls(new[] { "/{index}/_split/{target}" }); 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 NoNamespaceKnnSearch = new ApiUrls(new[] { "/{index}/_knn_search" }); internal static ApiUrls NodesHotThreads = new ApiUrls(new[] { "/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads" }); internal static ApiUrls NodesInfo = new ApiUrls(new[] { "/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}" }); internal static ApiUrls NodesReloadSecureSettings = new ApiUrls(new[] { "/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings" }); @@ -89,13 +93,17 @@ internal static class ApiUrlsLookups internal static ApiUrls NoNamespaceOpenPointInTime = new ApiUrls(new[] { "/{index}/_pit" }); internal static ApiUrls NoNamespacePing = new ApiUrls(new[] { "/" }); internal static ApiUrls NoNamespacePutScript = new ApiUrls(new[] { "/_scripts/{id}", "/_scripts/{id}/{context}" }); + internal static ApiUrls NoNamespaceRankEval = new ApiUrls(new[] { "/_rank_eval", "/{index}/_rank_eval" }); internal static ApiUrls NoNamespaceReindex = new ApiUrls(new[] { "/_reindex" }); internal static ApiUrls NoNamespaceReindexRethrottle = new ApiUrls(new[] { "/_reindex/{task_id}/_rethrottle" }); + internal static ApiUrls NoNamespaceGetScriptContext = new ApiUrls(new[] { "/_script_context" }); + internal static ApiUrls NoNamespaceGetScriptLanguages = new ApiUrls(new[] { "/_script_language" }); internal static ApiUrls SearchableSnapshotsCacheStats = new ApiUrls(new[] { "/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats" }); internal static ApiUrls SearchableSnapshotsClearCache = new ApiUrls(new[] { "/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear" }); internal static ApiUrls SearchableSnapshotsMount = new ApiUrls(new[] { "/_snapshot/{repository}/{snapshot}/_mount" }); internal static ApiUrls SearchableSnapshotsStats = new ApiUrls(new[] { "/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats" }); 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 SnapshotLifecycleManagementDeleteLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}" }); internal static ApiUrls SnapshotLifecycleManagementExecuteLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}/_execute" }); internal static ApiUrls SnapshotLifecycleManagementExecuteRetention = new ApiUrls(new[] { "/_slm/_execute_retention" }); @@ -114,6 +122,7 @@ internal static class ApiUrlsLookups internal static ApiUrls TasksGet = new ApiUrls(new[] { "/_tasks/{task_id}" }); internal static ApiUrls TasksCancel = new ApiUrls(new[] { "/_tasks/_cancel", "/_tasks/{task_id}/_cancel" }); internal static ApiUrls TasksList = new ApiUrls(new[] { "/_tasks" }); + internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "/{index}/_terms_enum" }); 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}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs new file mode 100644 index 00000000000..1816bc7cecc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs @@ -0,0 +1,194 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class ExistsSourceRequestParameters : RequestParameters + { + [JsonIgnore] + public string? Preference { get => Q("preference"); set => Q("preference", value); } + + [JsonIgnore] + public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } + + [JsonIgnore] + public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + + [JsonIgnore] + public long? Version { get => Q("version"); set => Q("version", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } + } + + public partial class ExistsSourceRequest : PlainRequestBase + { + public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource; + protected override HttpMethod HttpMethod => HttpMethod.HEAD; + protected override bool SupportsBody => false; + [JsonIgnore] + public string? Preference { get => Q("preference"); set => Q("preference", value); } + + [JsonIgnore] + public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } + + [JsonIgnore] + public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } + + [JsonIgnore] + public long? Version { get => Q("version"); set => Q("version", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } + } + + public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptorBase, ExistsSourceRequestParameters> + { + internal ExistsSourceRequestDescriptor(Action> configure) => configure.Invoke(this); + public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id)) + { + } + + public ExistsSourceRequestDescriptor(TDocument document) : this(typeof(TDocument), Elasticsearch.Id.From(document)) + { + } + + public ExistsSourceRequestDescriptor(TDocument document, IndexName index, Id id) : this(index, id) + { + } + + public ExistsSourceRequestDescriptor(TDocument document, IndexName index) : this(index, Elasticsearch.Id.From(document)) + { + } + + public ExistsSourceRequestDescriptor(TDocument document, Id id) : this(typeof(TDocument), id) + { + } + + public ExistsSourceRequestDescriptor(Id id) : this(typeof(TDocument), id) + { + } + + internal ExistsSourceRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource; + protected override HttpMethod HttpMethod => HttpMethod.HEAD; + protected override bool SupportsBody => false; + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.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 Version(long? version) => Qs("version", version); + public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); + public ExistsSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + RouteValues.Required("id", id); + return Self; + } + + public ExistsSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptorBase + { + internal ExistsSourceRequestDescriptor(Action configure) => configure.Invoke(this); + public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id)) + { + } + + internal ExistsSourceRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource; + protected override HttpMethod HttpMethod => HttpMethod.HEAD; + protected override bool SupportsBody => false; + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.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 Version(long? version) => Qs("version", version); + public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType); + public ExistsSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + RouteValues.Required("id", id); + return Self; + } + + public ExistsSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceResponse.g.cs new file mode 100644 index 00000000000..fad2416c0ef --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceResponse.g.cs @@ -0,0 +1,28 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ExistsSourceResponse : ExistsResponseBase + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs new file mode 100644 index 00000000000..f956ca2a925 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs @@ -0,0 +1,258 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class FieldCapsRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields Fields { get => Q("fields"); set => Q("fields", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } + } + + public partial class FieldCapsRequest : PlainRequestBase + { + public FieldCapsRequest() + { + } + + public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceFieldCaps; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Fields Fields { get => Q("fields"); set => Q("fields", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } + + [JsonInclude] + [JsonPropertyName("index_filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? IndexFilter { get; set; } + + [JsonInclude] + [JsonPropertyName("runtime_mappings")] + public Dictionary>? RuntimeMappings { get; set; } + } + + public sealed partial class FieldCapsRequestDescriptor : RequestDescriptorBase, FieldCapsRequestParameters> + { + internal FieldCapsRequestDescriptor(Action> configure) => configure.Invoke(this); + public FieldCapsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceFieldCaps; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public FieldCapsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public FieldCapsRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields fields) => Qs("fields", fields); + public FieldCapsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public FieldCapsRequestDescriptor IncludeUnmapped(bool? includeUnmapped = true) => Qs("include_unmapped", includeUnmapped); + public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? IndexFilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor IndexFilterDescriptor { get; set; } + + private Action> IndexFilterDescriptorAction { get; set; } + + private Dictionary>? RuntimeMappingsValue { get; set; } + + public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public FieldCapsRequestDescriptor IndexFilter(QueryDsl.QueryContainerDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public FieldCapsRequestDescriptor IndexFilter(Action> configure) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptorAction = configure; + return Self; + } + + public FieldCapsRequestDescriptor RuntimeMappings(Func>, FluentDictionary>> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterValue, options); + } + + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class FieldCapsRequestDescriptor : RequestDescriptorBase + { + internal FieldCapsRequestDescriptor(Action configure) => configure.Invoke(this); + public FieldCapsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceFieldCaps; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public FieldCapsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public FieldCapsRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields fields) => Qs("fields", fields); + public FieldCapsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public FieldCapsRequestDescriptor IncludeUnmapped(bool? includeUnmapped = true) => Qs("include_unmapped", includeUnmapped); + public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? IndexFilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor IndexFilterDescriptor { get; set; } + + private Action IndexFilterDescriptorAction { get; set; } + + private Dictionary>? RuntimeMappingsValue { get; set; } + + public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public FieldCapsRequestDescriptor IndexFilter(QueryDsl.QueryContainerDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public FieldCapsRequestDescriptor IndexFilter(Action configure) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptorAction = configure; + return Self; + } + + public FieldCapsRequestDescriptor RuntimeMappings(Func>, FluentDictionary>> selector) + { + RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterValue, options); + } + + if (RuntimeMappingsValue is not null) + { + writer.WritePropertyName("runtime_mappings"); + JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs new file mode 100644 index 00000000000..4797eaf1807 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs @@ -0,0 +1,35 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class FieldCapsResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("fields")] + public Dictionary> Fields { get; init; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices Indices { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs new file mode 100644 index 00000000000..82b58654322 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class InfoRequestParameters : RequestParameters + { + } + + public partial class InfoRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceInfo; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class InfoRequestDescriptor : RequestDescriptorBase + { + internal InfoRequestDescriptor(Action configure) => configure.Invoke(this); + public InfoRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceInfo; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs new file mode 100644 index 00000000000..2df6567a5de --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs @@ -0,0 +1,47 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class InfoResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("cluster_name")] + public string ClusterName { get; init; } + + [JsonInclude] + [JsonPropertyName("cluster_uuid")] + public string ClusterUuid { get; init; } + + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + + [JsonInclude] + [JsonPropertyName("tagline")] + public string Tagline { get; init; } + + [JsonInclude] + [JsonPropertyName("version")] + public Elastic.Clients.Elasticsearch.ElasticsearchVersionInfo Version { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchRequest.g.cs new file mode 100644 index 00000000000..ccf53652829 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchRequest.g.cs @@ -0,0 +1,362 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class KnnSearchRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + } + + public partial class KnnSearchRequest : PlainRequestBase + { + public KnnSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceKnnSearch; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + + [JsonInclude] + [JsonPropertyName("_source")] + public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + + [JsonInclude] + [JsonPropertyName("docvalue_fields")] + public IEnumerable? DocvalueFields { get; set; } + + [JsonInclude] + [JsonPropertyName("stored_fields")] + public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } + + [JsonInclude] + [JsonPropertyName("fields")] + public Elastic.Clients.Elasticsearch.Fields? Fields { get; set; } + + [JsonInclude] + [JsonPropertyName("knn")] + public Elastic.Clients.Elasticsearch.Query Knn { get; set; } + } + + public sealed partial class KnnSearchRequestDescriptor : RequestDescriptorBase, KnnSearchRequestParameters> + { + internal KnnSearchRequestDescriptor(Action> configure) => configure.Invoke(this); + public KnnSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal KnnSearchRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceKnnSearch; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public KnnSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public KnnSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + private IEnumerable? DocvalueFieldsValue { get; set; } + + private Elastic.Clients.Elasticsearch.Query KnnValue { get; set; } + + private QueryDescriptor KnnDescriptor { get; set; } + + private Action> KnnDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + + private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } + + private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } + + public KnnSearchRequestDescriptor DocvalueFields(IEnumerable? docvalueFields) + { + DocvalueFieldsValue = docvalueFields; + return Self; + } + + public KnnSearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Query knn) + { + KnnDescriptor = null; + KnnDescriptorAction = null; + KnnValue = knn; + return Self; + } + + public KnnSearchRequestDescriptor Knn(QueryDescriptor descriptor) + { + KnnValue = null; + KnnDescriptorAction = null; + KnnDescriptor = descriptor; + return Self; + } + + public KnnSearchRequestDescriptor Knn(Action> configure) + { + KnnValue = null; + KnnDescriptorAction = null; + KnnDescriptorAction = configure; + return Self; + } + + public KnnSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + { + SourceValue = source; + return Self; + } + + public KnnSearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + { + FieldsValue = fields; + return Self; + } + + public KnnSearchRequestDescriptor Fields(Expression> fields) + { + FieldsValue = fields; + return Self; + } + + public KnnSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) + { + StoredFieldsValue = storedFields; + return Self; + } + + public KnnSearchRequestDescriptor StoredFields(Expression> storedFields) + { + StoredFieldsValue = storedFields; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DocvalueFieldsValue is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); + } + + if (KnnDescriptor is not null) + { + writer.WritePropertyName("knn"); + JsonSerializer.Serialize(writer, KnnDescriptor, options); + } + else if (KnnDescriptorAction is not null) + { + writer.WritePropertyName("knn"); + JsonSerializer.Serialize(writer, new QueryDescriptor(KnnDescriptorAction), options); + } + else + { + writer.WritePropertyName("knn"); + JsonSerializer.Serialize(writer, KnnValue, options); + } + + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (StoredFieldsValue is not null) + { + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, StoredFieldsValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class KnnSearchRequestDescriptor : RequestDescriptorBase + { + internal KnnSearchRequestDescriptor(Action configure) => configure.Invoke(this); + public KnnSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal KnnSearchRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceKnnSearch; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public KnnSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public KnnSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + private IEnumerable? DocvalueFieldsValue { get; set; } + + private Elastic.Clients.Elasticsearch.Query KnnValue { get; set; } + + private QueryDescriptor KnnDescriptor { get; set; } + + private Action KnnDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + + private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } + + private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } + + public KnnSearchRequestDescriptor DocvalueFields(IEnumerable? docvalueFields) + { + DocvalueFieldsValue = docvalueFields; + return Self; + } + + public KnnSearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Query knn) + { + KnnDescriptor = null; + KnnDescriptorAction = null; + KnnValue = knn; + return Self; + } + + public KnnSearchRequestDescriptor Knn(QueryDescriptor descriptor) + { + KnnValue = null; + KnnDescriptorAction = null; + KnnDescriptor = descriptor; + return Self; + } + + public KnnSearchRequestDescriptor Knn(Action configure) + { + KnnValue = null; + KnnDescriptorAction = null; + KnnDescriptorAction = configure; + return Self; + } + + public KnnSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + { + SourceValue = source; + return Self; + } + + public KnnSearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) + { + FieldsValue = fields; + return Self; + } + + public KnnSearchRequestDescriptor Fields(Expression> fields) + { + FieldsValue = fields; + return Self; + } + + public KnnSearchRequestDescriptor Fields(Expression> fields) + { + FieldsValue = fields; + return Self; + } + + public KnnSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? storedFields) + { + StoredFieldsValue = storedFields; + return Self; + } + + public KnnSearchRequestDescriptor StoredFields(Expression> storedFields) + { + StoredFieldsValue = storedFields; + return Self; + } + + public KnnSearchRequestDescriptor StoredFields(Expression> storedFields) + { + StoredFieldsValue = storedFields; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DocvalueFieldsValue is not null) + { + writer.WritePropertyName("docvalue_fields"); + JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); + } + + if (KnnDescriptor is not null) + { + writer.WritePropertyName("knn"); + JsonSerializer.Serialize(writer, KnnDescriptor, options); + } + else if (KnnDescriptorAction is not null) + { + writer.WritePropertyName("knn"); + JsonSerializer.Serialize(writer, new QueryDescriptor(KnnDescriptorAction), options); + } + else + { + writer.WritePropertyName("knn"); + JsonSerializer.Serialize(writer, KnnValue, options); + } + + if (SourceValue is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + + if (FieldsValue is not null) + { + writer.WritePropertyName("fields"); + JsonSerializer.Serialize(writer, FieldsValue, options); + } + + if (StoredFieldsValue is not null) + { + writer.WritePropertyName("stored_fields"); + JsonSerializer.Serialize(writer, StoredFieldsValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchResponse.g.cs new file mode 100644 index 00000000000..97e4d94471c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/KnnSearchResponse.g.cs @@ -0,0 +1,51 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class KnnSearchResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("fields")] + public Dictionary? Fields { get; init; } + + [JsonInclude] + [JsonPropertyName("hits")] + public Elastic.Clients.Elasticsearch.HitsMetadata Hits { get; init; } + + [JsonInclude] + [JsonPropertyName("max_score")] + public double? MaxScore { get; init; } + + [JsonInclude] + [JsonPropertyName("_shards")] + public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; } + + [JsonInclude] + [JsonPropertyName("timed_out")] + public bool TimedOut { get; init; } + + [JsonInclude] + [JsonPropertyName("took")] + public long Took { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs new file mode 100644 index 00000000000..fb9518d8c57 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs @@ -0,0 +1,246 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class RankEvalRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public string? SearchType { get => Q("search_type"); set => Q("search_type", value); } + } + + public partial class RankEvalRequest : PlainRequestBase + { + public RankEvalRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceRankEval; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public string? SearchType { get => Q("search_type"); set => Q("search_type", value); } + + [JsonInclude] + [JsonPropertyName("requests")] + public IEnumerable Requests { get; set; } + + [JsonInclude] + [JsonPropertyName("metric")] + public Elastic.Clients.Elasticsearch.RankEvalMetric? Metric { get; set; } + } + + public sealed partial class RankEvalRequestDescriptor : RequestDescriptorBase, RankEvalRequestParameters> + { + internal RankEvalRequestDescriptor(Action> configure) => configure.Invoke(this); + public RankEvalRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal RankEvalRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceRankEval; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public RankEvalRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public RankEvalRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public RankEvalRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public RankEvalRequestDescriptor SearchType(string? searchType) => Qs("search_type", searchType); + public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + private IEnumerable RequestsValue { get; set; } + + private Elastic.Clients.Elasticsearch.RankEvalMetric? MetricValue { get; set; } + + private RankEvalMetricDescriptor MetricDescriptor { get; set; } + + private Action MetricDescriptorAction { get; set; } + + public RankEvalRequestDescriptor Requests(IEnumerable requests) + { + RequestsValue = requests; + return Self; + } + + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.RankEvalMetric? metric) + { + MetricDescriptor = null; + MetricDescriptorAction = null; + MetricValue = metric; + return Self; + } + + public RankEvalRequestDescriptor Metric(RankEvalMetricDescriptor descriptor) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptor = descriptor; + return Self; + } + + public RankEvalRequestDescriptor Metric(Action configure) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("requests"); + 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 RankEvalMetricDescriptor(MetricDescriptorAction), options); + } + else if (MetricValue is not null) + { + writer.WritePropertyName("metric"); + JsonSerializer.Serialize(writer, MetricValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class RankEvalRequestDescriptor : RequestDescriptorBase + { + internal RankEvalRequestDescriptor(Action configure) => configure.Invoke(this); + public RankEvalRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal RankEvalRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceRankEval; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public RankEvalRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public RankEvalRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public RankEvalRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public RankEvalRequestDescriptor SearchType(string? searchType) => Qs("search_type", searchType); + public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + private IEnumerable RequestsValue { get; set; } + + private Elastic.Clients.Elasticsearch.RankEvalMetric? MetricValue { get; set; } + + private RankEvalMetricDescriptor MetricDescriptor { get; set; } + + private Action MetricDescriptorAction { get; set; } + + public RankEvalRequestDescriptor Requests(IEnumerable requests) + { + RequestsValue = requests; + return Self; + } + + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.RankEvalMetric? metric) + { + MetricDescriptor = null; + MetricDescriptorAction = null; + MetricValue = metric; + return Self; + } + + public RankEvalRequestDescriptor Metric(RankEvalMetricDescriptor descriptor) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptor = descriptor; + return Self; + } + + public RankEvalRequestDescriptor Metric(Action configure) + { + MetricValue = null; + MetricDescriptorAction = null; + MetricDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("requests"); + 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 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/RankEvalResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs new file mode 100644 index 00000000000..7eafa78b642 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs @@ -0,0 +1,39 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("details")] + public Dictionary Details { get; init; } + + [JsonInclude] + [JsonPropertyName("failures")] + public Dictionary Failures { get; init; } + + [JsonInclude] + [JsonPropertyName("metric_score")] + public double MetricScore { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextRequest.g.cs new file mode 100644 index 00000000000..c0d79e1bd2d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextRequest.g.cs @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class ScriptContextRequestParameters : RequestParameters + { + } + + public partial class ScriptContextRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetScriptContext; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class ScriptContextRequestDescriptor : RequestDescriptorBase + { + internal ScriptContextRequestDescriptor(Action configure) => configure.Invoke(this); + public ScriptContextRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetScriptContext; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs new file mode 100644 index 00000000000..58a8fd2b691 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs @@ -0,0 +1,31 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ScriptContextResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("contexts")] + public IReadOnlyCollection Contexts { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesRequest.g.cs new file mode 100644 index 00000000000..23f0dfd5471 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesRequest.g.cs @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class ScriptLanguagesRequestParameters : RequestParameters + { + } + + public partial class ScriptLanguagesRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetScriptLanguages; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class ScriptLanguagesRequestDescriptor : RequestDescriptorBase + { + internal ScriptLanguagesRequestDescriptor(Action configure) => configure.Invoke(this); + public ScriptLanguagesRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetScriptLanguages; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs new file mode 100644 index 00000000000..95ef4f91f10 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs @@ -0,0 +1,35 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ScriptLanguagesResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("language_contexts")] + public IReadOnlyCollection LanguageContexts { get; init; } + + [JsonInclude] + [JsonPropertyName("types_allowed")] + public IReadOnlyCollection TypesAllowed { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs new file mode 100644 index 00000000000..7972de8e2fe --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs @@ -0,0 +1,134 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class SearchShardsRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? Local { get => Q("local"); set => Q("local", value); } + + [JsonIgnore] + public string? Preference { get => Q("preference"); set => Q("preference", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + } + + public partial class SearchShardsRequest : PlainRequestBase + { + public SearchShardsRequest() + { + } + + public SearchShardsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSearchShards; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? Local { get => Q("local"); set => Q("local", value); } + + [JsonIgnore] + public string? Preference { get => Q("preference"); set => Q("preference", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } + } + + public sealed partial class SearchShardsRequestDescriptor : RequestDescriptorBase, SearchShardsRequestParameters> + { + internal SearchShardsRequestDescriptor(Action> configure) => configure.Invoke(this); + public SearchShardsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSearchShards; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public SearchShardsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public SearchShardsRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public SearchShardsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public SearchShardsRequestDescriptor Local(bool? local = true) => Qs("local", local); + public SearchShardsRequestDescriptor Preference(string? preference) => Qs("preference", preference); + public SearchShardsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public SearchShardsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class SearchShardsRequestDescriptor : RequestDescriptorBase + { + internal SearchShardsRequestDescriptor(Action configure) => configure.Invoke(this); + public SearchShardsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSearchShards; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public SearchShardsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public SearchShardsRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public SearchShardsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public SearchShardsRequestDescriptor Local(bool? local = true) => Qs("local", local); + public SearchShardsRequestDescriptor Preference(string? preference) => Qs("preference", preference); + public SearchShardsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); + public SearchShardsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs new file mode 100644 index 00000000000..c9cce5829f3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs @@ -0,0 +1,39 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class SearchShardsResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("indices")] + public Dictionary Indices { get; init; } + + [JsonInclude] + [JsonPropertyName("nodes")] + public Dictionary Nodes { get; init; } + + [JsonInclude] + [JsonPropertyName("shards")] + public IReadOnlyCollection> Shards { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs new file mode 100644 index 00000000000..5514b9a7f35 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs @@ -0,0 +1,397 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public class TermsEnumRequestParameters : RequestParameters + { + } + + public partial class TermsEnumRequest : PlainRequestBase + { + public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r.Required("index", index)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceTermsEnum; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + [JsonInclude] + [JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Field Field { get; set; } + + [JsonInclude] + [JsonPropertyName("size")] + public int? Size { get; set; } + + [JsonInclude] + [JsonPropertyName("timeout")] + public Elastic.Clients.Elasticsearch.Time? Timeout { get; set; } + + [JsonInclude] + [JsonPropertyName("case_insensitive")] + public bool? CaseInsensitive { get; set; } + + [JsonInclude] + [JsonPropertyName("index_filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? IndexFilter { get; set; } + + [JsonInclude] + [JsonPropertyName("string")] + public string? String { get; set; } + + [JsonInclude] + [JsonPropertyName("search_after")] + public string? SearchAfter { get; set; } + } + + public sealed partial class TermsEnumRequestDescriptor : RequestDescriptorBase, TermsEnumRequestParameters> + { + internal TermsEnumRequestDescriptor(Action> configure) => configure.Invoke(this); + public TermsEnumRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r.Required("index", index)) + { + } + + public TermsEnumRequestDescriptor(TDocument document) : this(typeof(TDocument)) + { + } + + internal TermsEnumRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceTermsEnum; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? IndexFilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor 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.Time? TimeoutValue { get; set; } + + public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryContainerDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(Action> configure) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptorAction = configure; + return Self; + } + + public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) + { + CaseInsensitiveValue = caseInsensitive; + return Self; + } + + public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public TermsEnumRequestDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + public TermsEnumRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + + public TermsEnumRequestDescriptor String(string? value) + { + StringValue = value; + return Self; + } + + public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) + { + TimeoutValue = timeout; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + 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"); + writer.WriteStringValue(SearchAfterValue); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + + if (!string.IsNullOrEmpty(StringValue)) + { + writer.WritePropertyName("string"); + writer.WriteStringValue(StringValue); + } + + if (TimeoutValue is not null) + { + writer.WritePropertyName("timeout"); + JsonSerializer.Serialize(writer, TimeoutValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class TermsEnumRequestDescriptor : RequestDescriptorBase + { + internal TermsEnumRequestDescriptor(Action configure) => configure.Invoke(this); + public TermsEnumRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r.Required("index", index)) + { + } + + internal TermsEnumRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceTermsEnum; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? IndexFilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor 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.Time? TimeoutValue { get; set; } + + public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? indexFilter) + { + IndexFilterDescriptor = null; + IndexFilterDescriptorAction = null; + IndexFilterValue = indexFilter; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(QueryDsl.QueryContainerDescriptor descriptor) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptor = descriptor; + return Self; + } + + public TermsEnumRequestDescriptor IndexFilter(Action configure) + { + IndexFilterValue = null; + IndexFilterDescriptorAction = null; + IndexFilterDescriptorAction = configure; + return Self; + } + + public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) + { + CaseInsensitiveValue = caseInsensitive; + return Self; + } + + public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public TermsEnumRequestDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TermsEnumRequestDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) + { + SearchAfterValue = searchAfter; + return Self; + } + + public TermsEnumRequestDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + + public TermsEnumRequestDescriptor String(string? value) + { + StringValue = value; + return Self; + } + + public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) + { + TimeoutValue = timeout; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexFilterDescriptor is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); + } + else if (IndexFilterDescriptorAction is not null) + { + writer.WritePropertyName("index_filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(IndexFilterDescriptorAction), options); + } + else if (IndexFilterValue is not null) + { + writer.WritePropertyName("index_filter"); + 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"); + writer.WriteStringValue(SearchAfterValue); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + + if (!string.IsNullOrEmpty(StringValue)) + { + writer.WritePropertyName("string"); + writer.WriteStringValue(StringValue); + } + + if (TimeoutValue is not null) + { + writer.WritePropertyName("timeout"); + JsonSerializer.Serialize(writer, TimeoutValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs new file mode 100644 index 00000000000..a5680c17a01 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs @@ -0,0 +1,39 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class TermsEnumResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("complete")] + public bool Complete { get; init; } + + [JsonInclude] + [JsonPropertyName("_shards")] + public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; } + + [JsonInclude] + [JsonPropertyName("terms")] + public IReadOnlyCollection Terms { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index 30abcb33564..7f5291c0028 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -304,6 +304,62 @@ public Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName return DoRequestAsync(descriptor); } + public ExistsSourceResponse ExistsSource(ExistsSourceRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ExistsSourceAsync(ExistsSourceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest = null) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public FieldCapsResponse FieldCaps(FieldCapsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task FieldCapsAsync(FieldCapsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public FieldCapsResponse FieldCaps(Action configureRequest = null) + { + var descriptor = new FieldCapsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task FieldCapsAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public GetResponse Get(GetRequest request) { request.BeforeRequest(); @@ -360,6 +416,62 @@ public Task IndexAsync(TDocument document, Elastic.Cli return DoRequestAsync, IndexResponse>(descriptor); } + public InfoResponse Info(InfoRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task InfoAsync(InfoRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public InfoResponse Info(Action configureRequest = null) + { + var descriptor = new InfoRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task InfoAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new InfoRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public KnnSearchResponse KnnSearch(KnnSearchRequest request) + { + request.BeforeRequest(); + return DoRequest>(request); + } + + public Task> KnnSearchAsync(KnnSearchRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync>(request, cancellationToken); + } + + public KnnSearchResponse KnnSearch(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest = null) + { + var descriptor = new KnnSearchRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, KnnSearchResponse>(descriptor); + } + + public Task> KnnSearchAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new KnnSearchRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, KnnSearchResponse>(descriptor); + } + public OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest request) { request.BeforeRequest(); @@ -444,6 +556,50 @@ public Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id i return DoRequestAsync(descriptor); } + public RankEvalResponse RankEval(RankEvalRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task RankEvalAsync(RankEvalRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public RankEvalResponse RankEval(Action configureRequest = null) + { + var descriptor = new RankEvalRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null) + { + var descriptor = new RankEvalRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task RankEvalAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public ReindexResponse Reindex(ReindexRequest request) { request.BeforeRequest(); @@ -500,6 +656,62 @@ public Task ReindexRethrottleAsync(Elastic.Clients.El return DoRequestAsync(descriptor); } + public ScriptContextResponse ScriptContext(ScriptContextRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ScriptContextAsync(ScriptContextRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public ScriptContextResponse ScriptContext(Action configureRequest = null) + { + var descriptor = new ScriptContextRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ScriptContextAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new ScriptContextRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public ScriptLanguagesResponse ScriptLanguages(ScriptLanguagesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ScriptLanguagesAsync(ScriptLanguagesRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public ScriptLanguagesResponse ScriptLanguages(Action configureRequest = null) + { + var descriptor = new ScriptLanguagesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ScriptLanguagesAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new ScriptLanguagesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public SearchResponse Search(SearchRequest request) { request.BeforeRequest(); @@ -528,6 +740,34 @@ public Task> SearchAsync(Action, SearchResponse>(descriptor); } + public SearchShardsResponse SearchShards(SearchShardsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task SearchShardsAsync(SearchShardsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SearchShardsResponse SearchShards(Action configureRequest = null) + { + var descriptor = new SearchShardsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task SearchShardsAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SearchShardsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public SourceResponse Source(SourceRequest request) { request.BeforeRequest(); @@ -556,6 +796,34 @@ public Task> SourceAsync(Elastic.Clients.El return DoRequestAsync, SourceResponse>(descriptor); } + public TermsEnumResponse TermsEnum(TermsEnumRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task TermsEnumAsync(TermsEnumRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest = null) + { + var descriptor = new TermsEnumRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new TermsEnumRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Context.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Context.g.cs new file mode 100644 index 00000000000..687f8a5c381 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Context.g.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class Context + { + [JsonInclude] + [JsonPropertyName("methods")] + public IReadOnlyCollection Methods { get; init; } + + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs new file mode 100644 index 00000000000..284584598e8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs @@ -0,0 +1,41 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ContextMethod + { + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + + [JsonInclude] + [JsonPropertyName("params")] + public IReadOnlyCollection Params { get; init; } + + [JsonInclude] + [JsonPropertyName("return_type")] + public string ReturnType { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs new file mode 100644 index 00000000000..1e71b3dabdd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ContextMethodParam + { + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs new file mode 100644 index 00000000000..349b14730bc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs @@ -0,0 +1,85 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class DocumentRating + { + [JsonInclude] + [JsonPropertyName("_id")] + public Elastic.Clients.Elasticsearch.Id Id { get; set; } + + [JsonInclude] + [JsonPropertyName("_index")] + public Elastic.Clients.Elasticsearch.IndexName Index { get; set; } + + [JsonInclude] + [JsonPropertyName("rating")] + public int Rating { get; set; } + } + + public sealed partial class DocumentRatingDescriptor : DescriptorBase + { + internal DocumentRatingDescriptor(Action configure) => configure.Invoke(this); + public DocumentRatingDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + + private Elastic.Clients.Elasticsearch.IndexName IndexValue { get; set; } + + private int RatingValue { get; set; } + + public DocumentRatingDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + IdValue = id; + return Self; + } + + public DocumentRatingDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + IndexValue = index; + return Self; + } + + public DocumentRatingDescriptor Rating(int rating) + { + RatingValue = rating; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("_id"); + JsonSerializer.Serialize(writer, IdValue, options); + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexValue, options); + writer.WritePropertyName("rating"); + writer.WriteNumberValue(RatingValue); + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs new file mode 100644 index 00000000000..aff88406b51 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs @@ -0,0 +1,65 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ElasticsearchVersionInfo + { + [JsonInclude] + [JsonPropertyName("build_date")] + public string BuildDate { get; init; } + + [JsonInclude] + [JsonPropertyName("build_flavor")] + public string BuildFlavor { get; init; } + + [JsonInclude] + [JsonPropertyName("build_hash")] + public string BuildHash { get; init; } + + [JsonInclude] + [JsonPropertyName("build_snapshot")] + public bool BuildSnapshot { get; init; } + + [JsonInclude] + [JsonPropertyName("build_type")] + public string BuildType { get; init; } + + [JsonInclude] + [JsonPropertyName("lucene_version")] + public string LuceneVersion { get; init; } + + [JsonInclude] + [JsonPropertyName("minimum_index_compatibility_version")] + public string MinimumIndexCompatibilityVersion { get; init; } + + [JsonInclude] + [JsonPropertyName("minimum_wire_compatibility_version")] + public string MinimumWireCompatibilityVersion { get; init; } + + [JsonInclude] + [JsonPropertyName("number")] + public string Number { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs index be0a168da42..68c625d8697 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs @@ -100,4 +100,60 @@ public override void Write(Utf8JsonWriter writer, RuntimeFieldType value, JsonSe writer.WriteNullValue(); } } + + [JsonConverter(typeof(TimeSeriesMetricTypeConverter))] + public enum TimeSeriesMetricType + { + [EnumMember(Value = "summary")] + Summary, + [EnumMember(Value = "histogram")] + Histogram, + [EnumMember(Value = "gauge")] + Gauge, + [EnumMember(Value = "counter")] + Counter + } + + internal sealed class TimeSeriesMetricTypeConverter : JsonConverter + { + public override TimeSeriesMetricType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "summary": + return TimeSeriesMetricType.Summary; + case "histogram": + return TimeSeriesMetricType.Histogram; + case "gauge": + return TimeSeriesMetricType.Gauge; + case "counter": + return TimeSeriesMetricType.Counter; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, TimeSeriesMetricType value, JsonSerializerOptions options) + { + switch (value) + { + case TimeSeriesMetricType.Summary: + writer.WriteStringValue("summary"); + return; + case TimeSeriesMetricType.Histogram: + writer.WriteStringValue("histogram"); + return; + case TimeSeriesMetricType.Gauge: + writer.WriteStringValue("gauge"); + return; + case TimeSeriesMetricType.Counter: + writer.WriteStringValue("counter"); + return; + } + + writer.WriteNullValue(); + } + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs new file mode 100644 index 00000000000..ec554cdd3da --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs @@ -0,0 +1,77 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class FieldCapability + { + [JsonInclude] + [JsonPropertyName("aggregatable")] + public bool Aggregatable { get; init; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices? Indices { get; init; } + + [JsonInclude] + [JsonPropertyName("meta")] + public Dictionary? Meta { get; init; } + + [JsonInclude] + [JsonPropertyName("metadata_field")] + public bool? MetadataField { get; init; } + + [JsonInclude] + [JsonPropertyName("metric_conflicts_indices")] + public IReadOnlyCollection? MetricConflictsIndices { get; init; } + + [JsonInclude] + [JsonPropertyName("non_aggregatable_indices")] + public Elastic.Clients.Elasticsearch.Indices? NonAggregatableIndices { get; init; } + + [JsonInclude] + [JsonPropertyName("non_dimension_indices")] + public IReadOnlyCollection? NonDimensionIndices { get; init; } + + [JsonInclude] + [JsonPropertyName("non_searchable_indices")] + public Elastic.Clients.Elasticsearch.Indices? NonSearchableIndices { get; init; } + + [JsonInclude] + [JsonPropertyName("searchable")] + public bool Searchable { get; init; } + + [JsonInclude] + [JsonPropertyName("time_series_dimension")] + public bool? TimeSeriesDimension { get; init; } + + [JsonInclude] + [JsonPropertyName("time_series_metric")] + public Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; init; } + + [JsonInclude] + [JsonPropertyName("type")] + public string Type { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs new file mode 100644 index 00000000000..d12b855f9e1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class LanguageContext + { + [JsonInclude] + [JsonPropertyName("contexts")] + public IReadOnlyCollection Contexts { get; init; } + + [JsonInclude] + [JsonPropertyName("language")] + public string Language { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs new file mode 100644 index 00000000000..d91f2dc27d4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeAttributes.g.cs @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class NodeAttributes + { + [JsonInclude] + [JsonPropertyName("attributes")] + public Dictionary Attributes { get; init; } + + [JsonInclude] + [JsonPropertyName("ephemeral_id")] + public string EphemeralId { get; init; } + + [JsonInclude] + [JsonPropertyName("id")] + public string? Id { get; init; } + + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + + [JsonInclude] + [JsonPropertyName("roles")] + public IReadOnlyCollection? Roles { get; init; } + + [JsonInclude] + [JsonPropertyName("transport_address")] + public string TransportAddress { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs new file mode 100644 index 00000000000..4e3f405ef7f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeShard.g.cs @@ -0,0 +1,65 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class NodeShard + { + [JsonInclude] + [JsonPropertyName("allocation_id")] + public Dictionary? AllocationId { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public string Index { get; init; } + + [JsonInclude] + [JsonPropertyName("node")] + public string? Node { get; init; } + + [JsonInclude] + [JsonPropertyName("primary")] + public bool Primary { get; init; } + + [JsonInclude] + [JsonPropertyName("recovery_source")] + public Dictionary? RecoverySource { get; init; } + + [JsonInclude] + [JsonPropertyName("relocating_node")] + public string? RelocatingNode { get; init; } + + [JsonInclude] + [JsonPropertyName("shard")] + public int Shard { get; init; } + + [JsonInclude] + [JsonPropertyName("state")] + public Elastic.Clients.Elasticsearch.IndexManagement.Stats.ShardRoutingState State { get; init; } + + [JsonInclude] + [JsonPropertyName("unassigned_info")] + public Elastic.Clients.Elasticsearch.Cluster.AllocationExplain.UnassignedInformation? UnassignedInfo { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Query.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Query.g.cs new file mode 100644 index 00000000000..bbc19ec314f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Query.g.cs @@ -0,0 +1,171 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class Query + { + [JsonInclude] + [JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Field Field { get; set; } + + [JsonInclude] + [JsonPropertyName("k")] + public long k { get; set; } + + [JsonInclude] + [JsonPropertyName("num_candidates")] + public long NumCandidates { get; set; } + + [JsonInclude] + [JsonPropertyName("query_vector")] + public IEnumerable QueryVector { get; set; } + } + + public sealed partial class QueryDescriptor : DescriptorBase> + { + internal QueryDescriptor(Action> configure) => configure.Invoke(this); + public QueryDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + + private long kValue { get; set; } + + private long NumCandidatesValue { get; set; } + + private IEnumerable QueryVectorValue { get; set; } + + public QueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public QueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public QueryDescriptor k(long k) + { + kValue = k; + return Self; + } + + public QueryDescriptor NumCandidates(long numCandidates) + { + NumCandidatesValue = numCandidates; + return Self; + } + + public QueryDescriptor QueryVector(IEnumerable queryVector) + { + QueryVectorValue = queryVector; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue); + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue); + writer.WritePropertyName("query_vector"); + JsonSerializer.Serialize(writer, QueryVectorValue, options); + writer.WriteEndObject(); + } + } + + public sealed partial class QueryDescriptor : DescriptorBase + { + internal QueryDescriptor(Action configure) => configure.Invoke(this); + public QueryDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + + private long kValue { get; set; } + + private long NumCandidatesValue { get; set; } + + private IEnumerable QueryVectorValue { get; set; } + + public QueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public QueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public QueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public QueryDescriptor k(long k) + { + kValue = k; + return Self; + } + + public QueryDescriptor NumCandidates(long numCandidates) + { + NumCandidatesValue = numCandidates; + return Self; + } + + public QueryDescriptor QueryVector(IEnumerable queryVector) + { + QueryVectorValue = queryVector; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue); + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue); + writer.WritePropertyName("query_vector"); + JsonSerializer.Serialize(writer, QueryVectorValue, options); + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs new file mode 100644 index 00000000000..9f42e45417e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs @@ -0,0 +1,41 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalHit + { + [JsonInclude] + [JsonPropertyName("_id")] + public string Id { get; init; } + + [JsonInclude] + [JsonPropertyName("_index")] + public string Index { get; init; } + + [JsonInclude] + [JsonPropertyName("_score")] + public double Score { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs new file mode 100644 index 00000000000..47e64c355e9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalHitItem + { + [JsonInclude] + [JsonPropertyName("hit")] + public Elastic.Clients.Elasticsearch.RankEvalHit Hit { get; init; } + + [JsonInclude] + [JsonPropertyName("rating")] + public double? Rating { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs new file mode 100644 index 00000000000..a148325e2c6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs @@ -0,0 +1,293 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetric + { + [JsonInclude] + [JsonPropertyName("dcg")] + public Elastic.Clients.Elasticsearch.RankEvalMetricDiscountedCumulativeGain? Dcg { get; set; } + + [JsonInclude] + [JsonPropertyName("expected_reciprocal_rank")] + public Elastic.Clients.Elasticsearch.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRank { get; set; } + + [JsonInclude] + [JsonPropertyName("mean_reciprocal_rank")] + public Elastic.Clients.Elasticsearch.RankEvalMetricMeanReciprocalRank? MeanReciprocalRank { get; set; } + + [JsonInclude] + [JsonPropertyName("precision")] + public Elastic.Clients.Elasticsearch.RankEvalMetricPrecision? Precision { get; set; } + + [JsonInclude] + [JsonPropertyName("recall")] + public Elastic.Clients.Elasticsearch.RankEvalMetricRecall? Recall { get; set; } + } + + public sealed partial class RankEvalMetricDescriptor : DescriptorBase + { + internal RankEvalMetricDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.RankEvalMetricDiscountedCumulativeGain? DcgValue { get; set; } + + private RankEvalMetricDiscountedCumulativeGainDescriptor DcgDescriptor { get; set; } + + private Action DcgDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRankValue { get; set; } + + private RankEvalMetricExpectedReciprocalRankDescriptor ExpectedReciprocalRankDescriptor { get; set; } + + private Action ExpectedReciprocalRankDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.RankEvalMetricMeanReciprocalRank? MeanReciprocalRankValue { get; set; } + + private RankEvalMetricMeanReciprocalRankDescriptor MeanReciprocalRankDescriptor { get; set; } + + private Action MeanReciprocalRankDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.RankEvalMetricPrecision? PrecisionValue { get; set; } + + private RankEvalMetricPrecisionDescriptor PrecisionDescriptor { get; set; } + + private Action PrecisionDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.RankEvalMetricRecall? RecallValue { get; set; } + + private RankEvalMetricRecallDescriptor RecallDescriptor { get; set; } + + private Action RecallDescriptorAction { get; set; } + + public RankEvalMetricDescriptor Dcg(Elastic.Clients.Elasticsearch.RankEvalMetricDiscountedCumulativeGain? dcg) + { + DcgDescriptor = null; + DcgDescriptorAction = null; + DcgValue = dcg; + return Self; + } + + public RankEvalMetricDescriptor Dcg(RankEvalMetricDiscountedCumulativeGainDescriptor descriptor) + { + DcgValue = null; + DcgDescriptorAction = null; + DcgDescriptor = descriptor; + return Self; + } + + public RankEvalMetricDescriptor Dcg(Action configure) + { + DcgValue = null; + DcgDescriptorAction = null; + DcgDescriptorAction = configure; + return Self; + } + + public RankEvalMetricDescriptor ExpectedReciprocalRank(Elastic.Clients.Elasticsearch.RankEvalMetricExpectedReciprocalRank? expectedReciprocalRank) + { + ExpectedReciprocalRankDescriptor = null; + ExpectedReciprocalRankDescriptorAction = null; + ExpectedReciprocalRankValue = expectedReciprocalRank; + return Self; + } + + public RankEvalMetricDescriptor ExpectedReciprocalRank(RankEvalMetricExpectedReciprocalRankDescriptor descriptor) + { + ExpectedReciprocalRankValue = null; + ExpectedReciprocalRankDescriptorAction = null; + ExpectedReciprocalRankDescriptor = descriptor; + return Self; + } + + public RankEvalMetricDescriptor ExpectedReciprocalRank(Action configure) + { + ExpectedReciprocalRankValue = null; + ExpectedReciprocalRankDescriptorAction = null; + ExpectedReciprocalRankDescriptorAction = configure; + return Self; + } + + public RankEvalMetricDescriptor MeanReciprocalRank(Elastic.Clients.Elasticsearch.RankEvalMetricMeanReciprocalRank? meanReciprocalRank) + { + MeanReciprocalRankDescriptor = null; + MeanReciprocalRankDescriptorAction = null; + MeanReciprocalRankValue = meanReciprocalRank; + return Self; + } + + public RankEvalMetricDescriptor MeanReciprocalRank(RankEvalMetricMeanReciprocalRankDescriptor descriptor) + { + MeanReciprocalRankValue = null; + MeanReciprocalRankDescriptorAction = null; + MeanReciprocalRankDescriptor = descriptor; + return Self; + } + + public RankEvalMetricDescriptor MeanReciprocalRank(Action configure) + { + MeanReciprocalRankValue = null; + MeanReciprocalRankDescriptorAction = null; + MeanReciprocalRankDescriptorAction = configure; + return Self; + } + + public RankEvalMetricDescriptor Precision(Elastic.Clients.Elasticsearch.RankEvalMetricPrecision? precision) + { + PrecisionDescriptor = null; + PrecisionDescriptorAction = null; + PrecisionValue = precision; + return Self; + } + + public RankEvalMetricDescriptor Precision(RankEvalMetricPrecisionDescriptor descriptor) + { + PrecisionValue = null; + PrecisionDescriptorAction = null; + PrecisionDescriptor = descriptor; + return Self; + } + + public RankEvalMetricDescriptor Precision(Action configure) + { + PrecisionValue = null; + PrecisionDescriptorAction = null; + PrecisionDescriptorAction = configure; + return Self; + } + + public RankEvalMetricDescriptor Recall(Elastic.Clients.Elasticsearch.RankEvalMetricRecall? recall) + { + RecallDescriptor = null; + RecallDescriptorAction = null; + RecallValue = recall; + return Self; + } + + public RankEvalMetricDescriptor Recall(RankEvalMetricRecallDescriptor descriptor) + { + RecallValue = null; + RecallDescriptorAction = null; + RecallDescriptor = descriptor; + return Self; + } + + public RankEvalMetricDescriptor Recall(Action configure) + { + RecallValue = null; + RecallDescriptorAction = null; + RecallDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DcgDescriptor is not null) + { + writer.WritePropertyName("dcg"); + JsonSerializer.Serialize(writer, DcgDescriptor, options); + } + else if (DcgDescriptorAction is not null) + { + writer.WritePropertyName("dcg"); + JsonSerializer.Serialize(writer, new RankEvalMetricDiscountedCumulativeGainDescriptor(DcgDescriptorAction), options); + } + else if (DcgValue is not null) + { + writer.WritePropertyName("dcg"); + JsonSerializer.Serialize(writer, DcgValue, options); + } + + if (ExpectedReciprocalRankDescriptor is not null) + { + writer.WritePropertyName("expected_reciprocal_rank"); + JsonSerializer.Serialize(writer, ExpectedReciprocalRankDescriptor, options); + } + else if (ExpectedReciprocalRankDescriptorAction is not null) + { + writer.WritePropertyName("expected_reciprocal_rank"); + JsonSerializer.Serialize(writer, new RankEvalMetricExpectedReciprocalRankDescriptor(ExpectedReciprocalRankDescriptorAction), options); + } + else if (ExpectedReciprocalRankValue is not null) + { + writer.WritePropertyName("expected_reciprocal_rank"); + JsonSerializer.Serialize(writer, ExpectedReciprocalRankValue, options); + } + + if (MeanReciprocalRankDescriptor is not null) + { + writer.WritePropertyName("mean_reciprocal_rank"); + JsonSerializer.Serialize(writer, MeanReciprocalRankDescriptor, options); + } + else if (MeanReciprocalRankDescriptorAction is not null) + { + writer.WritePropertyName("mean_reciprocal_rank"); + JsonSerializer.Serialize(writer, new RankEvalMetricMeanReciprocalRankDescriptor(MeanReciprocalRankDescriptorAction), options); + } + else if (MeanReciprocalRankValue is not null) + { + writer.WritePropertyName("mean_reciprocal_rank"); + JsonSerializer.Serialize(writer, MeanReciprocalRankValue, options); + } + + if (PrecisionDescriptor is not null) + { + writer.WritePropertyName("precision"); + JsonSerializer.Serialize(writer, PrecisionDescriptor, options); + } + else if (PrecisionDescriptorAction is not null) + { + writer.WritePropertyName("precision"); + JsonSerializer.Serialize(writer, new RankEvalMetricPrecisionDescriptor(PrecisionDescriptorAction), options); + } + else if (PrecisionValue is not null) + { + writer.WritePropertyName("precision"); + JsonSerializer.Serialize(writer, PrecisionValue, options); + } + + if (RecallDescriptor is not null) + { + writer.WritePropertyName("recall"); + JsonSerializer.Serialize(writer, RecallDescriptor, options); + } + else if (RecallDescriptorAction is not null) + { + writer.WritePropertyName("recall"); + JsonSerializer.Serialize(writer, new RankEvalMetricRecallDescriptor(RecallDescriptorAction), options); + } + else if (RecallValue is not null) + { + writer.WritePropertyName("recall"); + JsonSerializer.Serialize(writer, RecallValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricBase.g.cs new file mode 100644 index 00000000000..60285c39d54 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricBase.g.cs @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public abstract partial class RankEvalMetricBase + { + [JsonInclude] + [JsonPropertyName("k")] + public int? k { get; set; } + } + + public sealed partial class RankEvalMetricBaseDescriptor : DescriptorBase + { + internal RankEvalMetricBaseDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricBaseDescriptor() : base() + { + } + + private int? kValue { get; set; } + + public RankEvalMetricBaseDescriptor k(int? k) + { + kValue = k; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDetail.g.cs new file mode 100644 index 00000000000..f05210f0ebf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDetail.g.cs @@ -0,0 +1,45 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricDetail + { + [JsonInclude] + [JsonPropertyName("hits")] + public IReadOnlyCollection Hits { get; init; } + + [JsonInclude] + [JsonPropertyName("metric_details")] + public Dictionary> MetricDetails { get; init; } + + [JsonInclude] + [JsonPropertyName("metric_score")] + public double MetricScore { get; init; } + + [JsonInclude] + [JsonPropertyName("unrated_docs")] + public IReadOnlyCollection UnratedDocs { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs new file mode 100644 index 00000000000..d59cb5bdbfb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs @@ -0,0 +1,75 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricDiscountedCumulativeGain : RankEvalMetricBase + { + [JsonInclude] + [JsonPropertyName("normalize")] + public bool? Normalize { get; set; } + } + + public sealed partial class RankEvalMetricDiscountedCumulativeGainDescriptor : DescriptorBase + { + internal RankEvalMetricDiscountedCumulativeGainDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricDiscountedCumulativeGainDescriptor() : base() + { + } + + private int? kValue { get; set; } + + private bool? NormalizeValue { get; set; } + + public RankEvalMetricDiscountedCumulativeGainDescriptor k(int? k) + { + kValue = k; + return Self; + } + + public RankEvalMetricDiscountedCumulativeGainDescriptor Normalize(bool? normalize = true) + { + NormalizeValue = normalize; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (NormalizeValue.HasValue) + { + writer.WritePropertyName("normalize"); + writer.WriteBooleanValue(NormalizeValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs new file mode 100644 index 00000000000..886a65ef552 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs @@ -0,0 +1,71 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricExpectedReciprocalRank : RankEvalMetricBase + { + [JsonInclude] + [JsonPropertyName("maximum_relevance")] + public int MaximumRelevance { get; set; } + } + + public sealed partial class RankEvalMetricExpectedReciprocalRankDescriptor : DescriptorBase + { + internal RankEvalMetricExpectedReciprocalRankDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricExpectedReciprocalRankDescriptor() : base() + { + } + + private int? kValue { get; set; } + + private int MaximumRelevanceValue { get; set; } + + public RankEvalMetricExpectedReciprocalRankDescriptor k(int? k) + { + kValue = k; + return Self; + } + + public RankEvalMetricExpectedReciprocalRankDescriptor MaximumRelevance(int maximumRelevance) + { + MaximumRelevanceValue = maximumRelevance; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + writer.WritePropertyName("maximum_relevance"); + writer.WriteNumberValue(MaximumRelevanceValue); + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs new file mode 100644 index 00000000000..5266aa5c248 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs @@ -0,0 +1,72 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricMeanReciprocalRank : RankEvalMetricRatingTreshold + { + } + + public sealed partial class RankEvalMetricMeanReciprocalRankDescriptor : DescriptorBase + { + internal RankEvalMetricMeanReciprocalRankDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricMeanReciprocalRankDescriptor() : base() + { + } + + private int? kValue { get; set; } + + private int? RelevantRatingThresholdValue { get; set; } + + public RankEvalMetricMeanReciprocalRankDescriptor k(int? k) + { + kValue = k; + return Self; + } + + public RankEvalMetricMeanReciprocalRankDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) + { + RelevantRatingThresholdValue = relevantRatingThreshold; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (RelevantRatingThresholdValue.HasValue) + { + writer.WritePropertyName("relevant_rating_threshold"); + writer.WriteNumberValue(RelevantRatingThresholdValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs new file mode 100644 index 00000000000..b90aff541ea --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs @@ -0,0 +1,89 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricPrecision : RankEvalMetricRatingTreshold + { + [JsonInclude] + [JsonPropertyName("ignore_unlabeled")] + public bool? IgnoreUnlabeled { get; set; } + } + + public sealed partial class RankEvalMetricPrecisionDescriptor : DescriptorBase + { + internal RankEvalMetricPrecisionDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricPrecisionDescriptor() : base() + { + } + + private bool? IgnoreUnlabeledValue { get; set; } + + private int? kValue { get; set; } + + private int? RelevantRatingThresholdValue { get; set; } + + public RankEvalMetricPrecisionDescriptor IgnoreUnlabeled(bool? ignoreUnlabeled = true) + { + IgnoreUnlabeledValue = ignoreUnlabeled; + return Self; + } + + public RankEvalMetricPrecisionDescriptor k(int? k) + { + kValue = k; + return Self; + } + + public RankEvalMetricPrecisionDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) + { + RelevantRatingThresholdValue = relevantRatingThreshold; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IgnoreUnlabeledValue.HasValue) + { + writer.WritePropertyName("ignore_unlabeled"); + writer.WriteBooleanValue(IgnoreUnlabeledValue.Value); + } + + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (RelevantRatingThresholdValue.HasValue) + { + writer.WritePropertyName("relevant_rating_threshold"); + writer.WriteNumberValue(RelevantRatingThresholdValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRatingTreshold.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRatingTreshold.g.cs new file mode 100644 index 00000000000..c74a5e5203c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRatingTreshold.g.cs @@ -0,0 +1,75 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricRatingTreshold : RankEvalMetricBase + { + [JsonInclude] + [JsonPropertyName("relevant_rating_threshold")] + public int? RelevantRatingThreshold { get; set; } + } + + public sealed partial class RankEvalMetricRatingTresholdDescriptor : DescriptorBase + { + internal RankEvalMetricRatingTresholdDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricRatingTresholdDescriptor() : base() + { + } + + private int? kValue { get; set; } + + private int? RelevantRatingThresholdValue { get; set; } + + public RankEvalMetricRatingTresholdDescriptor k(int? k) + { + kValue = k; + return Self; + } + + public RankEvalMetricRatingTresholdDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) + { + RelevantRatingThresholdValue = relevantRatingThreshold; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (RelevantRatingThresholdValue.HasValue) + { + writer.WritePropertyName("relevant_rating_threshold"); + writer.WriteNumberValue(RelevantRatingThresholdValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs new file mode 100644 index 00000000000..029b7112b0f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs @@ -0,0 +1,72 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalMetricRecall : RankEvalMetricRatingTreshold + { + } + + public sealed partial class RankEvalMetricRecallDescriptor : DescriptorBase + { + internal RankEvalMetricRecallDescriptor(Action configure) => configure.Invoke(this); + public RankEvalMetricRecallDescriptor() : base() + { + } + + private int? kValue { get; set; } + + private int? RelevantRatingThresholdValue { get; set; } + + public RankEvalMetricRecallDescriptor k(int? k) + { + kValue = k; + return Self; + } + + public RankEvalMetricRecallDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) + { + RelevantRatingThresholdValue = relevantRatingThreshold; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (RelevantRatingThresholdValue.HasValue) + { + writer.WritePropertyName("relevant_rating_threshold"); + writer.WriteNumberValue(RelevantRatingThresholdValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs new file mode 100644 index 00000000000..c53ec2d8894 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs @@ -0,0 +1,185 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalQuery + { + [JsonInclude] + [JsonPropertyName("query")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer Query { get; set; } + + [JsonInclude] + [JsonPropertyName("size")] + public int? Size { get; set; } + } + + public sealed partial class RankEvalQueryDescriptor : DescriptorBase> + { + internal RankEvalQueryDescriptor(Action> configure) => configure.Invoke(this); + public RankEvalQueryDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } + + private QueryDsl.QueryContainerDescriptor QueryDescriptor { get; set; } + + private Action> QueryDescriptorAction { get; set; } + + private int? SizeValue { get; set; } + + public RankEvalQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer query) + { + QueryDescriptor = null; + QueryDescriptorAction = null; + QueryValue = query; + return Self; + } + + public RankEvalQueryDescriptor Query(QueryDsl.QueryContainerDescriptor descriptor) + { + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptor = descriptor; + return Self; + } + + public RankEvalQueryDescriptor Query(Action> configure) + { + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptorAction = configure; + return Self; + } + + public RankEvalQueryDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (QueryDescriptor is not null) + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, QueryDescriptor, options); + } + else if (QueryDescriptorAction is not null) + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(QueryDescriptorAction), options); + } + else + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, QueryValue, options); + } + + if (SizeValue.HasValue) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(SizeValue.Value); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class RankEvalQueryDescriptor : DescriptorBase + { + internal RankEvalQueryDescriptor(Action configure) => configure.Invoke(this); + public RankEvalQueryDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } + + private QueryDsl.QueryContainerDescriptor QueryDescriptor { get; set; } + + private Action QueryDescriptorAction { get; set; } + + private int? SizeValue { get; set; } + + public RankEvalQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer query) + { + QueryDescriptor = null; + QueryDescriptorAction = null; + QueryValue = query; + return Self; + } + + public RankEvalQueryDescriptor Query(QueryDsl.QueryContainerDescriptor descriptor) + { + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptor = descriptor; + return Self; + } + + public RankEvalQueryDescriptor Query(Action configure) + { + QueryValue = null; + QueryDescriptorAction = null; + QueryDescriptorAction = configure; + return Self; + } + + public RankEvalQueryDescriptor Size(int? size) + { + SizeValue = size; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (QueryDescriptor is not null) + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, QueryDescriptor, options); + } + else if (QueryDescriptorAction is not null) + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(QueryDescriptorAction), options); + } + else + { + writer.WritePropertyName("query"); + JsonSerializer.Serialize(writer, QueryValue, 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/RankEvalRequestItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalRequestItem.g.cs new file mode 100644 index 00000000000..0f22ccf7759 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalRequestItem.g.cs @@ -0,0 +1,265 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class RankEvalRequestItem + { + [JsonInclude] + [JsonPropertyName("id")] + public Elastic.Clients.Elasticsearch.Id Id { get; set; } + + [JsonInclude] + [JsonPropertyName("params")] + public Dictionary? Params { get; set; } + + [JsonInclude] + [JsonPropertyName("ratings")] + public IEnumerable Ratings { get; set; } + + [JsonInclude] + [JsonPropertyName("request")] + public Elastic.Clients.Elasticsearch.RankEvalQuery? Request { get; set; } + + [JsonInclude] + [JsonPropertyName("template_id")] + public Elastic.Clients.Elasticsearch.Id? TemplateId { get; set; } + } + + public sealed partial class RankEvalRequestItemDescriptor : DescriptorBase> + { + internal RankEvalRequestItemDescriptor(Action> configure) => configure.Invoke(this); + public RankEvalRequestItemDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.RankEvalQuery? RequestValue { get; set; } + + private RankEvalQueryDescriptor RequestDescriptor { get; set; } + + private Action> RequestDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + + private Dictionary? ParamsValue { get; set; } + + private IEnumerable RatingsValue { get; set; } + + private Elastic.Clients.Elasticsearch.Id? TemplateIdValue { get; set; } + + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.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; + RequestDescriptorAction = null; + RequestDescriptorAction = configure; + return Self; + } + + public RankEvalRequestItemDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + IdValue = id; + return Self; + } + + public RankEvalRequestItemDescriptor Params(Func, FluentDictionary> selector) + { + ParamsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public RankEvalRequestItemDescriptor Ratings(IEnumerable ratings) + { + RatingsValue = ratings; + return Self; + } + + public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elasticsearch.Id? templateId) + { + TemplateIdValue = templateId; + return Self; + } + + 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) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WritePropertyName("ratings"); + JsonSerializer.Serialize(writer, RatingsValue, options); + if (TemplateIdValue is not null) + { + writer.WritePropertyName("template_id"); + JsonSerializer.Serialize(writer, TemplateIdValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class RankEvalRequestItemDescriptor : DescriptorBase + { + internal RankEvalRequestItemDescriptor(Action configure) => configure.Invoke(this); + public RankEvalRequestItemDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.RankEvalQuery? RequestValue { get; set; } + + private RankEvalQueryDescriptor RequestDescriptor { get; set; } + + private Action RequestDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } + + private Dictionary? ParamsValue { get; set; } + + private IEnumerable RatingsValue { get; set; } + + private Elastic.Clients.Elasticsearch.Id? TemplateIdValue { get; set; } + + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.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; + RequestDescriptorAction = null; + RequestDescriptorAction = configure; + return Self; + } + + public RankEvalRequestItemDescriptor Id(Elastic.Clients.Elasticsearch.Id id) + { + IdValue = id; + return Self; + } + + public RankEvalRequestItemDescriptor Params(Func, FluentDictionary> selector) + { + ParamsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public RankEvalRequestItemDescriptor Ratings(IEnumerable ratings) + { + RatingsValue = ratings; + return Self; + } + + public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elasticsearch.Id? templateId) + { + TemplateIdValue = templateId; + return Self; + } + + 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) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WritePropertyName("ratings"); + JsonSerializer.Serialize(writer, RatingsValue, options); + if (TemplateIdValue is not null) + { + writer.WritePropertyName("template_id"); + JsonSerializer.Serialize(writer, TemplateIdValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs new file mode 100644 index 00000000000..50381791e5b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class ShardStoreIndex + { + [JsonInclude] + [JsonPropertyName("aliases")] + public IReadOnlyCollection? Aliases { get; init; } + + [JsonInclude] + [JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? Filter { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs new file mode 100644 index 00000000000..0794d454cac --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch +{ + public partial class UnratedDocument + { + [JsonInclude] + [JsonPropertyName("_id")] + public string Id { get; init; } + + [JsonInclude] + [JsonPropertyName("_index")] + public string Index { get; init; } + } +} \ No newline at end of file