From efa7cd419ca76657f44232ea40f181d07bce01c5 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Mon, 4 Aug 2025 08:42:26 +0000 Subject: [PATCH] Regenerate client --- .../Api/Cluster/ClusterStatsResponse.g.cs | 46 +++- .../Cluster/GetComponentTemplateRequest.g.cs | 36 +++ .../Cluster/PutComponentTemplateRequest.g.cs | 36 +++ .../_Generated/Api/CreateRequest.g.cs | 90 -------- .../_Generated/Api/Eql/EqlSearchRequest.g.cs | 89 ++++++++ .../Api/Esql/AsyncQueryRequest.g.cs | 36 ++- .../_Generated/Api/Esql/EsqlQueryRequest.g.cs | 12 + .../_Generated/Api/GetSourceRequest.g.cs | 58 ----- .../IndexManagement/DeleteAliasResponse.g.cs | 12 +- .../Api/IndexManagement/RecoveryRequest.g.cs | 146 ++++++++++++ .../_Generated/Api/IndexRequest.g.cs | 25 ++ .../Api/Inference/PutAlibabacloudRequest.g.cs | 24 ++ .../Inference/PutAmazonbedrockRequest.g.cs | 24 ++ .../Api/Inference/PutAnthropicRequest.g.cs | 24 ++ .../Inference/PutAzureaistudioRequest.g.cs | 24 ++ .../Api/Inference/PutAzureopenaiRequest.g.cs | 24 ++ .../Api/Inference/PutCohereRequest.g.cs | 24 ++ .../Inference/PutElasticsearchRequest.g.cs | 24 ++ .../Api/Inference/PutElserRequest.g.cs | 24 ++ .../Inference/PutGoogleaistudioRequest.g.cs | 24 ++ .../Inference/PutGooglevertexaiRequest.g.cs | 24 ++ .../Api/Inference/PutHuggingFaceRequest.g.cs | 24 ++ .../Api/Inference/PutInferenceRequest.g.cs | 24 ++ .../Api/Inference/PutJinaaiRequest.g.cs | 24 ++ .../Api/Inference/PutMistralRequest.g.cs | 24 ++ .../Api/Inference/PutOpenaiRequest.g.cs | 24 ++ .../Api/Inference/PutVoyageaiRequest.g.cs | 24 ++ .../Api/Inference/PutWatsonxRequest.g.cs | 24 ++ .../Api/Inference/RerankRequest.g.cs | 4 +- .../Inference/StreamCompletionRequest.g.cs | 24 ++ .../_Generated/Api/InfoRequest.g.cs | 2 + .../Ingest/GetIpLocationDatabaseRequest.g.cs | 30 --- .../PostStartTrialRequest.g.cs | 25 +- .../Api/Rollup/RollupSearchRequest.g.cs | 114 +--------- .../Security/GetUserPrivilegesRequest.g.cs | 57 ----- .../Api/Security/GrantApiKeyRequest.g.cs | 47 ++++ .../Api/Snapshot/DeleteSnapshotRequest.g.cs | 28 +++ .../_Generated/Api/Sql/QueryRequest.g.cs | 56 +---- .../Api/Synonyms/PutSynonymRequest.g.cs | 6 + .../_Generated/Api/UpdateByQueryRequest.g.cs | 156 ++++++++----- .../_Generated/Api/UpdateRequest.g.cs | 2 + .../Types/Aggregations/FiltersBucket.g.cs | 12 +- .../Types/Analysis/EdgeNGramTokenizer.g.cs | 16 +- .../Types/Cluster/CharFilterTypes.g.cs | 23 +- .../Types/Cluster/ClusterFileSystem.g.cs | 206 ++++++++++++++--- .../Types/Cluster/ClusterIndices.g.cs | 81 +++++-- .../_Generated/Types/Cluster/ClusterJvm.g.cs | 16 ++ .../Types/Cluster/ClusterJvmMemory.g.cs | 32 +++ .../Types/Cluster/ClusterNodeCount.g.cs | 178 ++++++--------- .../Types/Cluster/ClusterSnapshotStats.g.cs | 110 +++++++++ .../Cluster/DenseVectorOffHeapStats.g.cs | 215 ++++++++++++++++++ .../Types/Cluster/DenseVectorStats.g.cs | 105 +++++++++ .../_Generated/Types/Cluster/FieldTypes.g.cs | 74 ++++-- .../Types/Cluster/FieldTypesMappings.g.cs | 52 +++-- .../Types/Cluster/IndexingPressure.g.cs | 6 +- .../Types/Cluster/IndexingPressureMemory.g.cs | 125 ---------- .../IndexingPressureMemorySummary.g.cs | 185 --------------- .../Types/Cluster/IndicesVersions.g.cs | 10 + .../Cluster/OperatingSystemMemoryInfo.g.cs | 64 ++++++ .../Types/Cluster/PerRepositoryStats.g.cs | 135 +++++++++++ .../Types/Cluster/RemoteClusterInfo.g.cs | 2 +- .../Cluster/RepositoryStatsCurrentCounts.g.cs | 185 +++++++++++++++ .../Types/Cluster/RepositoryStatsShards.g.cs | 140 ++++++++++++ .../Types/Cluster/SearchUsageStats.g.cs | 155 +++++++++++++ .../Types/Cluster/SnapshotCurrentCounts.g.cs | 184 +++++++++++++++ .../Types/Cluster/SparseVectorStats.g.cs | 95 ++++++++ .../Types/Cluster/SynonymsStats.g.cs | 110 +++++++++ .../_Generated/Types/DocStats.g.cs | 42 +++- .../Types/ElasticsearchVersionInfo.g.cs | 4 + .../_Generated/Types/Enums/Enums.Cluster.g.cs | 162 +++++++++++++ .../Types/Enums/Enums.Core.HealthReport.g.cs | 16 ++ .../Types/Enums/Enums.NoNamespace.g.cs | 184 ++++++++------- .../_Generated/Types/FielddataStats.g.cs | 17 +- .../Types/GlobalOrdinalFieldStats.g.cs | 120 ++++++++++ .../_Generated/Types/GlobalOrdinalsStats.g.cs | 115 ++++++++++ .../Types/Nodes/JvmMemoryStats.g.cs | 16 ++ .../Types/Nodes/PressureMemory.g.cs | 20 ++ .../_Generated/Types/SegmentsStats.g.cs | 56 +++-- 78 files changed, 3731 insertions(+), 1082 deletions(-) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterSnapshotStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/PerRepositoryStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsCurrentCounts.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsShards.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SearchUsageStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SnapshotCurrentCounts.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SparseVectorStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SynonymsStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalFieldStats.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalsStats.g.cs diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs index 378d51cbc16..55f07dcf43f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs @@ -31,6 +31,8 @@ internal sealed partial class ClusterStatsResponseConverter : System.Text.Json.S private static readonly System.Text.Json.JsonEncodedText PropIndices = System.Text.Json.JsonEncodedText.Encode("indices"); private static readonly System.Text.Json.JsonEncodedText PropNodes = System.Text.Json.JsonEncodedText.Encode("nodes"); private static readonly System.Text.Json.JsonEncodedText PropNodeStats = System.Text.Json.JsonEncodedText.Encode("_nodes"); + private static readonly System.Text.Json.JsonEncodedText PropRepositories = System.Text.Json.JsonEncodedText.Encode("repositories"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshots = System.Text.Json.JsonEncodedText.Encode("snapshots"); private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status"); private static readonly System.Text.Json.JsonEncodedText PropTimestamp = System.Text.Json.JsonEncodedText.Encode("timestamp"); @@ -43,7 +45,9 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read( LocalJsonValue propIndices = default; LocalJsonValue propNodes = default; LocalJsonValue propNodeStats = default; - LocalJsonValue propStatus = default; + LocalJsonValue>> propRepositories = default; + LocalJsonValue propSnapshots = default; + LocalJsonValue propStatus = default; LocalJsonValue propTimestamp = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -77,7 +81,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read( continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propRepositories.TryReadProperty(ref reader, options, PropRepositories, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!)) + { + continue; + } + + if (propSnapshots.TryReadProperty(ref reader, options, PropSnapshots, null)) + { + continue; + } + + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.HealthStatus? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,6 +119,8 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read( Indices = propIndices.Value, Nodes = propNodes.Value, NodeStats = propNodeStats.Value, + Repositories = propRepositories.Value, + Snapshots = propSnapshots.Value, Status = propStatus.Value, Timestamp = propTimestamp.Value }; @@ -119,7 +135,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropNodes, value.Nodes, null, null); writer.WriteProperty(options, PropNodeStats, value.NodeStats, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropRepositories, value.Repositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteProperty(options, PropSnapshots, value.Snapshots, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.HealthStatus? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); writer.WriteEndObject(); } @@ -203,14 +221,32 @@ internal ClusterStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// Health status of the cluster, based on the state of its primary and replica shards. + /// Contains stats on repository feature usage exposed in cluster stats for telemetry. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary> Repositories { get; set; } + + /// + /// + /// Contains stats cluster snapshots. /// /// public #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.HealthStatus Status { get; set; } + Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStats Snapshots { get; set; } + + /// + /// + /// Health status of the cluster, based on the state of its primary and replica shards. + /// + /// + public Elastic.Clients.Elasticsearch.HealthStatus? Status { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs index 22a411944fb..6e51149c9d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs @@ -54,6 +54,13 @@ public sealed partial class GetComponentTemplateRequestParameters : Elastic.Tran /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys + /// + /// + public System.Collections.Generic.ICollection? SettingsFilter { get => Q?>("settings_filter"); set => Q("settings_filter", value); } } internal sealed partial class GetComponentTemplateRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -158,6 +165,13 @@ internal GetComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serialization /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys + /// + /// + public System.Collections.Generic.ICollection? SettingsFilter { get => Q?>("settings_filter"); set => Q("settings_filter", value); } } /// @@ -247,6 +261,28 @@ public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescript return this; } + /// + /// + /// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys + /// + /// + public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescriptor SettingsFilter(System.Collections.Generic.ICollection? value) + { + Instance.SettingsFilter = value; + return this; + } + + /// + /// + /// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys + /// + /// + public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescriptor SettingsFilter(params string[] values) + { + Instance.SettingsFilter = [.. values]; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequest Build(System.Action? action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs index 829b40743a7..1418fd1f0da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs @@ -25,6 +25,13 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class PutComponentTemplateRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// User defined reason for create the component template. + /// + /// + public string? Cause { get => Q("cause"); set => Q("cause", value); } + /// /// /// If true, this request cannot replace or update existing component templates. @@ -185,6 +192,13 @@ internal PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serialization #endif Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); } + /// + /// + /// User defined reason for create the component template. + /// + /// + public string? Cause { get => Q("cause"); set => Q("cause", value); } + /// /// /// If true, this request cannot replace or update existing component templates. @@ -310,6 +324,17 @@ public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescript return this; } + /// + /// + /// User defined reason for create the component template. + /// + /// + public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescriptor Cause(string? value) + { + Instance.Cause = value; + return this; + } + /// /// /// If true, this request cannot replace or update existing component templates. @@ -573,6 +598,17 @@ public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescript return this; } + /// + /// + /// User defined reason for create the component template. + /// + /// + public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescriptor Cause(string? value) + { + Instance.Cause = value; + return this; + } + /// /// /// If true, this request cannot replace or update existing component templates. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs index ab25ebebb64..f3c3251f906 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs @@ -25,20 +25,6 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class CreateRequestParameters : Elastic.Transport.RequestParameters { - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - /// /// /// True or false if to include the document source in the error message in case of parsing errors. @@ -46,18 +32,6 @@ public sealed partial class CreateRequestParameters : Elastic.Transport.RequestP /// public bool? IncludeSourceOnError { get => Q("include_source_on_error"); set => Q("include_source_on_error", value); } - /// - /// - /// Set to create to only index the document if it does not already exist (put if absent). - /// If a document with the specified _id already exists, the indexing operation will fail. - /// The behavior is the same as using the <index>/_create endpoint. - /// If a document ID is specified, this paramater defaults to index. - /// Otherwise, it defaults to create. - /// If the request targets a data stream, an op_type of create is required. - /// - /// - public Elastic.Clients.Elasticsearch.OpType? OpType { get => Q("op_type"); set => Q("op_type", value); } - /// /// /// The ID of the pipeline to use to preprocess incoming documents. @@ -337,20 +311,6 @@ internal CreateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct #endif Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); } - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - /// /// /// True or false if to include the document source in the error message in case of parsing errors. @@ -358,18 +318,6 @@ internal CreateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// public bool? IncludeSourceOnError { get => Q("include_source_on_error"); set => Q("include_source_on_error", value); } - /// - /// - /// Set to create to only index the document if it does not already exist (put if absent). - /// If a document with the specified _id already exists, the indexing operation will fail. - /// The behavior is the same as using the <index>/_create endpoint. - /// If a document ID is specified, this paramater defaults to index. - /// Otherwise, it defaults to create. - /// If the request targets a data stream, an op_type of create is required. - /// - /// - public Elastic.Clients.Elasticsearch.OpType? OpType { get => Q("op_type"); set => Q("op_type", value); } - /// /// /// The ID of the pipeline to use to preprocess incoming documents. @@ -619,28 +567,6 @@ public Elastic.Clients.Elasticsearch.CreateRequestDescriptor Index(El return this; } - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public Elastic.Clients.Elasticsearch.CreateRequestDescriptor IfPrimaryTerm(long? value) - { - Instance.IfPrimaryTerm = value; - return this; - } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public Elastic.Clients.Elasticsearch.CreateRequestDescriptor IfSeqNo(long? value) - { - Instance.IfSeqNo = value; - return this; - } - /// /// /// True or false if to include the document source in the error message in case of parsing errors. @@ -652,22 +578,6 @@ public Elastic.Clients.Elasticsearch.CreateRequestDescriptor IncludeS return this; } - /// - /// - /// Set to create to only index the document if it does not already exist (put if absent). - /// If a document with the specified _id already exists, the indexing operation will fail. - /// The behavior is the same as using the <index>/_create endpoint. - /// If a document ID is specified, this paramater defaults to index. - /// Otherwise, it defaults to create. - /// If the request targets a data stream, an op_type of create is required. - /// - /// - public Elastic.Clients.Elasticsearch.CreateRequestDescriptor OpType(Elastic.Clients.Elasticsearch.OpType? value) - { - Instance.OpType = value; - return this; - } - /// /// /// The ID of the pipeline to use to preprocess incoming documents. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs index 326334e9db0..83a91bbe9da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -25,7 +25,25 @@ namespace Elastic.Clients.Elasticsearch.Eql; public sealed partial class EqlSearchRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) + /// + /// public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + /// + /// + /// Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + /// + /// + public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } + + /// + /// + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + /// + /// public System.Collections.Generic.ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } /// @@ -269,7 +287,26 @@ internal EqlSearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr required #endif Elastic.Clients.Elasticsearch.Indices Indices { get => P("index"); set => PR("index", value); } + + /// + /// + /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) + /// + /// public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + /// + /// + /// Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + /// + /// + public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } + + /// + /// + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + /// + /// public System.Collections.Generic.ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } /// @@ -417,18 +454,44 @@ public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor Indices(Elas return this; } + /// + /// + /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) + /// + /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor AllowNoIndices(bool? value = true) { Instance.AllowNoIndices = value; return this; } + /// + /// + /// Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + /// + /// + public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor CcsMinimizeRoundtrips(bool? value = true) + { + Instance.CcsMinimizeRoundtrips = value; + return this; + } + + /// + /// + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + /// + /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor ExpandWildcards(System.Collections.Generic.ICollection? value) { Instance.ExpandWildcards = value; return this; } + /// + /// + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + /// + /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor ExpandWildcards(params Elastic.Clients.Elasticsearch.ExpandWildcard[] values) { Instance.ExpandWildcards = [.. values]; @@ -888,18 +951,44 @@ public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor I return this; } + /// + /// + /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) + /// + /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor AllowNoIndices(bool? value = true) { Instance.AllowNoIndices = value; return this; } + /// + /// + /// Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + /// + /// + public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor CcsMinimizeRoundtrips(bool? value = true) + { + Instance.CcsMinimizeRoundtrips = value; + return this; + } + + /// + /// + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + /// + /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor ExpandWildcards(System.Collections.Generic.ICollection? value) { Instance.ExpandWildcards = value; return this; } + /// + /// + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + /// + /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor ExpandWildcards(params Elastic.Clients.Elasticsearch.ExpandWildcard[] values) { Instance.ExpandWildcards = [.. values]; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs index 916fb7e1438..9eb798c4194 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs @@ -43,7 +43,14 @@ public sealed partial class AsyncQueryRequestParameters : Elastic.Transport.Requ /// /// - /// A short version of the Accept header, for example json or yaml. + /// A short version of the Accept header, e.g. json, yaml. + /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// + /// + /// For async requests, nothing will be returned if the async query doesn't finish within the timeout. + /// The query ID and running status are available in the X-Elasticsearch-Async-Id and X-Elasticsearch-Async-Is-Running HTTP headers of the response, respectively. /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } @@ -229,7 +236,14 @@ internal AsyncQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// A short version of the Accept header, for example json or yaml. + /// A short version of the Accept header, e.g. json, yaml. + /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// + /// + /// For async requests, nothing will be returned if the async query doesn't finish within the timeout. + /// The query ID and running status are available in the X-Elasticsearch-Async-Id and X-Elasticsearch-Async-Is-Running HTTP headers of the response, respectively. /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } @@ -368,7 +382,14 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor DropNullCo /// /// - /// A short version of the Accept header, for example json or yaml. + /// A short version of the Accept header, e.g. json, yaml. + /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// + /// + /// For async requests, nothing will be returned if the async query doesn't finish within the timeout. + /// The query ID and running status are available in the X-Elasticsearch-Async-Id and X-Elasticsearch-Async-Is-Running HTTP headers of the response, respectively. /// /// public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? value) @@ -631,7 +652,14 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor /// /// - /// A short version of the Accept header, for example json or yaml. + /// A short version of the Accept header, e.g. json, yaml. + /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// + /// + /// For async requests, nothing will be returned if the async query doesn't finish within the timeout. + /// The query ID and running status are available in the X-Elasticsearch-Async-Id and X-Elasticsearch-Async-Is-Running HTTP headers of the response, respectively. /// /// public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs index 3d51c67f8c2..dee43fbeb45 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -44,6 +44,9 @@ public sealed partial class EsqlQueryRequestParameters : Elastic.Transport.Reque /// /// A short version of the Accept header, e.g. json, yaml. /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } } @@ -199,6 +202,9 @@ internal EsqlQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// A short version of the Accept header, e.g. json, yaml. /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } @@ -306,6 +312,9 @@ public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor DropNullCol /// /// A short version of the Accept header, e.g. json, yaml. /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? value) { @@ -525,6 +534,9 @@ public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor /// /// A short version of the Accept header, e.g. json, yaml. /// + /// + /// csv, tsv, and txt formats will return results in a tabular format, excluding other metadata fields from the response. + /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? value) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs index f4c77282c86..1a11bf0d20c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs @@ -76,13 +76,6 @@ public sealed partial class GetSourceRequestParameters : Elastic.Transport.Reque /// public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - /// - /// - /// A comma-separated list of stored fields to return as part of a hit. - /// - /// - public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - /// /// /// The version number for concurrency control. @@ -245,13 +238,6 @@ internal GetSourceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - /// - /// - /// A comma-separated list of stored fields to return as part of a hit. - /// - /// - public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - /// /// /// The version number for concurrency control. @@ -455,28 +441,6 @@ public Elastic.Clients.Elasticsearch.GetSourceRequestDescriptor SourceIncludes - /// - /// A comma-separated list of stored fields to return as part of a hit. - /// - /// - public Elastic.Clients.Elasticsearch.GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? value) - { - Instance.StoredFields = value; - return this; - } - - /// - /// - /// A comma-separated list of stored fields to return as part of a hit. - /// - /// - public Elastic.Clients.Elasticsearch.GetSourceRequestDescriptor StoredFields(params System.Linq.Expressions.Expression>[] value) - { - Instance.StoredFields = value; - return this; - } - /// /// /// The version number for concurrency control. @@ -747,28 +711,6 @@ public Elastic.Clients.Elasticsearch.GetSourceRequestDescriptor Sourc return this; } - /// - /// - /// A comma-separated list of stored fields to return as part of a hit. - /// - /// - public Elastic.Clients.Elasticsearch.GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? value) - { - Instance.StoredFields = value; - return this; - } - - /// - /// - /// A comma-separated list of stored fields to return as part of a hit. - /// - /// - public Elastic.Clients.Elasticsearch.GetSourceRequestDescriptor StoredFields(params System.Linq.Expressions.Expression>[] value) - { - Instance.StoredFields = value; - return this; - } - /// /// /// The version number for concurrency control. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs index 1f03b6ee571..200378a0cc6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs @@ -26,11 +26,13 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; internal sealed partial class DeleteAliasResponseConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged"); + private static readonly System.Text.Json.JsonEncodedText PropErrors = System.Text.Json.JsonEncodedText.Encode("errors"); public override Elastic.Clients.Elasticsearch.IndexManagement.DeleteAliasResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propAcknowledged = default; + LocalJsonValue propErrors = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null)) @@ -38,6 +40,11 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DeleteAliasRespons continue; } + if (propErrors.TryReadProperty(ref reader, options, PropErrors, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -50,7 +57,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DeleteAliasRespons reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.IndexManagement.DeleteAliasResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { - Acknowledged = propAcknowledged.Value + Acknowledged = propAcknowledged.Value, + Errors = propErrors.Value }; } @@ -58,6 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); + writer.WriteProperty(options, PropErrors, value.Errors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -86,4 +95,5 @@ internal DeleteAliasResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon required #endif bool Acknowledged { get; set; } + public bool? Errors { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs index e2fc37d2c1e..54ce1c42253 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs @@ -32,12 +32,36 @@ public sealed partial class RecoveryRequestParameters : Elastic.Transport.Reques /// public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); } + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// + /// + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + /// /// /// If true, the response includes detailed information about shard recoveries. /// /// public bool? Detailed { get => Q("detailed"); set => Q("detailed", value); } + + /// + /// + /// Type of index that wildcard patterns can match. + /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + /// Supports comma-separated values, such as open,hidden. + /// + /// + public System.Collections.Generic.ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } } internal sealed partial class RecoveryRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -172,12 +196,36 @@ internal RecoveryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); } + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// + /// + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + /// /// /// If true, the response includes detailed information about shard recoveries. /// /// public bool? Detailed { get => Q("detailed"); set => Q("detailed", value); } + + /// + /// + /// Type of index that wildcard patterns can match. + /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + /// Supports comma-separated values, such as open,hidden. + /// + /// + public System.Collections.Generic.ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } } /// @@ -284,6 +332,18 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor A return this; } + /// + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor AllowNoIndices(bool? value = true) + { + Instance.AllowNoIndices = value; + return this; + } + /// /// /// If true, the response includes detailed information about shard recoveries. @@ -295,6 +355,43 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor D return this; } + /// + /// + /// Type of index that wildcard patterns can match. + /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + /// Supports comma-separated values, such as open,hidden. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor ExpandWildcards(System.Collections.Generic.ICollection? value) + { + Instance.ExpandWildcards = value; + return this; + } + + /// + /// + /// Type of index that wildcard patterns can match. + /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + /// Supports comma-separated values, such as open,hidden. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor ExpandWildcards(params Elastic.Clients.Elasticsearch.ExpandWildcard[] values) + { + Instance.ExpandWildcards = [.. values]; + return this; + } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor IgnoreUnavailable(bool? value = true) + { + Instance.IgnoreUnavailable = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequest Build(System.Action? action) { @@ -455,6 +552,18 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor + /// + /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. + /// This behavior applies even if the request targets other open indices. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor AllowNoIndices(bool? value = true) + { + Instance.AllowNoIndices = value; + return this; + } + /// /// /// If true, the response includes detailed information about shard recoveries. @@ -466,6 +575,43 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor + /// + /// Type of index that wildcard patterns can match. + /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + /// Supports comma-separated values, such as open,hidden. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor ExpandWildcards(System.Collections.Generic.ICollection? value) + { + Instance.ExpandWildcards = value; + return this; + } + + /// + /// + /// Type of index that wildcard patterns can match. + /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + /// Supports comma-separated values, such as open,hidden. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor ExpandWildcards(params Elastic.Clients.Elasticsearch.ExpandWildcard[] values) + { + Instance.ExpandWildcards = [.. values]; + return this; + } + + /// + /// + /// If false, the request returns an error if it targets a missing or closed index. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequestDescriptor IgnoreUnavailable(bool? value = true) + { + Instance.IgnoreUnavailable = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.IndexManagement.RecoveryRequest Build(System.Action>? action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs index 04104f1d2c9..c7b8b6a916b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs @@ -83,6 +83,13 @@ public sealed partial class IndexRequestParameters : Elastic.Transport.RequestPa /// public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// + /// + /// If true, the request's actions must target a data stream (existing or to be created). + /// + /// + public bool? RequireDataStream { get => Q("require_data_stream"); set => Q("require_data_stream", value); } + /// /// /// A custom value that is used to route operations to a specific shard. @@ -445,6 +452,13 @@ internal IndexRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } + /// + /// + /// If true, the request's actions must target a data stream (existing or to be created). + /// + /// + public bool? RequireDataStream { get => Q("require_data_stream"); set => Q("require_data_stream", value); } + /// /// /// A custom value that is used to route operations to a specific shard. @@ -809,6 +823,17 @@ public Elastic.Clients.Elasticsearch.IndexRequestDescriptor RequireAl return this; } + /// + /// + /// If true, the request's actions must target a data stream (existing or to be created). + /// + /// + public Elastic.Clients.Elasticsearch.IndexRequestDescriptor RequireDataStream(bool? value = true) + { + Instance.RequireDataStream = value; + return this; + } + /// /// /// A custom value that is used to route operations to a specific shard. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudRequest.g.cs index cbe78f692d2..2f71e95f2a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutAlibabacloudRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutAlibabacloudRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -155,6 +161,13 @@ internal PutAlibabacloudRequest(Elastic.Clients.Elasticsearch.Serialization.Json #endif Elastic.Clients.Elasticsearch.Inference.AlibabaCloudTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -245,6 +258,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudRequestDescriptor return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs index 7ebf3c21e32..46af5f184a1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutAmazonbedrockRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutAmazonbedrockRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -159,6 +165,13 @@ internal PutAmazonbedrockRequest(Elastic.Clients.Elasticsearch.Serialization.Jso #endif Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -253,6 +266,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockRequestDescriptor return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicRequest.g.cs index 54348156d4b..18b1dd4a3ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutAnthropicRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutAnthropicRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -156,6 +162,13 @@ internal PutAnthropicRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon #endif Elastic.Clients.Elasticsearch.Inference.AnthropicTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -247,6 +260,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor Tas return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioRequest.g.cs index 7df1c7f251a..1645c77d3e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutAzureaistudioRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutAzureaistudioRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -155,6 +161,13 @@ internal PutAzureaistudioRequest(Elastic.Clients.Elasticsearch.Serialization.Jso #endif Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -245,6 +258,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiRequest.g.cs index 9e160409a22..e1f45863efe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutAzureopenaiRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutAzureopenaiRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -174,6 +180,13 @@ internal PutAzureopenaiRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC #endif Elastic.Clients.Elasticsearch.Inference.AzureOpenAITaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -283,6 +296,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiRequestDescriptor T return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereRequest.g.cs index a97b9231876..dc37bcd1b40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutCohereRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutCohereRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -155,6 +161,13 @@ internal PutCohereRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #endif Elastic.Clients.Elasticsearch.Inference.CohereTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -246,6 +259,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutCohereRequestDescriptor TaskTy return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutCohereRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs index a944cf545cb..84576c8a72b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutElasticsearchRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutElasticsearchRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -173,6 +179,13 @@ internal PutElasticsearchRequest(Elastic.Clients.Elasticsearch.Serialization.Jso #endif Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -281,6 +294,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserRequest.g.cs index e75f9b47c7e..64059375b2c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutElserRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutElserRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -164,6 +170,13 @@ internal PutElserRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstru #endif Elastic.Clients.Elasticsearch.Inference.ElserTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -264,6 +277,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutElserRequestDescriptor TaskTyp return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutElserRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioRequest.g.cs index e9012d60a8a..d469c68f7bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutGoogleaistudioRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutGoogleaistudioRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -146,6 +152,13 @@ internal PutGoogleaistudioRequest(Elastic.Clients.Elasticsearch.Serialization.Js #endif Elastic.Clients.Elasticsearch.Inference.GoogleAiStudioTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -228,6 +241,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRequestDescripto return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiRequest.g.cs index 17d50c8b8f8..941817045b6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutGooglevertexaiRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutGooglevertexaiRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -155,6 +161,13 @@ internal PutGooglevertexaiRequest(Elastic.Clients.Elasticsearch.Serialization.Js #endif Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -245,6 +258,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRequestDescripto return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs index 5fd154eb21b..6cc08302e82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutHuggingFaceRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutHuggingFaceRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -191,6 +197,13 @@ internal PutHuggingFaceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC #endif Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -318,6 +331,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor T return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs index d1ddf6c04eb..7fec11a7514 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutInferenceRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutInferenceRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -197,6 +203,13 @@ internal PutInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// public Elastic.Clients.Elasticsearch.Inference.TaskType? TaskType { get => P("task_type"); set => PO("task_type", value); } + + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } public #if NET7_0_OR_GREATER required @@ -354,6 +367,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor Tas return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint value) { Instance.InferenceConfig = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiRequest.g.cs index a4aac4e6ded..095fa92e370 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutJinaaiRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutJinaaiRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -159,6 +165,13 @@ internal PutJinaaiRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #endif Elastic.Clients.Elasticsearch.Inference.JinaAITaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -253,6 +266,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutJinaaiRequestDescriptor TaskTy return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutJinaaiRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs index 34adeb02365..86e329eb05c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutMistralRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutMistralRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -147,6 +153,13 @@ internal PutMistralRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst #endif Elastic.Clients.Elasticsearch.Inference.MistralTaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -230,6 +243,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor TaskT return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiRequest.g.cs index 9bccde1400b..ddc0057529c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutOpenaiRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutOpenaiRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -156,6 +162,13 @@ internal PutOpenaiRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #endif Elastic.Clients.Elasticsearch.Inference.OpenAITaskType TaskType { get => P("task_type"); set => PR("task_type", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -247,6 +260,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutOpenaiRequestDescriptor TaskTy return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutOpenaiRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiRequest.g.cs index 7d4826808e8..56f762e2bd9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutVoyageaiRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutVoyageaiRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -158,6 +164,13 @@ internal PutVoyageaiRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons #endif Elastic.Clients.Elasticsearch.Id VoyageaiInferenceId { get => P("voyageai_inference_id"); set => PR("voyageai_inference_id", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The chunking configuration object. @@ -251,6 +264,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutVoyageaiRequestDescriptor Voya return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutVoyageaiRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The chunking configuration object. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxRequest.g.cs index 38fd9db931e..347dbddcd30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class PutWatsonxRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class PutWatsonxRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -140,6 +146,13 @@ internal PutWatsonxRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst #endif Elastic.Clients.Elasticsearch.Id WatsonxInferenceId { get => P("watsonx_inference_id"); set => PR("watsonx_inference_id", value); } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The type of service supported for the specified task type. In this case, watsonxai. @@ -218,6 +231,17 @@ public Elastic.Clients.Elasticsearch.Inference.PutWatsonxRequestDescriptor Watso return this; } + /// + /// + /// Specifies the amount of time to wait for the inference endpoint to be created. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutWatsonxRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// Settings used to install the inference model. These settings are specific to the watsonxai service. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/RerankRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/RerankRequest.g.cs index 74e9d32061a..87d55a6ed99 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/RerankRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/RerankRequest.g.cs @@ -92,7 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// -/// Perform rereanking inference on the service +/// Perform reranking inference on the service /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.RerankRequestConverter))] @@ -185,7 +185,7 @@ internal RerankRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// /// -/// Perform rereanking inference on the service +/// Perform reranking inference on the service /// /// public readonly partial struct RerankRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamCompletionRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamCompletionRequest.g.cs index 0ff5ddc2950..d6356779657 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamCompletionRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamCompletionRequest.g.cs @@ -25,6 +25,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class StreamCompletionRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// The amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } internal sealed partial class StreamCompletionRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -132,6 +138,13 @@ internal StreamCompletionRequest(Elastic.Clients.Elasticsearch.Serialization.Jso #endif Elastic.Clients.Elasticsearch.Id InferenceId { get => P("inference_id"); set => PR("inference_id", value); } + /// + /// + /// The amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// /// The text on which you want to perform the inference task. @@ -205,6 +218,17 @@ public Elastic.Clients.Elasticsearch.Inference.StreamCompletionRequestDescriptor return this; } + /// + /// + /// The amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.StreamCompletionRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + /// /// /// The text on which you want to perform the inference task. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs index 1a8095232ff..673c763a733 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs @@ -60,6 +60,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Get cluster info. /// Get basic build, version, and cluster information. +/// ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.InfoRequestConverter))] @@ -94,6 +95,7 @@ internal InfoRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructor /// /// Get cluster info. /// Get basic build, version, and cluster information. +/// ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored. /// /// public readonly partial struct InfoRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs index f31179e8e13..38fb62ebac5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs @@ -25,14 +25,6 @@ namespace Elastic.Clients.Elasticsearch.Ingest; public sealed partial class GetIpLocationDatabaseRequestParameters : Elastic.Transport.RequestParameters { - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } internal sealed partial class GetIpLocationDatabaseRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -107,15 +99,6 @@ internal GetIpLocationDatabaseRequest(Elastic.Clients.Elasticsearch.Serializatio /// /// public Elastic.Clients.Elasticsearch.Ids? Id { get => P("id"); set => PO("id", value); } - - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// @@ -159,19 +142,6 @@ public Elastic.Clients.Elasticsearch.Ingest.GetIpLocationDatabaseRequestDescript return this; } - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GetIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.MasterTimeout = value; - return this; - } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Ingest.GetIpLocationDatabaseRequest Build(System.Action? action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialRequest.g.cs index 10f98c1f647..ce773abcd14 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialRequest.g.cs @@ -38,7 +38,13 @@ public sealed partial class PostStartTrialRequestParameters : Elastic.Transport. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - public string? TypeQueryString { get => Q("type_query_string"); set => Q("type_query_string", value); } + + /// + /// + /// The type of trial license to generate (default: "trial") + /// + /// + public string? Type { get => Q("type"); set => Q("type", value); } } internal sealed partial class PostStartTrialRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -123,7 +129,13 @@ internal PostStartTrialRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - public string? TypeQueryString { get => Q("type_query_string"); set => Q("type_query_string", value); } + + /// + /// + /// The type of trial license to generate (default: "trial") + /// + /// + public string? Type { get => Q("type"); set => Q("type", value); } } /// @@ -179,9 +191,14 @@ public Elastic.Clients.Elasticsearch.LicenseManagement.PostStartTrialRequestDesc return this; } - public Elastic.Clients.Elasticsearch.LicenseManagement.PostStartTrialRequestDescriptor TypeQueryString(string? value) + /// + /// + /// The type of trial license to generate (default: "trial") + /// + /// + public Elastic.Clients.Elasticsearch.LicenseManagement.PostStartTrialRequestDescriptor Type(string? value) { - Instance.TypeQueryString = value; + Instance.Type = value; return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs index fe694ee4e28..305b38b57f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs @@ -113,43 +113,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// highlighter, suggestors, post_filter, profile, explain: These are similarly disallowed. /// /// -/// Searching both historical rollup and non-rollup data -/// -/// -/// The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data. -/// This is done by simply adding the live indices to the URI. For example: -/// -/// -/// GET sensor-1,sensor_rollup/_rollup_search -/// { -/// "size": 0, -/// "aggregations": { -/// "max_temperature": { -/// "max": { -/// "field": "temperature" -/// } -/// } -/// } -/// } -/// -/// -/// The rollup search endpoint does two things when the search runs: -/// -/// -/// -/// -/// The original request is sent to the non-rollup index unaltered. -/// -/// -/// -/// -/// A rewritten version of the original request is sent to the rollup index. -/// -/// -/// -/// -/// When the two responses are received, the endpoint rewrites the rollup response and merges the two together. -/// During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used. +/// For more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Rollup.RollupSearchRequestConverter))] @@ -263,43 +227,7 @@ internal RollupSearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// highlighter, suggestors, post_filter, profile, explain: These are similarly disallowed. /// /// -/// Searching both historical rollup and non-rollup data -/// -/// -/// The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data. -/// This is done by simply adding the live indices to the URI. For example: -/// -/// -/// GET sensor-1,sensor_rollup/_rollup_search -/// { -/// "size": 0, -/// "aggregations": { -/// "max_temperature": { -/// "max": { -/// "field": "temperature" -/// } -/// } -/// } -/// } -/// -/// -/// The rollup search endpoint does two things when the search runs: -/// -/// -/// -/// -/// The original request is sent to the non-rollup index unaltered. -/// -/// -/// -/// -/// A rewritten version of the original request is sent to the rollup index. -/// -/// -/// -/// -/// When the two responses are received, the endpoint rewrites the rollup response and merges the two together. -/// During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used. +/// For more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation. /// /// public readonly partial struct RollupSearchRequestDescriptor @@ -557,43 +485,7 @@ public Elastic.Clients.Elasticsearch.Rollup.RollupSearchRequestDescriptor Reques /// highlighter, suggestors, post_filter, profile, explain: These are similarly disallowed. /// /// -/// Searching both historical rollup and non-rollup data -/// -/// -/// The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data. -/// This is done by simply adding the live indices to the URI. For example: -/// -/// -/// GET sensor-1,sensor_rollup/_rollup_search -/// { -/// "size": 0, -/// "aggregations": { -/// "max_temperature": { -/// "max": { -/// "field": "temperature" -/// } -/// } -/// } -/// } -/// -/// -/// The rollup search endpoint does two things when the search runs: -/// -/// -/// -/// -/// The original request is sent to the non-rollup index unaltered. -/// -/// -/// -/// -/// A rewritten version of the original request is sent to the rollup index. -/// -/// -/// -/// -/// When the two responses are received, the endpoint rewrites the rollup response and merges the two together. -/// During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used. +/// For more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation. /// /// public readonly partial struct RollupSearchRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs index df2711f0050..716c4838efa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs @@ -25,20 +25,6 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class GetUserPrivilegesRequestParameters : Elastic.Transport.RequestParameters { - /// - /// - /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. - /// - /// - public Elastic.Clients.Elasticsearch.Name? Application { get => Q("application"); set => Q("application", value); } - - /// - /// - /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. - /// - /// - public Elastic.Clients.Elasticsearch.Name? Priviledge { get => Q("priviledge"); set => Q("priviledge", value); } - public Elastic.Clients.Elasticsearch.Name? Username { get => Q("username"); set => Q("username", value); } } internal sealed partial class GetUserPrivilegesRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -107,21 +93,6 @@ internal GetUserPrivilegesRequest(Elastic.Clients.Elasticsearch.Serialization.Js internal override bool SupportsBody => false; internal override string OperationName => "security.get_user_privileges"; - - /// - /// - /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. - /// - /// - public Elastic.Clients.Elasticsearch.Name? Application { get => Q("application"); set => Q("application", value); } - - /// - /// - /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. - /// - /// - public Elastic.Clients.Elasticsearch.Name? Priviledge { get => Q("priviledge"); set => Q("priviledge", value); } - public Elastic.Clients.Elasticsearch.Name? Username { get => Q("username"); set => Q("username", value); } } /// @@ -153,34 +124,6 @@ public GetUserPrivilegesRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequest instance) => new Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequest(Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequestDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. - /// - /// - public Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Name? value) - { - Instance.Application = value; - return this; - } - - /// - /// - /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. - /// - /// - public Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequestDescriptor Priviledge(Elastic.Clients.Elasticsearch.Name? value) - { - Instance.Priviledge = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequestDescriptor Username(Elastic.Clients.Elasticsearch.Name? value) - { - Instance.Username = value; - return this; - } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Security.GetUserPrivilegesRequest Build(System.Action? action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs index c2876e6a0c4..cccd64c3269 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs @@ -25,6 +25,15 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class GrantApiKeyRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// If 'true', Elasticsearch refreshes the affected shards to make this operation + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. + /// + /// + public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } } internal sealed partial class GrantApiKeyRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -189,6 +198,16 @@ internal GrantApiKeyRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons internal override string OperationName => "security.grant_api_key"; + /// + /// + /// If 'true', Elasticsearch refreshes the affected shards to make this operation + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. + /// + /// + public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + /// /// /// The user's access token. @@ -308,6 +327,20 @@ public GrantApiKeyRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor(Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequest instance) => new Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequest(Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// If 'true', Elasticsearch refreshes the affected shards to make this operation + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. + /// + /// + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? value) + { + Instance.Refresh = value; + return this; + } + /// /// /// The user's access token. @@ -515,6 +548,20 @@ public GrantApiKeyRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor(Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequest instance) => new Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequest(Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// If 'true', Elasticsearch refreshes the affected shards to make this operation + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. + /// + /// + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? value) + { + Instance.Refresh = value; + return this; + } + /// /// /// The user's access token. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs index 17b6bbdb543..aefbc87e0e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs @@ -33,6 +33,14 @@ public sealed partial class DeleteSnapshotRequestParameters : Elastic.Transport. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// If true, the request returns a response when the matching snapshots are all deleted. + /// If false, the request returns a response as soon as the deletes are scheduled. + /// + /// + public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } } internal sealed partial class DeleteSnapshotRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -126,6 +134,14 @@ internal DeleteSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// If true, the request returns a response when the matching snapshots are all deleted. + /// If false, the request returns a response as soon as the deletes are scheduled. + /// + /// + public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } } /// @@ -193,6 +209,18 @@ public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor Ma return this; } + /// + /// + /// If true, the request returns a response when the matching snapshots are all deleted. + /// If false, the request returns a response as soon as the deletes are scheduled. + /// + /// + public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor WaitForCompletion(bool? value = true) + { + Instance.WaitForCompletion = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequest Build(System.Action action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs index 95426b306c7..29cfa036197 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T LocalJsonValue propKeepAlive = default; LocalJsonValue propKeepOnCompletion = default; LocalJsonValue propPageTimeout = default; - LocalJsonValue?> propParams = default; + LocalJsonValue?> propParams = default; LocalJsonValue propQuery = default; LocalJsonValue propRequestTimeout = default; LocalJsonValue?> propRuntimeMappings = default; @@ -132,7 +132,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propParams.TryReadProperty(ref reader, options, PropParams, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + if (propParams.TryReadProperty(ref reader, options, PropParams, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -208,7 +208,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPageTimeout, value.PageTimeout, null, null); - writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRequestTimeout, value.RequestTimeout, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); @@ -351,7 +351,7 @@ internal QueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// The values for parameters in the query. /// /// - public System.Collections.Generic.IDictionary? Params { get; set; } + public System.Collections.Generic.ICollection? Params { get; set; } /// /// @@ -589,7 +589,7 @@ public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor PageTimeout(Elas /// The values for parameters in the query. /// /// - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Collections.Generic.ICollection? value) { Instance.Params = value; return this; @@ -600,27 +600,9 @@ public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Co /// The values for parameters in the query. /// /// - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params() + public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(params object[] values) { - Instance.Params = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); - return this; - } - - /// - /// - /// The values for parameters in the query. - /// - /// - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Action? action) - { - Instance.Params = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); - return this; - } - - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor AddParam(string key, object value) - { - Instance.Params ??= new System.Collections.Generic.Dictionary(); - Instance.Params.Add(key, value); + Instance.Params = [.. values]; return this; } @@ -1002,7 +984,7 @@ public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor PageT /// The values for parameters in the query. /// /// - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Collections.Generic.ICollection? value) { Instance.Params = value; return this; @@ -1013,27 +995,9 @@ public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Param /// The values for parameters in the query. /// /// - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params() - { - Instance.Params = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); - return this; - } - - /// - /// - /// The values for parameters in the query. - /// - /// - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(System.Action? action) - { - Instance.Params = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); - return this; - } - - public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor AddParam(string key, object value) + public Elastic.Clients.Elasticsearch.Sql.QueryRequestDescriptor Params(params object[] values) { - Instance.Params ??= new System.Collections.Generic.Dictionary(); - Instance.Params.Add(key, value); + Instance.Params = [.. values]; return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs index a3e8a6c5128..e2b771e0b77 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs @@ -76,6 +76,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. /// +/// +/// For practical examples of how to create or update a synonyms set, refer to the External documentation. +/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Synonyms.PutSynonymRequestConverter))] public sealed partial class PutSynonymRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -143,6 +146,9 @@ internal PutSynonymRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. /// +/// +/// For practical examples of how to create or update a synonyms set, refer to the External documentation. +/// /// public readonly partial struct PutSynonymRequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs index 0abddbeb008..60c7006902b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs @@ -376,6 +376,36 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// Any update requests that completed successfully still stick, they are not rolled back. /// /// +/// Refreshing shards +/// +/// +/// Specifying the refresh parameter refreshes all shards once the request completes. +/// This is different to the update API's refresh parameter, which causes only the shard +/// that received the request to be refreshed. Unlike the update API, it does not support +/// wait_for. +/// +/// +/// Running update by query asynchronously +/// +/// +/// If the request contains wait_for_completion=false, Elasticsearch +/// performs some preflight checks, launches the request, and returns a +/// task you can use to cancel or get the status of the task. +/// Elasticsearch creates a record of this task as a document at .tasks/task/${taskId}. +/// +/// +/// Waiting for active shards +/// +/// +/// wait_for_active_shards controls how many copies of a shard must be active +/// before proceeding with the request. See wait_for_active_shards +/// for details. timeout controls how long each write request waits for unavailable +/// shards to become available. Both work exactly the way they work in the +/// Bulk API. Update by query uses scrolled searches, so you can also +/// specify the scroll parameter to control how long it keeps the search context +/// alive, for example ?scroll=10m. The default is 5 minutes. +/// +/// /// Throttling update requests /// /// @@ -470,27 +500,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. -/// -/// -/// Update the document source -/// -/// -/// Update by query supports scripts to update the document source. -/// As with the update API, you can set ctx.op to change the operation that is performed. -/// -/// -/// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. -/// The update by query operation skips updating the document and increments the noop counter. -/// -/// -/// Set ctx.op = "delete" if your script decides that the document should be deleted. -/// The update by query operation deletes the document and increments the deleted counter. -/// -/// -/// Update by query supports only index, noop, and delete. -/// Setting ctx.op to anything else is an error. -/// Setting any other field in ctx is an error. -/// This API enables you to only modify the source of matching documents; you cannot move them. +/// Refer to the linked documentation for examples of how to update documents using the _update_by_query API: /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.UpdateByQueryRequestConverter))] @@ -843,6 +853,36 @@ internal UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Any update requests that completed successfully still stick, they are not rolled back. /// /// +/// Refreshing shards +/// +/// +/// Specifying the refresh parameter refreshes all shards once the request completes. +/// This is different to the update API's refresh parameter, which causes only the shard +/// that received the request to be refreshed. Unlike the update API, it does not support +/// wait_for. +/// +/// +/// Running update by query asynchronously +/// +/// +/// If the request contains wait_for_completion=false, Elasticsearch +/// performs some preflight checks, launches the request, and returns a +/// task you can use to cancel or get the status of the task. +/// Elasticsearch creates a record of this task as a document at .tasks/task/${taskId}. +/// +/// +/// Waiting for active shards +/// +/// +/// wait_for_active_shards controls how many copies of a shard must be active +/// before proceeding with the request. See wait_for_active_shards +/// for details. timeout controls how long each write request waits for unavailable +/// shards to become available. Both work exactly the way they work in the +/// Bulk API. Update by query uses scrolled searches, so you can also +/// specify the scroll parameter to control how long it keeps the search context +/// alive, for example ?scroll=10m. The default is 5 minutes. +/// +/// /// Throttling update requests /// /// @@ -937,27 +977,7 @@ internal UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. -/// -/// -/// Update the document source -/// -/// -/// Update by query supports scripts to update the document source. -/// As with the update API, you can set ctx.op to change the operation that is performed. -/// -/// -/// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. -/// The update by query operation skips updating the document and increments the noop counter. -/// -/// -/// Set ctx.op = "delete" if your script decides that the document should be deleted. -/// The update by query operation deletes the document and increments the deleted counter. -/// -/// -/// Update by query supports only index, noop, and delete. -/// Setting ctx.op to anything else is an error. -/// Setting any other field in ctx is an error. -/// This API enables you to only modify the source of matching documents; you cannot move them. +/// Refer to the linked documentation for examples of how to update documents using the _update_by_query API: /// /// public readonly partial struct UpdateByQueryRequestDescriptor @@ -1606,6 +1626,36 @@ public Elastic.Clients.Elasticsearch.UpdateByQueryRequestDescriptor RequestConfi /// Any update requests that completed successfully still stick, they are not rolled back. /// /// +/// Refreshing shards +/// +/// +/// Specifying the refresh parameter refreshes all shards once the request completes. +/// This is different to the update API's refresh parameter, which causes only the shard +/// that received the request to be refreshed. Unlike the update API, it does not support +/// wait_for. +/// +/// +/// Running update by query asynchronously +/// +/// +/// If the request contains wait_for_completion=false, Elasticsearch +/// performs some preflight checks, launches the request, and returns a +/// task you can use to cancel or get the status of the task. +/// Elasticsearch creates a record of this task as a document at .tasks/task/${taskId}. +/// +/// +/// Waiting for active shards +/// +/// +/// wait_for_active_shards controls how many copies of a shard must be active +/// before proceeding with the request. See wait_for_active_shards +/// for details. timeout controls how long each write request waits for unavailable +/// shards to become available. Both work exactly the way they work in the +/// Bulk API. Update by query uses scrolled searches, so you can also +/// specify the scroll parameter to control how long it keeps the search context +/// alive, for example ?scroll=10m. The default is 5 minutes. +/// +/// /// Throttling update requests /// /// @@ -1700,27 +1750,7 @@ public Elastic.Clients.Elasticsearch.UpdateByQueryRequestDescriptor RequestConfi /// /// /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. -/// -/// -/// Update the document source -/// -/// -/// Update by query supports scripts to update the document source. -/// As with the update API, you can set ctx.op to change the operation that is performed. -/// -/// -/// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. -/// The update by query operation skips updating the document and increments the noop counter. -/// -/// -/// Set ctx.op = "delete" if your script decides that the document should be deleted. -/// The update by query operation deletes the document and increments the deleted counter. -/// -/// -/// Update by query supports only index, noop, and delete. -/// Setting ctx.op to anything else is an error. -/// Setting any other field in ctx is an error. -/// This API enables you to only modify the source of matching documents; you cannot move them. +/// Refer to the linked documentation for examples of how to update documents using the _update_by_query API: /// /// public readonly partial struct UpdateByQueryRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index 5b284cfe510..cf8629e2197 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -265,6 +265,7 @@ public override System.Text.Json.Serialization.JsonConverter CreateConverter(Sys /// /// The _source field must be enabled to use this API. /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). +/// For usage examples such as partial updates, upserts, and scripted updates, see the External documentation. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.UpdateRequestConverterFactory))] @@ -499,6 +500,7 @@ internal UpdateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// /// The _source field must be enabled to use this API. /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). +/// For usage examples such as partial updates, upserts, and scripted updates, see the External documentation. /// /// public readonly partial struct UpdateRequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersBucket.g.cs index 3729ac72160..298a9a03583 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersBucket.g.cs @@ -26,12 +26,14 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; internal sealed partial class FiltersBucketConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropDocCount = System.Text.Json.JsonEncodedText.Encode("doc_count"); + private static readonly System.Text.Json.JsonEncodedText PropKey = System.Text.Json.JsonEncodedText.Encode("key"); public override Elastic.Clients.Elasticsearch.Aggregations.FiltersBucket Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); System.Collections.Generic.Dictionary? propAggregations = default; LocalJsonValue propDocCount = default; + LocalJsonValue propKey = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) @@ -39,6 +41,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.FiltersBucket Read(re continue; } + if (propKey.TryReadProperty(ref reader, options, PropKey, null)) + { + continue; + } + propAggregations ??= new System.Collections.Generic.Dictionary(); Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionaryConverter.ReadItem(ref reader, options, out string key, out Elastic.Clients.Elasticsearch.Aggregations.IAggregate value); propAggregations[key] = value; @@ -48,7 +55,8 @@ public override Elastic.Clients.Elasticsearch.Aggregations.FiltersBucket Read(re return new Elastic.Clients.Elasticsearch.Aggregations.FiltersBucket(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Aggregations = new Elastic.Clients.Elasticsearch.Aggregations.AggregateDictionary(propAggregations), - DocCount = propDocCount.Value + DocCount = propDocCount.Value, + Key = propKey.Value }; } @@ -56,6 +64,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropKey, value.Key, null, null); if (value.Aggregations is not null) { foreach (var item in value.Aggregations) @@ -104,4 +113,5 @@ internal FiltersBucket(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct required #endif long DocCount { get; set; } + public string? Key { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs index 441b6729167..848f134f92c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizer Read(r LocalJsonValue propCustomTokenChars = default; LocalJsonValue propMaxGram = default; LocalJsonValue propMinGram = default; - LocalJsonValue>?> propTokenChars = default; + LocalJsonValue?> propTokenChars = default; LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizer Read(r continue; } - if (propTokenChars.TryReadProperty(ref reader, options, PropTokenChars, static Elastic.Clients.Elasticsearch.Union>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadUnionValue>(o, static (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => JsonUnionSelector.ByTokenType(ref r, o, Elastic.Clients.Elasticsearch.Serialization.JsonTokenTypes.String, Elastic.Clients.Elasticsearch.Serialization.JsonTokenTypes.StartArray), null, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))) + if (propTokenChars.TryReadProperty(ref reader, options, PropTokenChars, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCustomTokenChars, value.CustomTokenChars, null, null); writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropTokenChars, value.TokenChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); + writer.WriteProperty(options, PropTokenChars, value.TokenChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); @@ -128,7 +128,7 @@ internal EdgeNGramTokenizer(Elastic.Clients.Elasticsearch.Serialization.JsonCons public string? CustomTokenChars { get; set; } public int? MaxGram { get; set; } public int? MinGram { get; set; } - public Elastic.Clients.Elasticsearch.Union>? TokenChars { get; set; } + public System.Collections.Generic.ICollection? TokenChars { get; set; } public string Type => "edge_ngram"; @@ -172,12 +172,18 @@ public Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizerDescriptor MinGr return this; } - public Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizerDescriptor TokenChars(Elastic.Clients.Elasticsearch.Union>? value) + public Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizerDescriptor TokenChars(System.Collections.Generic.ICollection? value) { Instance.TokenChars = value; return this; } + public Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizerDescriptor TokenChars(params Elastic.Clients.Elasticsearch.Analysis.TokenChar[] values) + { + Instance.TokenChars = [.. values]; + return this; + } + public Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CharFilterTypes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CharFilterTypes.g.cs index 1b377194993..f081a10085d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CharFilterTypes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/CharFilterTypes.g.cs @@ -32,6 +32,7 @@ internal sealed partial class CharFilterTypesConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropBuiltInTokenizers = System.Text.Json.JsonEncodedText.Encode("built_in_tokenizers"); private static readonly System.Text.Json.JsonEncodedText PropCharFilterTypes2 = System.Text.Json.JsonEncodedText.Encode("char_filter_types"); private static readonly System.Text.Json.JsonEncodedText PropFilterTypes = System.Text.Json.JsonEncodedText.Encode("filter_types"); + private static readonly System.Text.Json.JsonEncodedText PropSynonyms = System.Text.Json.JsonEncodedText.Encode("synonyms"); private static readonly System.Text.Json.JsonEncodedText PropTokenizerTypes = System.Text.Json.JsonEncodedText.Encode("tokenizer_types"); public override Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -44,6 +45,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes Read(ref S LocalJsonValue> propBuiltInTokenizers = default; LocalJsonValue> propCharFilterTypes2 = default; LocalJsonValue> propFilterTypes = default; + LocalJsonValue> propSynonyms = default; LocalJsonValue> propTokenizerTypes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -82,6 +84,11 @@ public override Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes Read(ref S continue; } + if (propSynonyms.TryReadProperty(ref reader, options, PropSynonyms, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + if (propTokenizerTypes.TryReadProperty(ref reader, options, PropTokenizerTypes, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; @@ -106,6 +113,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes Read(ref S BuiltInTokenizers = propBuiltInTokenizers.Value, CharFilterTypes2 = propCharFilterTypes2.Value, FilterTypes = propFilterTypes.Value, + Synonyms = propSynonyms.Value, TokenizerTypes = propTokenizerTypes.Value }; } @@ -120,6 +128,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBuiltInTokenizers, value.BuiltInTokenizers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropCharFilterTypes2, value.CharFilterTypes2, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropFilterTypes, value.FilterTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropSynonyms, value.Synonyms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropTokenizerTypes, value.TokenizerTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } @@ -129,7 +138,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class CharFilterTypes { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public CharFilterTypes(System.Collections.Generic.IReadOnlyCollection analyzerTypes, System.Collections.Generic.IReadOnlyCollection builtInAnalyzers, System.Collections.Generic.IReadOnlyCollection builtInCharFilters, System.Collections.Generic.IReadOnlyCollection builtInFilters, System.Collections.Generic.IReadOnlyCollection builtInTokenizers, System.Collections.Generic.IReadOnlyCollection charFilterTypes2, System.Collections.Generic.IReadOnlyCollection filterTypes, System.Collections.Generic.IReadOnlyCollection tokenizerTypes) + public CharFilterTypes(System.Collections.Generic.IReadOnlyCollection analyzerTypes, System.Collections.Generic.IReadOnlyCollection builtInAnalyzers, System.Collections.Generic.IReadOnlyCollection builtInCharFilters, System.Collections.Generic.IReadOnlyCollection builtInFilters, System.Collections.Generic.IReadOnlyCollection builtInTokenizers, System.Collections.Generic.IReadOnlyCollection charFilterTypes2, System.Collections.Generic.IReadOnlyCollection filterTypes, System.Collections.Generic.IReadOnlyDictionary synonyms, System.Collections.Generic.IReadOnlyCollection tokenizerTypes) { AnalyzerTypes = analyzerTypes; BuiltInAnalyzers = builtInAnalyzers; @@ -138,6 +147,7 @@ public CharFilterTypes(System.Collections.Generic.IReadOnlyCollection FilterTypes { get; set; } + /// + /// + /// Contains statistics about synonyms types used in selected nodes. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary Synonyms { get; set; } + /// /// /// Contains statistics about tokenizer types used in selected nodes. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterFileSystem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterFileSystem.g.cs index 8a2137b1b61..7e627e4195f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterFileSystem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterFileSystem.g.cs @@ -25,29 +25,127 @@ namespace Elastic.Clients.Elasticsearch.Cluster; internal sealed partial class ClusterFileSystemConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropAvailable = System.Text.Json.JsonEncodedText.Encode("available"); private static readonly System.Text.Json.JsonEncodedText PropAvailableInBytes = System.Text.Json.JsonEncodedText.Encode("available_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropFloodStageFreeSpace = System.Text.Json.JsonEncodedText.Encode("flood_stage_free_space"); + private static readonly System.Text.Json.JsonEncodedText PropFloodStageFreeSpaceInBytes = System.Text.Json.JsonEncodedText.Encode("flood_stage_free_space_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropFree = System.Text.Json.JsonEncodedText.Encode("free"); private static readonly System.Text.Json.JsonEncodedText PropFreeInBytes = System.Text.Json.JsonEncodedText.Encode("free_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropFrozenFloodStageFreeSpace = System.Text.Json.JsonEncodedText.Encode("frozen_flood_stage_free_space"); + private static readonly System.Text.Json.JsonEncodedText PropFrozenFloodStageFreeSpaceInBytes = System.Text.Json.JsonEncodedText.Encode("frozen_flood_stage_free_space_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropHighWatermarkFreeSpace = System.Text.Json.JsonEncodedText.Encode("high_watermark_free_space"); + private static readonly System.Text.Json.JsonEncodedText PropHighWatermarkFreeSpaceInBytes = System.Text.Json.JsonEncodedText.Encode("high_watermark_free_space_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropLowWatermarkFreeSpace = System.Text.Json.JsonEncodedText.Encode("low_watermark_free_space"); + private static readonly System.Text.Json.JsonEncodedText PropLowWatermarkFreeSpaceInBytes = System.Text.Json.JsonEncodedText.Encode("low_watermark_free_space_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropMount = System.Text.Json.JsonEncodedText.Encode("mount"); + private static readonly System.Text.Json.JsonEncodedText PropPath = System.Text.Json.JsonEncodedText.Encode("path"); + private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); private static readonly System.Text.Json.JsonEncodedText PropTotalInBytes = System.Text.Json.JsonEncodedText.Encode("total_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropType = System.Text.Json.JsonEncodedText.Encode("type"); public override Elastic.Clients.Elasticsearch.Cluster.ClusterFileSystem Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propAvailableInBytes = default; - LocalJsonValue propFreeInBytes = default; - LocalJsonValue propTotalInBytes = default; + LocalJsonValue propAvailable = default; + LocalJsonValue propAvailableInBytes = default; + LocalJsonValue propFloodStageFreeSpace = default; + LocalJsonValue propFloodStageFreeSpaceInBytes = default; + LocalJsonValue propFree = default; + LocalJsonValue propFreeInBytes = default; + LocalJsonValue propFrozenFloodStageFreeSpace = default; + LocalJsonValue propFrozenFloodStageFreeSpaceInBytes = default; + LocalJsonValue propHighWatermarkFreeSpace = default; + LocalJsonValue propHighWatermarkFreeSpaceInBytes = default; + LocalJsonValue propLowWatermarkFreeSpace = default; + LocalJsonValue propLowWatermarkFreeSpaceInBytes = default; + LocalJsonValue propMount = default; + LocalJsonValue propPath = default; + LocalJsonValue propTotal = default; + LocalJsonValue propTotalInBytes = default; + LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, null)) + if (propAvailable.TryReadProperty(ref reader, options, PropAvailable, null)) { continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propFloodStageFreeSpace.TryReadProperty(ref reader, options, PropFloodStageFreeSpace, null)) + { + continue; + } + + if (propFloodStageFreeSpaceInBytes.TryReadProperty(ref reader, options, PropFloodStageFreeSpaceInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propFree.TryReadProperty(ref reader, options, PropFree, null)) + { + continue; + } + + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propFrozenFloodStageFreeSpace.TryReadProperty(ref reader, options, PropFrozenFloodStageFreeSpace, null)) + { + continue; + } + + if (propFrozenFloodStageFreeSpaceInBytes.TryReadProperty(ref reader, options, PropFrozenFloodStageFreeSpaceInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propHighWatermarkFreeSpace.TryReadProperty(ref reader, options, PropHighWatermarkFreeSpace, null)) + { + continue; + } + + if (propHighWatermarkFreeSpaceInBytes.TryReadProperty(ref reader, options, PropHighWatermarkFreeSpaceInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propLowWatermarkFreeSpace.TryReadProperty(ref reader, options, PropLowWatermarkFreeSpace, null)) + { + continue; + } + + if (propLowWatermarkFreeSpaceInBytes.TryReadProperty(ref reader, options, PropLowWatermarkFreeSpaceInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propMount.TryReadProperty(ref reader, options, PropMount, null)) + { + continue; + } + + if (propPath.TryReadProperty(ref reader, options, PropPath, null)) + { + continue; + } + + if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + { + continue; + } + + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propType.TryReadProperty(ref reader, options, PropType, null)) { continue; } @@ -64,18 +162,46 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterFileSystem Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Cluster.ClusterFileSystem(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + Available = propAvailable.Value, AvailableInBytes = propAvailableInBytes.Value, + FloodStageFreeSpace = propFloodStageFreeSpace.Value, + FloodStageFreeSpaceInBytes = propFloodStageFreeSpaceInBytes.Value, + Free = propFree.Value, FreeInBytes = propFreeInBytes.Value, - TotalInBytes = propTotalInBytes.Value + FrozenFloodStageFreeSpace = propFrozenFloodStageFreeSpace.Value, + FrozenFloodStageFreeSpaceInBytes = propFrozenFloodStageFreeSpaceInBytes.Value, + HighWatermarkFreeSpace = propHighWatermarkFreeSpace.Value, + HighWatermarkFreeSpaceInBytes = propHighWatermarkFreeSpaceInBytes.Value, + LowWatermarkFreeSpace = propLowWatermarkFreeSpace.Value, + LowWatermarkFreeSpaceInBytes = propLowWatermarkFreeSpaceInBytes.Value, + Mount = propMount.Value, + Path = propPath.Value, + Total = propTotal.Value, + TotalInBytes = propTotalInBytes.Value, + Type = propType.Value }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ClusterFileSystem value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropAvailable, value.Available, null, null); + writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFloodStageFreeSpace, value.FloodStageFreeSpace, null, null); + writer.WriteProperty(options, PropFloodStageFreeSpaceInBytes, value.FloodStageFreeSpaceInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFree, value.Free, null, null); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFrozenFloodStageFreeSpace, value.FrozenFloodStageFreeSpace, null, null); + writer.WriteProperty(options, PropFrozenFloodStageFreeSpaceInBytes, value.FrozenFloodStageFreeSpaceInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighWatermarkFreeSpace, value.HighWatermarkFreeSpace, null, null); + writer.WriteProperty(options, PropHighWatermarkFreeSpaceInBytes, value.HighWatermarkFreeSpaceInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowWatermarkFreeSpace, value.LowWatermarkFreeSpace, null, null); + writer.WriteProperty(options, PropLowWatermarkFreeSpaceInBytes, value.LowWatermarkFreeSpaceInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMount, value.Mount, null, null); + writer.WriteProperty(options, PropPath, value.Path, null, null); + writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } } @@ -83,20 +209,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.ClusterFileSystemConverter))] public sealed partial class ClusterFileSystem { - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ClusterFileSystem(long availableInBytes, long freeInBytes, long totalInBytes) - { - AvailableInBytes = availableInBytes; - FreeInBytes = freeInBytes; - TotalInBytes = totalInBytes; - } #if NET7_0_OR_GREATER public ClusterFileSystem() { } #endif #if !NET7_0_OR_GREATER - [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] public ClusterFileSystem() { } @@ -114,31 +232,53 @@ internal ClusterFileSystem(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// This is the actual amount of free disk space the selected Elasticsearch nodes can use. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - long AvailableInBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? Available { get; set; } + + /// + /// + /// Total number of bytes available to JVM in file stores across all selected nodes. + /// Depending on operating system or process-level restrictions, this number may be less than nodes.fs.free_in_byes. + /// This is the actual amount of free disk space the selected Elasticsearch nodes can use. + /// + /// + public long? AvailableInBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? FloodStageFreeSpace { get; set; } + public long? FloodStageFreeSpaceInBytes { get; set; } /// /// /// Total number of unallocated bytes in file stores across all selected nodes. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - long FreeInBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? Free { get; set; } + + /// + /// + /// Total number, in bytes, of unallocated bytes in file stores across all selected nodes. + /// + /// + public long? FreeInBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? FrozenFloodStageFreeSpace { get; set; } + public long? FrozenFloodStageFreeSpaceInBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? HighWatermarkFreeSpace { get; set; } + public long? HighWatermarkFreeSpaceInBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? LowWatermarkFreeSpace { get; set; } + public long? LowWatermarkFreeSpaceInBytes { get; set; } + public string? Mount { get; set; } + public string? Path { get; set; } + + /// + /// + /// Total size of all file stores across all selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? Total { get; set; } /// /// /// Total size, in bytes, of all file stores across all selected nodes. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - long TotalInBytes { get; set; } + public long? TotalInBytes { get; set; } + public string? Type { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndices.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndices.g.cs index e374bc9bc9a..6004635535b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndices.g.cs @@ -28,27 +28,33 @@ internal sealed partial class ClusterIndicesConverter : System.Text.Json.Seriali private static readonly System.Text.Json.JsonEncodedText PropAnalysis = System.Text.Json.JsonEncodedText.Encode("analysis"); private static readonly System.Text.Json.JsonEncodedText PropCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); private static readonly System.Text.Json.JsonEncodedText PropCount = System.Text.Json.JsonEncodedText.Encode("count"); + private static readonly System.Text.Json.JsonEncodedText PropDenseVector = System.Text.Json.JsonEncodedText.Encode("dense_vector"); private static readonly System.Text.Json.JsonEncodedText PropDocs = System.Text.Json.JsonEncodedText.Encode("docs"); private static readonly System.Text.Json.JsonEncodedText PropFielddata = System.Text.Json.JsonEncodedText.Encode("fielddata"); private static readonly System.Text.Json.JsonEncodedText PropMappings = System.Text.Json.JsonEncodedText.Encode("mappings"); private static readonly System.Text.Json.JsonEncodedText PropQueryCache = System.Text.Json.JsonEncodedText.Encode("query_cache"); + private static readonly System.Text.Json.JsonEncodedText PropSearch = System.Text.Json.JsonEncodedText.Encode("search"); private static readonly System.Text.Json.JsonEncodedText PropSegments = System.Text.Json.JsonEncodedText.Encode("segments"); private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("shards"); + private static readonly System.Text.Json.JsonEncodedText PropSparseVector = System.Text.Json.JsonEncodedText.Encode("sparse_vector"); private static readonly System.Text.Json.JsonEncodedText PropStore = System.Text.Json.JsonEncodedText.Encode("store"); private static readonly System.Text.Json.JsonEncodedText PropVersions = System.Text.Json.JsonEncodedText.Encode("versions"); public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndices Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propAnalysis = default; + LocalJsonValue propAnalysis = default; LocalJsonValue propCompletion = default; LocalJsonValue propCount = default; + LocalJsonValue propDenseVector = default; LocalJsonValue propDocs = default; LocalJsonValue propFielddata = default; - LocalJsonValue propMappings = default; + LocalJsonValue propMappings = default; LocalJsonValue propQueryCache = default; + LocalJsonValue propSearch = default; LocalJsonValue propSegments = default; LocalJsonValue propShards = default; + LocalJsonValue propSparseVector = default; LocalJsonValue propStore = default; LocalJsonValue?> propVersions = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -68,6 +74,11 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndices Read(ref Sy continue; } + if (propDenseVector.TryReadProperty(ref reader, options, PropDenseVector, null)) + { + continue; + } + if (propDocs.TryReadProperty(ref reader, options, PropDocs, null)) { continue; @@ -88,6 +99,11 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndices Read(ref Sy continue; } + if (propSearch.TryReadProperty(ref reader, options, PropSearch, null)) + { + continue; + } + if (propSegments.TryReadProperty(ref reader, options, PropSegments, null)) { continue; @@ -98,6 +114,11 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndices Read(ref Sy continue; } + if (propSparseVector.TryReadProperty(ref reader, options, PropSparseVector, null)) + { + continue; + } + if (propStore.TryReadProperty(ref reader, options, PropStore, null)) { continue; @@ -123,12 +144,15 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndices Read(ref Sy Analysis = propAnalysis.Value, Completion = propCompletion.Value, Count = propCount.Value, + DenseVector = propDenseVector.Value, Docs = propDocs.Value, Fielddata = propFielddata.Value, Mappings = propMappings.Value, QueryCache = propQueryCache.Value, + Search = propSearch.Value, Segments = propSegments.Value, Shards = propShards.Value, + SparseVector = propSparseVector.Value, Store = propStore.Value, Versions = propVersions.Value }; @@ -140,12 +164,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropCompletion, value.Completion, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropDenseVector, value.DenseVector, null, null); writer.WriteProperty(options, PropDocs, value.Docs, null, null); writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); writer.WriteProperty(options, PropMappings, value.Mappings, null, null); writer.WriteProperty(options, PropQueryCache, value.QueryCache, null, null); + writer.WriteProperty(options, PropSearch, value.Search, null, null); writer.WriteProperty(options, PropSegments, value.Segments, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); + writer.WriteProperty(options, PropSparseVector, value.SparseVector, null, null); writer.WriteProperty(options, PropStore, value.Store, null, null); writer.WriteProperty(options, PropVersions, value.Versions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); @@ -156,17 +183,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class ClusterIndices { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ClusterIndices(Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes analysis, Elastic.Clients.Elasticsearch.CompletionStats completion, long count, Elastic.Clients.Elasticsearch.DocStats docs, Elastic.Clients.Elasticsearch.FielddataStats fielddata, Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings mappings, Elastic.Clients.Elasticsearch.QueryCacheStats queryCache, Elastic.Clients.Elasticsearch.SegmentsStats segments, Elastic.Clients.Elasticsearch.Cluster.ClusterIndicesShards shards, Elastic.Clients.Elasticsearch.StoreStats store) + public ClusterIndices(Elastic.Clients.Elasticsearch.CompletionStats completion, long count, Elastic.Clients.Elasticsearch.Cluster.DenseVectorStats denseVector, Elastic.Clients.Elasticsearch.DocStats docs, Elastic.Clients.Elasticsearch.FielddataStats fielddata, Elastic.Clients.Elasticsearch.QueryCacheStats queryCache, Elastic.Clients.Elasticsearch.Cluster.SearchUsageStats search, Elastic.Clients.Elasticsearch.SegmentsStats segments, Elastic.Clients.Elasticsearch.Cluster.ClusterIndicesShards shards, Elastic.Clients.Elasticsearch.Cluster.SparseVectorStats sparseVector, Elastic.Clients.Elasticsearch.StoreStats store) { - Analysis = analysis; Completion = completion; Count = count; + DenseVector = denseVector; Docs = docs; Fielddata = fielddata; - Mappings = mappings; QueryCache = queryCache; + Search = search; Segments = segments; Shards = shards; + SparseVector = sparseVector; Store = store; } #if NET7_0_OR_GREATER @@ -191,11 +219,7 @@ internal ClusterIndices(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// Contains statistics about analyzers and analyzer components used in selected nodes. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes Analysis { get; set; } + public Elastic.Clients.Elasticsearch.Cluster.CharFilterTypes? Analysis { get; set; } /// /// @@ -219,6 +243,17 @@ internal ClusterIndices(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc #endif long Count { get; set; } + /// + /// + /// Contains statistics about indexed dense vector + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Cluster.DenseVectorStats DenseVector { get; set; } + /// /// /// Contains counts for documents in selected nodes. @@ -246,22 +281,31 @@ internal ClusterIndices(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// Contains statistics about field mappings in selected nodes. /// /// + public Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings? Mappings { get; set; } + + /// + /// + /// Contains statistics about the query cache of selected nodes. + /// + /// public #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Mappings { get; set; } + Elastic.Clients.Elasticsearch.QueryCacheStats QueryCache { get; set; } /// /// - /// Contains statistics about the query cache of selected nodes. + /// Holds a snapshot of the search usage statistics. + /// Used to hold the stats for a single node that's part of a ClusterStatsNodeResponse, as well as to + /// accumulate stats for the entire cluster and return them as part of the ClusterStatsResponse. /// /// public #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.QueryCacheStats QueryCache { get; set; } + Elastic.Clients.Elasticsearch.Cluster.SearchUsageStats Search { get; set; } /// /// @@ -285,6 +329,17 @@ internal ClusterIndices(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc #endif Elastic.Clients.Elasticsearch.Cluster.ClusterIndicesShards Shards { get; set; } + /// + /// + /// Contains statistics about indexed sparse vector + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Cluster.SparseVectorStats SparseVector { get; set; } + /// /// /// Contains statistics about the size of shards assigned to selected nodes. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvm.g.cs index 6b58b42a90e..9c5ede79bd9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvm.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvm.g.cs @@ -25,6 +25,7 @@ namespace Elastic.Clients.Elasticsearch.Cluster; internal sealed partial class ClusterJvmConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropMaxUptime = System.Text.Json.JsonEncodedText.Encode("max_uptime"); private static readonly System.Text.Json.JsonEncodedText PropMaxUptimeInMillis = System.Text.Json.JsonEncodedText.Encode("max_uptime_in_millis"); private static readonly System.Text.Json.JsonEncodedText PropMem = System.Text.Json.JsonEncodedText.Encode("mem"); private static readonly System.Text.Json.JsonEncodedText PropThreads = System.Text.Json.JsonEncodedText.Encode("threads"); @@ -33,12 +34,18 @@ internal sealed partial class ClusterJvmConverter : System.Text.Json.Serializati public override Elastic.Clients.Elasticsearch.Cluster.ClusterJvm Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propMaxUptime = default; LocalJsonValue propMaxUptimeInMillis = default; LocalJsonValue propMem = default; LocalJsonValue propThreads = default; LocalJsonValue> propVersions = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propMaxUptime.TryReadProperty(ref reader, options, PropMaxUptime, null)) + { + continue; + } + if (propMaxUptimeInMillis.TryReadProperty(ref reader, options, PropMaxUptimeInMillis, static System.TimeSpan (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; @@ -71,6 +78,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterJvm Read(ref System reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Cluster.ClusterJvm(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + MaxUptime = propMaxUptime.Value, MaxUptimeInMillis = propMaxUptimeInMillis.Value, Mem = propMem.Value, Threads = propThreads.Value, @@ -81,6 +89,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterJvm Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ClusterJvm value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropMaxUptime, value.MaxUptime, null, null); writer.WriteProperty(options, PropMaxUptimeInMillis, value.MaxUptimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropMem, value.Mem, null, null); writer.WriteProperty(options, PropThreads, value.Threads, null, null); @@ -117,6 +126,13 @@ internal ClusterJvm(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorS _ = sentinel; } + /// + /// + /// Uptime duration since JVM last started. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MaxUptime { get; set; } + /// /// /// Uptime duration, in milliseconds, since JVM last started. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvmMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvmMemory.g.cs index 1c343d83bd8..63ec8b09cf5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvmMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterJvmMemory.g.cs @@ -25,21 +25,35 @@ namespace Elastic.Clients.Elasticsearch.Cluster; internal sealed partial class ClusterJvmMemoryConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropHeapMax = System.Text.Json.JsonEncodedText.Encode("heap_max"); private static readonly System.Text.Json.JsonEncodedText PropHeapMaxInBytes = System.Text.Json.JsonEncodedText.Encode("heap_max_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropHeapUsed = System.Text.Json.JsonEncodedText.Encode("heap_used"); private static readonly System.Text.Json.JsonEncodedText PropHeapUsedInBytes = System.Text.Json.JsonEncodedText.Encode("heap_used_in_bytes"); public override Elastic.Clients.Elasticsearch.Cluster.ClusterJvmMemory Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propHeapMax = default; LocalJsonValue propHeapMaxInBytes = default; + LocalJsonValue propHeapUsed = default; LocalJsonValue propHeapUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propHeapMax.TryReadProperty(ref reader, options, PropHeapMax, null)) + { + continue; + } + if (propHeapMaxInBytes.TryReadProperty(ref reader, options, PropHeapMaxInBytes, null)) { continue; } + if (propHeapUsed.TryReadProperty(ref reader, options, PropHeapUsed, null)) + { + continue; + } + if (propHeapUsedInBytes.TryReadProperty(ref reader, options, PropHeapUsedInBytes, null)) { continue; @@ -57,7 +71,9 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterJvmMemory Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Cluster.ClusterJvmMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + HeapMax = propHeapMax.Value, HeapMaxInBytes = propHeapMaxInBytes.Value, + HeapUsed = propHeapUsed.Value, HeapUsedInBytes = propHeapUsedInBytes.Value }; } @@ -65,7 +81,9 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterJvmMemory Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ClusterJvmMemory value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropHeapMax, value.HeapMax, null, null); writer.WriteProperty(options, PropHeapMaxInBytes, value.HeapMaxInBytes, null, null); + writer.WriteProperty(options, PropHeapUsed, value.HeapUsed, null, null); writer.WriteProperty(options, PropHeapUsedInBytes, value.HeapUsedInBytes, null, null); writer.WriteEndObject(); } @@ -97,6 +115,13 @@ internal ClusterJvmMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstr _ = sentinel; } + /// + /// + /// Maximum amount of memory available for use by the heap across all selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? HeapMax { get; set; } + /// /// /// Maximum amount of memory, in bytes, available for use by the heap across all selected nodes. @@ -108,6 +133,13 @@ internal ClusterJvmMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #endif long HeapMaxInBytes { get; set; } + /// + /// + /// Memory currently in use by the heap across all selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? HeapUsed { get; set; } + /// /// /// Memory, in bytes, currently in use by the heap across all selected nodes. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs index 8460abf3bae..0e6c7d9b777 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs @@ -32,10 +32,12 @@ internal sealed partial class ClusterNodeCountConverter : System.Text.Json.Seria private static readonly System.Text.Json.JsonEncodedText PropDataFrozen = System.Text.Json.JsonEncodedText.Encode("data_frozen"); private static readonly System.Text.Json.JsonEncodedText PropDataHot = System.Text.Json.JsonEncodedText.Encode("data_hot"); private static readonly System.Text.Json.JsonEncodedText PropDataWarm = System.Text.Json.JsonEncodedText.Encode("data_warm"); + private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("index"); private static readonly System.Text.Json.JsonEncodedText PropIngest = System.Text.Json.JsonEncodedText.Encode("ingest"); private static readonly System.Text.Json.JsonEncodedText PropMaster = System.Text.Json.JsonEncodedText.Encode("master"); private static readonly System.Text.Json.JsonEncodedText PropMl = System.Text.Json.JsonEncodedText.Encode("ml"); private static readonly System.Text.Json.JsonEncodedText PropRemoteClusterClient = System.Text.Json.JsonEncodedText.Encode("remote_cluster_client"); + private static readonly System.Text.Json.JsonEncodedText PropSearch = System.Text.Json.JsonEncodedText.Encode("search"); private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); private static readonly System.Text.Json.JsonEncodedText PropTransform = System.Text.Json.JsonEncodedText.Encode("transform"); private static readonly System.Text.Json.JsonEncodedText PropVotingOnly = System.Text.Json.JsonEncodedText.Encode("voting_only"); @@ -43,38 +45,40 @@ internal sealed partial class ClusterNodeCountConverter : System.Text.Json.Seria public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propCoordinatingOnly = default; - LocalJsonValue propData = default; - LocalJsonValue propDataCold = default; - LocalJsonValue propDataContent = default; + LocalJsonValue propCoordinatingOnly = default; + LocalJsonValue propData = default; + LocalJsonValue propDataCold = default; + LocalJsonValue propDataContent = default; LocalJsonValue propDataFrozen = default; - LocalJsonValue propDataHot = default; - LocalJsonValue propDataWarm = default; - LocalJsonValue propIngest = default; - LocalJsonValue propMaster = default; - LocalJsonValue propMl = default; - LocalJsonValue propRemoteClusterClient = default; + LocalJsonValue propDataHot = default; + LocalJsonValue propDataWarm = default; + LocalJsonValue propIndex = default; + LocalJsonValue propIngest = default; + LocalJsonValue propMaster = default; + LocalJsonValue propMl = default; + LocalJsonValue propRemoteClusterClient = default; + LocalJsonValue propSearch = default; LocalJsonValue propTotal = default; - LocalJsonValue propTransform = default; - LocalJsonValue propVotingOnly = default; + LocalJsonValue propTransform = default; + LocalJsonValue propVotingOnly = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoordinatingOnly.TryReadProperty(ref reader, options, PropCoordinatingOnly, null)) + if (propCoordinatingOnly.TryReadProperty(ref reader, options, PropCoordinatingOnly, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propData.TryReadProperty(ref reader, options, PropData, null)) + if (propData.TryReadProperty(ref reader, options, PropData, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDataCold.TryReadProperty(ref reader, options, PropDataCold, null)) + if (propDataCold.TryReadProperty(ref reader, options, PropDataCold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDataContent.TryReadProperty(ref reader, options, PropDataContent, null)) + if (propDataContent.TryReadProperty(ref reader, options, PropDataContent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,32 +88,42 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref continue; } - if (propDataHot.TryReadProperty(ref reader, options, PropDataHot, null)) + if (propDataHot.TryReadProperty(ref reader, options, PropDataHot, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDataWarm.TryReadProperty(ref reader, options, PropDataWarm, null)) + if (propDataWarm.TryReadProperty(ref reader, options, PropDataWarm, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIngest.TryReadProperty(ref reader, options, PropIngest, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaster.TryReadProperty(ref reader, options, PropMaster, null)) + if (propIngest.TryReadProperty(ref reader, options, PropIngest, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMl.TryReadProperty(ref reader, options, PropMl, null)) + if (propMaster.TryReadProperty(ref reader, options, PropMaster, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRemoteClusterClient.TryReadProperty(ref reader, options, PropRemoteClusterClient, null)) + if (propMl.TryReadProperty(ref reader, options, PropMl, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propRemoteClusterClient.TryReadProperty(ref reader, options, PropRemoteClusterClient, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propSearch.TryReadProperty(ref reader, options, PropSearch, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,12 +133,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref continue; } - if (propTransform.TryReadProperty(ref reader, options, PropTransform, null)) + if (propTransform.TryReadProperty(ref reader, options, PropTransform, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVotingOnly.TryReadProperty(ref reader, options, PropVotingOnly, null)) + if (propVotingOnly.TryReadProperty(ref reader, options, PropVotingOnly, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,10 +162,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref DataFrozen = propDataFrozen.Value, DataHot = propDataHot.Value, DataWarm = propDataWarm.Value, + Index = propIndex.Value, Ingest = propIngest.Value, Master = propMaster.Value, Ml = propMl.Value, RemoteClusterClient = propRemoteClusterClient.Value, + Search = propSearch.Value, Total = propTotal.Value, Transform = propTransform.Value, VotingOnly = propVotingOnly.Value @@ -161,20 +177,22 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoordinatingOnly, value.CoordinatingOnly, null, null); - writer.WriteProperty(options, PropData, value.Data, null, null); - writer.WriteProperty(options, PropDataCold, value.DataCold, null, null); - writer.WriteProperty(options, PropDataContent, value.DataContent, null, null); + writer.WriteProperty(options, PropCoordinatingOnly, value.CoordinatingOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropData, value.Data, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDataCold, value.DataCold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDataContent, value.DataContent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataFrozen, value.DataFrozen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropDataHot, value.DataHot, null, null); - writer.WriteProperty(options, PropDataWarm, value.DataWarm, null, null); - writer.WriteProperty(options, PropIngest, value.Ingest, null, null); - writer.WriteProperty(options, PropMaster, value.Master, null, null); - writer.WriteProperty(options, PropMl, value.Ml, null, null); - writer.WriteProperty(options, PropRemoteClusterClient, value.RemoteClusterClient, null, null); + writer.WriteProperty(options, PropDataHot, value.DataHot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDataWarm, value.DataWarm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIngest, value.Ingest, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaster, value.Master, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMl, value.Ml, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRemoteClusterClient, value.RemoteClusterClient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSearch, value.Search, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTransform, value.Transform, null, null); - writer.WriteProperty(options, PropVotingOnly, value.VotingOnly, null, null); + writer.WriteProperty(options, PropTransform, value.Transform, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVotingOnly, value.VotingOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -183,21 +201,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class ClusterNodeCount { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ClusterNodeCount(int coordinatingOnly, int data, int dataCold, int dataContent, int dataHot, int dataWarm, int ingest, int master, int ml, int remoteClusterClient, int total, int transform, int votingOnly) + public ClusterNodeCount(int total) { - CoordinatingOnly = coordinatingOnly; - Data = data; - DataCold = dataCold; - DataContent = dataContent; - DataHot = dataHot; - DataWarm = dataWarm; - Ingest = ingest; - Master = master; - Ml = ml; - RemoteClusterClient = remoteClusterClient; Total = total; - Transform = transform; - VotingOnly = votingOnly; } #if NET7_0_OR_GREATER public ClusterNodeCount() @@ -216,70 +222,24 @@ internal ClusterNodeCount(Elastic.Clients.Elasticsearch.Serialization.JsonConstr _ = sentinel; } - public -#if NET7_0_OR_GREATER - required -#endif - int CoordinatingOnly { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int Data { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int DataCold { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int DataContent { get; set; } + public int? CoordinatingOnly { get; set; } + public int? Data { get; set; } + public int? DataCold { get; set; } + public int? DataContent { get; set; } public int? DataFrozen { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int DataHot { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int DataWarm { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int Ingest { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int Master { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int Ml { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int RemoteClusterClient { get; set; } + public int? DataHot { get; set; } + public int? DataWarm { get; set; } + public int? Index { get; set; } + public int? Ingest { get; set; } + public int? Master { get; set; } + public int? Ml { get; set; } + public int? RemoteClusterClient { get; set; } + public int? Search { get; set; } public #if NET7_0_OR_GREATER required #endif int Total { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int Transform { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int VotingOnly { get; set; } + public int? Transform { get; set; } + public int? VotingOnly { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterSnapshotStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterSnapshotStats.g.cs new file mode 100644 index 00000000000..80c08ea5622 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterSnapshotStats.g.cs @@ -0,0 +1,110 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class ClusterSnapshotStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropCurrentCounts = System.Text.Json.JsonEncodedText.Encode("current_counts"); + private static readonly System.Text.Json.JsonEncodedText PropRepositories = System.Text.Json.JsonEncodedText.Encode("repositories"); + + public override Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propCurrentCounts = default; + LocalJsonValue> propRepositories = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propCurrentCounts.TryReadProperty(ref reader, options, PropCurrentCounts, null)) + { + continue; + } + + if (propRepositories.TryReadProperty(ref reader, options, PropRepositories, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + CurrentCounts = propCurrentCounts.Value, + Repositories = propRepositories.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropCurrentCounts, value.CurrentCounts, null, null); + writer.WriteProperty(options, PropRepositories, value.Repositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStatsConverter))] +public sealed partial class ClusterSnapshotStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ClusterSnapshotStats(Elastic.Clients.Elasticsearch.Cluster.SnapshotCurrentCounts currentCounts, System.Collections.Generic.IReadOnlyDictionary repositories) + { + CurrentCounts = currentCounts; + Repositories = repositories; + } +#if NET7_0_OR_GREATER + public ClusterSnapshotStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public ClusterSnapshotStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ClusterSnapshotStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Cluster.SnapshotCurrentCounts CurrentCounts { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary Repositories { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs new file mode 100644 index 00000000000..c66d0acf1d4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs @@ -0,0 +1,215 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class DenseVectorOffHeapStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropFielddata = System.Text.Json.JsonEncodedText.Encode("fielddata"); + private static readonly System.Text.Json.JsonEncodedText PropTotalSize = System.Text.Json.JsonEncodedText.Encode("total_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_size_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVebSize = System.Text.Json.JsonEncodedText.Encode("total_veb_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVebSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_veb_size_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVecSize = System.Text.Json.JsonEncodedText.Encode("total_vec_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVecSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_vec_size_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVeqSize = System.Text.Json.JsonEncodedText.Encode("total_veq_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVeqSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_veq_size_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVexSize = System.Text.Json.JsonEncodedText.Encode("total_vex_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalVexSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_vex_size_bytes"); + + public override Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue>?> propFielddata = default; + LocalJsonValue propTotalSize = default; + LocalJsonValue propTotalSizeBytes = default; + LocalJsonValue propTotalVebSize = default; + LocalJsonValue propTotalVebSizeBytes = default; + LocalJsonValue propTotalVecSize = default; + LocalJsonValue propTotalVecSizeBytes = default; + LocalJsonValue propTotalVeqSize = default; + LocalJsonValue propTotalVeqSizeBytes = default; + LocalJsonValue propTotalVexSize = default; + LocalJsonValue propTotalVexSizeBytes = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propFielddata.TryReadProperty(ref reader, options, PropFielddata, static System.Collections.Generic.IReadOnlyDictionary>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))) + { + continue; + } + + if (propTotalSize.TryReadProperty(ref reader, options, PropTotalSize, null)) + { + continue; + } + + if (propTotalSizeBytes.TryReadProperty(ref reader, options, PropTotalSizeBytes, null)) + { + continue; + } + + if (propTotalVebSize.TryReadProperty(ref reader, options, PropTotalVebSize, null)) + { + continue; + } + + if (propTotalVebSizeBytes.TryReadProperty(ref reader, options, PropTotalVebSizeBytes, null)) + { + continue; + } + + if (propTotalVecSize.TryReadProperty(ref reader, options, PropTotalVecSize, null)) + { + continue; + } + + if (propTotalVecSizeBytes.TryReadProperty(ref reader, options, PropTotalVecSizeBytes, null)) + { + continue; + } + + if (propTotalVeqSize.TryReadProperty(ref reader, options, PropTotalVeqSize, null)) + { + continue; + } + + if (propTotalVeqSizeBytes.TryReadProperty(ref reader, options, PropTotalVeqSizeBytes, null)) + { + continue; + } + + if (propTotalVexSize.TryReadProperty(ref reader, options, PropTotalVexSize, null)) + { + continue; + } + + if (propTotalVexSizeBytes.TryReadProperty(ref reader, options, PropTotalVexSizeBytes, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Fielddata = propFielddata.Value, + TotalSize = propTotalSize.Value, + TotalSizeBytes = propTotalSizeBytes.Value, + TotalVebSize = propTotalVebSize.Value, + TotalVebSizeBytes = propTotalVebSizeBytes.Value, + TotalVecSize = propTotalVecSize.Value, + TotalVecSizeBytes = propTotalVecSizeBytes.Value, + TotalVeqSize = propTotalVeqSize.Value, + TotalVeqSizeBytes = propTotalVeqSizeBytes.Value, + TotalVexSize = propTotalVexSize.Value, + TotalVexSizeBytes = propTotalVexSizeBytes.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropFielddata, value.Fielddata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteProperty(options, PropTotalSize, value.TotalSize, null, null); + writer.WriteProperty(options, PropTotalSizeBytes, value.TotalSizeBytes, null, null); + writer.WriteProperty(options, PropTotalVebSize, value.TotalVebSize, null, null); + writer.WriteProperty(options, PropTotalVebSizeBytes, value.TotalVebSizeBytes, null, null); + writer.WriteProperty(options, PropTotalVecSize, value.TotalVecSize, null, null); + writer.WriteProperty(options, PropTotalVecSizeBytes, value.TotalVecSizeBytes, null, null); + writer.WriteProperty(options, PropTotalVeqSize, value.TotalVeqSize, null, null); + writer.WriteProperty(options, PropTotalVeqSizeBytes, value.TotalVeqSizeBytes, null, null); + writer.WriteProperty(options, PropTotalVexSize, value.TotalVexSize, null, null); + writer.WriteProperty(options, PropTotalVexSizeBytes, value.TotalVexSizeBytes, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStatsConverter))] +public sealed partial class DenseVectorOffHeapStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DenseVectorOffHeapStats(long totalSizeBytes, long totalVebSizeBytes, long totalVecSizeBytes, long totalVeqSizeBytes, long totalVexSizeBytes) + { + TotalSizeBytes = totalSizeBytes; + TotalVebSizeBytes = totalVebSizeBytes; + TotalVecSizeBytes = totalVecSizeBytes; + TotalVeqSizeBytes = totalVeqSizeBytes; + TotalVexSizeBytes = totalVexSizeBytes; + } +#if NET7_0_OR_GREATER + public DenseVectorOffHeapStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public DenseVectorOffHeapStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal DenseVectorOffHeapStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public System.Collections.Generic.IReadOnlyDictionary>? Fielddata { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalSizeBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalVebSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalVebSizeBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalVecSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalVecSizeBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalVeqSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalVeqSizeBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalVexSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalVexSizeBytes { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorStats.g.cs new file mode 100644 index 00000000000..841b0c09ba8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorStats.g.cs @@ -0,0 +1,105 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class DenseVectorStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropOffHeap = System.Text.Json.JsonEncodedText.Encode("off_heap"); + private static readonly System.Text.Json.JsonEncodedText PropValueCount = System.Text.Json.JsonEncodedText.Encode("value_count"); + + public override Elastic.Clients.Elasticsearch.Cluster.DenseVectorStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propOffHeap = default; + LocalJsonValue propValueCount = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propOffHeap.TryReadProperty(ref reader, options, PropOffHeap, null)) + { + continue; + } + + if (propValueCount.TryReadProperty(ref reader, options, PropValueCount, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.DenseVectorStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + OffHeap = propOffHeap.Value, + ValueCount = propValueCount.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.DenseVectorStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropOffHeap, value.OffHeap, null, null); + writer.WriteProperty(options, PropValueCount, value.ValueCount, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.DenseVectorStatsConverter))] +public sealed partial class DenseVectorStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DenseVectorStats(long valueCount) + { + ValueCount = valueCount; + } +#if NET7_0_OR_GREATER + public DenseVectorStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public DenseVectorStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal DenseVectorStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats? OffHeap { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long ValueCount { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs index 3435aca8c4e..1ef96afc613 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs @@ -32,17 +32,23 @@ internal sealed partial class FieldTypesConverter : System.Text.Json.Serializati private static readonly System.Text.Json.JsonEncodedText PropIndexedVectorDimMin = System.Text.Json.JsonEncodedText.Encode("indexed_vector_dim_min"); private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("name"); private static readonly System.Text.Json.JsonEncodedText PropScriptCount = System.Text.Json.JsonEncodedText.Encode("script_count"); + private static readonly System.Text.Json.JsonEncodedText PropVectorElementTypeCount = System.Text.Json.JsonEncodedText.Encode("vector_element_type_count"); + private static readonly System.Text.Json.JsonEncodedText PropVectorIndexTypeCount = System.Text.Json.JsonEncodedText.Encode("vector_index_type_count"); + private static readonly System.Text.Json.JsonEncodedText PropVectorSimilarityTypeCount = System.Text.Json.JsonEncodedText.Encode("vector_similarity_type_count"); public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propCount = default; LocalJsonValue propIndexCount = default; - LocalJsonValue propIndexedVectorCount = default; - LocalJsonValue propIndexedVectorDimMax = default; - LocalJsonValue propIndexedVectorDimMin = default; + LocalJsonValue propIndexedVectorCount = default; + LocalJsonValue propIndexedVectorDimMax = default; + LocalJsonValue propIndexedVectorDimMin = default; LocalJsonValue propName = default; LocalJsonValue propScriptCount = default; + LocalJsonValue?> propVectorElementTypeCount = default; + LocalJsonValue?> propVectorIndexTypeCount = default; + LocalJsonValue?> propVectorSimilarityTypeCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propCount.TryReadProperty(ref reader, options, PropCount, null)) @@ -55,17 +61,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System continue; } - if (propIndexedVectorCount.TryReadProperty(ref reader, options, PropIndexedVectorCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propIndexedVectorCount.TryReadProperty(ref reader, options, PropIndexedVectorCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedVectorDimMax.TryReadProperty(ref reader, options, PropIndexedVectorDimMax, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propIndexedVectorDimMax.TryReadProperty(ref reader, options, PropIndexedVectorDimMax, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedVectorDimMin.TryReadProperty(ref reader, options, PropIndexedVectorDimMin, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propIndexedVectorDimMin.TryReadProperty(ref reader, options, PropIndexedVectorDimMin, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,6 +86,21 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System continue; } + if (propVectorElementTypeCount.TryReadProperty(ref reader, options, PropVectorElementTypeCount, static System.Collections.Generic.IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + { + continue; + } + + if (propVectorIndexTypeCount.TryReadProperty(ref reader, options, PropVectorIndexTypeCount, static System.Collections.Generic.IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + { + continue; + } + + if (propVectorSimilarityTypeCount.TryReadProperty(ref reader, options, PropVectorSimilarityTypeCount, static System.Collections.Generic.IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -98,7 +119,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System IndexedVectorDimMax = propIndexedVectorDimMax.Value, IndexedVectorDimMin = propIndexedVectorDimMin.Value, Name = propName.Value, - ScriptCount = propScriptCount.Value + ScriptCount = propScriptCount.Value, + VectorElementTypeCount = propVectorElementTypeCount.Value, + VectorIndexTypeCount = propVectorIndexTypeCount.Value, + VectorSimilarityTypeCount = propVectorSimilarityTypeCount.Value }; } @@ -107,11 +131,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropIndexCount, value.IndexCount, null, null); - writer.WriteProperty(options, PropIndexedVectorCount, value.IndexedVectorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropIndexedVectorDimMax, value.IndexedVectorDimMax, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropIndexedVectorDimMin, value.IndexedVectorDimMin, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorCount, value.IndexedVectorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorDimMax, value.IndexedVectorDimMax, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorDimMin, value.IndexedVectorDimMin, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropScriptCount, value.ScriptCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVectorElementTypeCount, value.VectorElementTypeCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropVectorIndexTypeCount, value.VectorIndexTypeCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropVectorSimilarityTypeCount, value.VectorSimilarityTypeCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } } @@ -170,21 +197,21 @@ internal FieldTypes(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorS /// For dense_vector field types, number of indexed vector types in selected nodes. /// /// - public long? IndexedVectorCount { get; set; } + public int? IndexedVectorCount { get; set; } /// /// /// For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes. /// /// - public long? IndexedVectorDimMax { get; set; } + public int? IndexedVectorDimMax { get; set; } /// /// /// For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes. /// /// - public long? IndexedVectorDimMin { get; set; } + public int? IndexedVectorDimMin { get; set; } /// /// @@ -203,4 +230,25 @@ internal FieldTypes(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorS /// /// public int? ScriptCount { get; set; } + + /// + /// + /// For dense_vector field types, count of mappings by element type + /// + /// + public System.Collections.Generic.IReadOnlyDictionary? VectorElementTypeCount { get; set; } + + /// + /// + /// For dense_vector field types, count of mappings by index type + /// + /// + public System.Collections.Generic.IReadOnlyDictionary? VectorIndexTypeCount { get; set; } + + /// + /// + /// For dense_vector field types, count of mappings by similarity + /// + /// + public System.Collections.Generic.IReadOnlyDictionary? VectorSimilarityTypeCount { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs index cc2b8405a25..5727dd901f7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs @@ -27,6 +27,7 @@ internal sealed partial class FieldTypesMappingsConverter : System.Text.Json.Ser { private static readonly System.Text.Json.JsonEncodedText PropFieldTypes = System.Text.Json.JsonEncodedText.Encode("field_types"); private static readonly System.Text.Json.JsonEncodedText PropRuntimeFieldTypes = System.Text.Json.JsonEncodedText.Encode("runtime_field_types"); + private static readonly System.Text.Json.JsonEncodedText PropSourceModes = System.Text.Json.JsonEncodedText.Encode("source_modes"); private static readonly System.Text.Json.JsonEncodedText PropTotalDeduplicatedFieldCount = System.Text.Json.JsonEncodedText.Encode("total_deduplicated_field_count"); private static readonly System.Text.Json.JsonEncodedText PropTotalDeduplicatedMappingSize = System.Text.Json.JsonEncodedText.Encode("total_deduplicated_mapping_size"); private static readonly System.Text.Json.JsonEncodedText PropTotalDeduplicatedMappingSizeInBytes = System.Text.Json.JsonEncodedText.Encode("total_deduplicated_mapping_size_in_bytes"); @@ -36,11 +37,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue> propFieldTypes = default; - LocalJsonValue?> propRuntimeFieldTypes = default; - LocalJsonValue propTotalDeduplicatedFieldCount = default; + LocalJsonValue> propRuntimeFieldTypes = default; + LocalJsonValue> propSourceModes = default; + LocalJsonValue propTotalDeduplicatedFieldCount = default; LocalJsonValue propTotalDeduplicatedMappingSize = default; LocalJsonValue propTotalDeduplicatedMappingSizeInBytes = default; - LocalJsonValue propTotalFieldCount = default; + LocalJsonValue propTotalFieldCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propFieldTypes.TryReadProperty(ref reader, options, PropFieldTypes, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) @@ -48,12 +50,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re continue; } - if (propRuntimeFieldTypes.TryReadProperty(ref reader, options, PropRuntimeFieldTypes, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + if (propRuntimeFieldTypes.TryReadProperty(ref reader, options, PropRuntimeFieldTypes, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } - if (propTotalDeduplicatedFieldCount.TryReadProperty(ref reader, options, PropTotalDeduplicatedFieldCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propSourceModes.TryReadProperty(ref reader, options, PropSourceModes, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (propTotalDeduplicatedFieldCount.TryReadProperty(ref reader, options, PropTotalDeduplicatedFieldCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re continue; } - if (propTotalFieldCount.TryReadProperty(ref reader, options, PropTotalFieldCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propTotalFieldCount.TryReadProperty(ref reader, options, PropTotalFieldCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,6 +94,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re { FieldTypes = propFieldTypes.Value, RuntimeFieldTypes = propRuntimeFieldTypes.Value, + SourceModes = propSourceModes.Value, TotalDeduplicatedFieldCount = propTotalDeduplicatedFieldCount.Value, TotalDeduplicatedMappingSize = propTotalDeduplicatedMappingSize.Value, TotalDeduplicatedMappingSizeInBytes = propTotalDeduplicatedMappingSizeInBytes.Value, @@ -98,11 +106,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFieldTypes, value.FieldTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRuntimeFieldTypes, value.RuntimeFieldTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropTotalDeduplicatedFieldCount, value.TotalDeduplicatedFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRuntimeFieldTypes, value.RuntimeFieldTypes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropSourceModes, value.SourceModes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropTotalDeduplicatedFieldCount, value.TotalDeduplicatedFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalDeduplicatedMappingSize, value.TotalDeduplicatedMappingSize, null, null); writer.WriteProperty(options, PropTotalDeduplicatedMappingSizeInBytes, value.TotalDeduplicatedMappingSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropTotalFieldCount, value.TotalFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalFieldCount, value.TotalFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -111,9 +120,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class FieldTypesMappings { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public FieldTypesMappings(System.Collections.Generic.IReadOnlyCollection fieldTypes) + public FieldTypesMappings(System.Collections.Generic.IReadOnlyCollection fieldTypes, System.Collections.Generic.IReadOnlyCollection runtimeFieldTypes, System.Collections.Generic.IReadOnlyDictionary sourceModes) { FieldTypes = fieldTypes; + RuntimeFieldTypes = runtimeFieldTypes; + SourceModes = sourceModes; } #if NET7_0_OR_GREATER public FieldTypesMappings() @@ -148,14 +159,29 @@ internal FieldTypesMappings(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Contains statistics about runtime field data types used in selected nodes. /// /// - public System.Collections.Generic.IReadOnlyCollection? RuntimeFieldTypes { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyCollection RuntimeFieldTypes { get; set; } + + /// + /// + /// Source mode usage count. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary SourceModes { get; set; } /// /// /// Total number of fields in all non-system indices, accounting for mapping deduplication. /// /// - public int? TotalDeduplicatedFieldCount { get; set; } + public long? TotalDeduplicatedFieldCount { get; set; } /// /// @@ -176,5 +202,5 @@ internal FieldTypesMappings(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Total number of fields in all non-system indices. /// /// - public int? TotalFieldCount { get; set; } + public long? TotalFieldCount { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressure.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressure.g.cs index 5cb4d4c748f..98de64cd39f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressure.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressure.g.cs @@ -30,7 +30,7 @@ internal sealed partial class IndexingPressureConverter : System.Text.Json.Seria public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressure Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propMemory = default; + LocalJsonValue propMemory = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propMemory.TryReadProperty(ref reader, options, PropMemory, null)) @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class IndexingPressure { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public IndexingPressure(Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemory memory) + public IndexingPressure(Elastic.Clients.Elasticsearch.Nodes.IndexingPressureMemory memory) { Memory = memory; } @@ -91,5 +91,5 @@ internal IndexingPressure(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemory Memory { get; set; } + Elastic.Clients.Elasticsearch.Nodes.IndexingPressureMemory Memory { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemory.g.cs deleted file mode 100644 index 7ce1c7b24a4..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemory.g.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Linq; -using Elastic.Clients.Elasticsearch.Serialization; - -namespace Elastic.Clients.Elasticsearch.Cluster; - -internal sealed partial class IndexingPressureMemoryConverter : System.Text.Json.Serialization.JsonConverter -{ - private static readonly System.Text.Json.JsonEncodedText PropCurrent = System.Text.Json.JsonEncodedText.Encode("current"); - private static readonly System.Text.Json.JsonEncodedText PropLimitInBytes = System.Text.Json.JsonEncodedText.Encode("limit_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); - - public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemory Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) - { - reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propCurrent = default; - LocalJsonValue propLimitInBytes = default; - LocalJsonValue propTotal = default; - while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) - { - if (propCurrent.TryReadProperty(ref reader, options, PropCurrent, null)) - { - continue; - } - - if (propLimitInBytes.TryReadProperty(ref reader, options, PropLimitInBytes, null)) - { - continue; - } - - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) - { - continue; - } - - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) - { - reader.Skip(); - continue; - } - - throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); - } - - reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) - { - Current = propCurrent.Value, - LimitInBytes = propLimitInBytes.Value, - Total = propTotal.Value - }; - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemory value, System.Text.Json.JsonSerializerOptions options) - { - writer.WriteStartObject(); - writer.WriteProperty(options, PropCurrent, value.Current, null, null); - writer.WriteProperty(options, PropLimitInBytes, value.LimitInBytes, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteEndObject(); - } -} - -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemoryConverter))] -public sealed partial class IndexingPressureMemory -{ - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public IndexingPressureMemory(Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary current, long limitInBytes, Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary total) - { - Current = current; - LimitInBytes = limitInBytes; - Total = total; - } -#if NET7_0_OR_GREATER - public IndexingPressureMemory() - { - } -#endif -#if !NET7_0_OR_GREATER - [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] - public IndexingPressureMemory() - { - } -#endif - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - internal IndexingPressureMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) - { - _ = sentinel; - } - - public -#if NET7_0_OR_GREATER - required -#endif - Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary Current { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - long LimitInBytes { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary Total { get; set; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs deleted file mode 100644 index 4cb765e7b0b..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs +++ /dev/null @@ -1,185 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Linq; -using Elastic.Clients.Elasticsearch.Serialization; - -namespace Elastic.Clients.Elasticsearch.Cluster; - -internal sealed partial class IndexingPressureMemorySummaryConverter : System.Text.Json.Serialization.JsonConverter -{ - private static readonly System.Text.Json.JsonEncodedText PropAllInBytes = System.Text.Json.JsonEncodedText.Encode("all_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropCombinedCoordinatingAndPrimaryInBytes = System.Text.Json.JsonEncodedText.Encode("combined_coordinating_and_primary_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropCoordinatingInBytes = System.Text.Json.JsonEncodedText.Encode("coordinating_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropCoordinatingRejections = System.Text.Json.JsonEncodedText.Encode("coordinating_rejections"); - private static readonly System.Text.Json.JsonEncodedText PropPrimaryInBytes = System.Text.Json.JsonEncodedText.Encode("primary_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropPrimaryRejections = System.Text.Json.JsonEncodedText.Encode("primary_rejections"); - private static readonly System.Text.Json.JsonEncodedText PropReplicaInBytes = System.Text.Json.JsonEncodedText.Encode("replica_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropReplicaRejections = System.Text.Json.JsonEncodedText.Encode("replica_rejections"); - - public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) - { - reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propAllInBytes = default; - LocalJsonValue propCombinedCoordinatingAndPrimaryInBytes = default; - LocalJsonValue propCoordinatingInBytes = default; - LocalJsonValue propCoordinatingRejections = default; - LocalJsonValue propPrimaryInBytes = default; - LocalJsonValue propPrimaryRejections = default; - LocalJsonValue propReplicaInBytes = default; - LocalJsonValue propReplicaRejections = default; - while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) - { - if (propAllInBytes.TryReadProperty(ref reader, options, PropAllInBytes, null)) - { - continue; - } - - if (propCombinedCoordinatingAndPrimaryInBytes.TryReadProperty(ref reader, options, PropCombinedCoordinatingAndPrimaryInBytes, null)) - { - continue; - } - - if (propCoordinatingInBytes.TryReadProperty(ref reader, options, PropCoordinatingInBytes, null)) - { - continue; - } - - if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) - { - continue; - } - - if (propPrimaryInBytes.TryReadProperty(ref reader, options, PropPrimaryInBytes, null)) - { - continue; - } - - if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) - { - continue; - } - - if (propReplicaInBytes.TryReadProperty(ref reader, options, PropReplicaInBytes, null)) - { - continue; - } - - if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) - { - continue; - } - - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) - { - reader.Skip(); - continue; - } - - throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); - } - - reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) - { - AllInBytes = propAllInBytes.Value, - CombinedCoordinatingAndPrimaryInBytes = propCombinedCoordinatingAndPrimaryInBytes.Value, - CoordinatingInBytes = propCoordinatingInBytes.Value, - CoordinatingRejections = propCoordinatingRejections.Value, - PrimaryInBytes = propPrimaryInBytes.Value, - PrimaryRejections = propPrimaryRejections.Value, - ReplicaInBytes = propReplicaInBytes.Value, - ReplicaRejections = propReplicaRejections.Value - }; - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummary value, System.Text.Json.JsonSerializerOptions options) - { - writer.WriteStartObject(); - writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, null); - writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, null); - writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, null); - writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, null); - writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, null); - writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); - writer.WriteEndObject(); - } -} - -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySummaryConverter))] -public sealed partial class IndexingPressureMemorySummary -{ - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public IndexingPressureMemorySummary(long allInBytes, long combinedCoordinatingAndPrimaryInBytes, long coordinatingInBytes, long primaryInBytes, long replicaInBytes) - { - AllInBytes = allInBytes; - CombinedCoordinatingAndPrimaryInBytes = combinedCoordinatingAndPrimaryInBytes; - CoordinatingInBytes = coordinatingInBytes; - PrimaryInBytes = primaryInBytes; - ReplicaInBytes = replicaInBytes; - } -#if NET7_0_OR_GREATER - public IndexingPressureMemorySummary() - { - } -#endif -#if !NET7_0_OR_GREATER - [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] - public IndexingPressureMemorySummary() - { - } -#endif - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - internal IndexingPressureMemorySummary(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) - { - _ = sentinel; - } - - public -#if NET7_0_OR_GREATER - required -#endif - long AllInBytes { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - long CombinedCoordinatingAndPrimaryInBytes { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - long CoordinatingInBytes { get; set; } - public long? CoordinatingRejections { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - long PrimaryInBytes { get; set; } - public long? PrimaryRejections { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - long ReplicaInBytes { get; set; } - public long? ReplicaRejections { get; set; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndicesVersions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndicesVersions.g.cs index 9ebf0cfb08f..8412fd177ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndicesVersions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndicesVersions.g.cs @@ -28,6 +28,7 @@ internal sealed partial class IndicesVersionsConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropIndexCount = System.Text.Json.JsonEncodedText.Encode("index_count"); private static readonly System.Text.Json.JsonEncodedText PropPrimaryShardCount = System.Text.Json.JsonEncodedText.Encode("primary_shard_count"); private static readonly System.Text.Json.JsonEncodedText PropTotalPrimaryBytes = System.Text.Json.JsonEncodedText.Encode("total_primary_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTotalPrimarySize = System.Text.Json.JsonEncodedText.Encode("total_primary_size"); private static readonly System.Text.Json.JsonEncodedText PropVersion = System.Text.Json.JsonEncodedText.Encode("version"); public override Elastic.Clients.Elasticsearch.Cluster.IndicesVersions Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -36,6 +37,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndicesVersions Read(ref S LocalJsonValue propIndexCount = default; LocalJsonValue propPrimaryShardCount = default; LocalJsonValue propTotalPrimaryBytes = default; + LocalJsonValue propTotalPrimarySize = default; LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -54,6 +56,11 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndicesVersions Read(ref S continue; } + if (propTotalPrimarySize.TryReadProperty(ref reader, options, PropTotalPrimarySize, null)) + { + continue; + } + if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) { continue; @@ -74,6 +81,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndicesVersions Read(ref S IndexCount = propIndexCount.Value, PrimaryShardCount = propPrimaryShardCount.Value, TotalPrimaryBytes = propTotalPrimaryBytes.Value, + TotalPrimarySize = propTotalPrimarySize.Value, Version = propVersion.Value }; } @@ -84,6 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndexCount, value.IndexCount, null, null); writer.WriteProperty(options, PropPrimaryShardCount, value.PrimaryShardCount, null, null); writer.WriteProperty(options, PropTotalPrimaryBytes, value.TotalPrimaryBytes, null, null); + writer.WriteProperty(options, PropTotalPrimarySize, value.TotalPrimarySize, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } @@ -132,6 +141,7 @@ internal IndicesVersions(Elastic.Clients.Elasticsearch.Serialization.JsonConstru required #endif long TotalPrimaryBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalPrimarySize { get; set; } public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs index 064097051c6..c1d23bb0e26 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs @@ -25,29 +25,47 @@ namespace Elastic.Clients.Elasticsearch.Cluster; internal sealed partial class OperatingSystemMemoryInfoConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropAdjustedTotal = System.Text.Json.JsonEncodedText.Encode("adjusted_total"); private static readonly System.Text.Json.JsonEncodedText PropAdjustedTotalInBytes = System.Text.Json.JsonEncodedText.Encode("adjusted_total_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropFree = System.Text.Json.JsonEncodedText.Encode("free"); private static readonly System.Text.Json.JsonEncodedText PropFreeInBytes = System.Text.Json.JsonEncodedText.Encode("free_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropFreePercent = System.Text.Json.JsonEncodedText.Encode("free_percent"); + private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); private static readonly System.Text.Json.JsonEncodedText PropTotalInBytes = System.Text.Json.JsonEncodedText.Encode("total_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropUsed = System.Text.Json.JsonEncodedText.Encode("used"); private static readonly System.Text.Json.JsonEncodedText PropUsedInBytes = System.Text.Json.JsonEncodedText.Encode("used_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropUsedPercent = System.Text.Json.JsonEncodedText.Encode("used_percent"); public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAdjustedTotal = default; LocalJsonValue propAdjustedTotalInBytes = default; + LocalJsonValue propFree = default; LocalJsonValue propFreeInBytes = default; LocalJsonValue propFreePercent = default; + LocalJsonValue propTotal = default; LocalJsonValue propTotalInBytes = default; + LocalJsonValue propUsed = default; LocalJsonValue propUsedInBytes = default; LocalJsonValue propUsedPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propAdjustedTotal.TryReadProperty(ref reader, options, PropAdjustedTotal, null)) + { + continue; + } + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } + if (propFree.TryReadProperty(ref reader, options, PropFree, null)) + { + continue; + } + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) { continue; @@ -58,11 +76,21 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo continue; } + if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + { + continue; + } + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) { continue; } + if (propUsed.TryReadProperty(ref reader, options, PropUsed, null)) + { + continue; + } + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) { continue; @@ -85,10 +113,14 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + AdjustedTotal = propAdjustedTotal.Value, AdjustedTotalInBytes = propAdjustedTotalInBytes.Value, + Free = propFree.Value, FreeInBytes = propFreeInBytes.Value, FreePercent = propFreePercent.Value, + Total = propTotal.Value, TotalInBytes = propTotalInBytes.Value, + Used = propUsed.Value, UsedInBytes = propUsedInBytes.Value, UsedPercent = propUsedPercent.Value }; @@ -97,10 +129,14 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropAdjustedTotal, value.AdjustedTotal, null, null); writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFree, value.Free, null, null); writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, null); + writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropUsed, value.Used, null, null); writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); writer.WriteProperty(options, PropUsedPercent, value.UsedPercent, null, null); writer.WriteEndObject(); @@ -136,6 +172,13 @@ internal OperatingSystemMemoryInfo(Elastic.Clients.Elasticsearch.Serialization.J _ = sentinel; } + /// + /// + /// Total amount of memory across all selected nodes, but using the value specified using the es.total_memory_bytes system property instead of measured total memory for those nodes where that system property was set. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? AdjustedTotal { get; set; } + /// /// /// Total amount, in bytes, of memory across all selected nodes, but using the value specified using the es.total_memory_bytes system property instead of measured total memory for those nodes where that system property was set. @@ -143,6 +186,13 @@ internal OperatingSystemMemoryInfo(Elastic.Clients.Elasticsearch.Serialization.J /// public long? AdjustedTotalInBytes { get; set; } + /// + /// + /// Amount of free physical memory across all selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? Free { get; set; } + /// /// /// Amount, in bytes, of free physical memory across all selected nodes. @@ -165,6 +215,13 @@ internal OperatingSystemMemoryInfo(Elastic.Clients.Elasticsearch.Serialization.J #endif int FreePercent { get; set; } + /// + /// + /// Total amount of physical memory across all selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? Total { get; set; } + /// /// /// Total amount, in bytes, of physical memory across all selected nodes. @@ -176,6 +233,13 @@ internal OperatingSystemMemoryInfo(Elastic.Clients.Elasticsearch.Serialization.J #endif long TotalInBytes { get; set; } + /// + /// + /// Amount of physical memory in use across all selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? Used { get; set; } + /// /// /// Amount, in bytes, of physical memory in use across all selected nodes. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/PerRepositoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/PerRepositoryStats.g.cs new file mode 100644 index 00000000000..fe304108163 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/PerRepositoryStats.g.cs @@ -0,0 +1,135 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class PerRepositoryStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropCurrentCounts = System.Text.Json.JsonEncodedText.Encode("current_counts"); + private static readonly System.Text.Json.JsonEncodedText PropOldestStartTime = System.Text.Json.JsonEncodedText.Encode("oldest_start_time"); + private static readonly System.Text.Json.JsonEncodedText PropOldestStartTimeMillis = System.Text.Json.JsonEncodedText.Encode("oldest_start_time_millis"); + private static readonly System.Text.Json.JsonEncodedText PropType = System.Text.Json.JsonEncodedText.Encode("type"); + + public override Elastic.Clients.Elasticsearch.Cluster.PerRepositoryStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propCurrentCounts = default; + LocalJsonValue propOldestStartTime = default; + LocalJsonValue propOldestStartTimeMillis = default; + LocalJsonValue propType = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propCurrentCounts.TryReadProperty(ref reader, options, PropCurrentCounts, null)) + { + continue; + } + + if (propOldestStartTime.TryReadProperty(ref reader, options, PropOldestStartTime, null)) + { + continue; + } + + if (propOldestStartTimeMillis.TryReadProperty(ref reader, options, PropOldestStartTimeMillis, null)) + { + continue; + } + + if (propType.TryReadProperty(ref reader, options, PropType, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.PerRepositoryStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + CurrentCounts = propCurrentCounts.Value, + OldestStartTime = propOldestStartTime.Value, + OldestStartTimeMillis = propOldestStartTimeMillis.Value, + Type = propType.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.PerRepositoryStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropCurrentCounts, value.CurrentCounts, null, null); + writer.WriteProperty(options, PropOldestStartTime, value.OldestStartTime, null, null); + writer.WriteProperty(options, PropOldestStartTimeMillis, value.OldestStartTimeMillis, null, null); + writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.PerRepositoryStatsConverter))] +public sealed partial class PerRepositoryStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PerRepositoryStats(Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsCurrentCounts currentCounts, long oldestStartTimeMillis, string type) + { + CurrentCounts = currentCounts; + OldestStartTimeMillis = oldestStartTimeMillis; + Type = type; + } +#if NET7_0_OR_GREATER + public PerRepositoryStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public PerRepositoryStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal PerRepositoryStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsCurrentCounts CurrentCounts { get; set; } + public string? OldestStartTime { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long OldestStartTimeMillis { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + string Type { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RemoteClusterInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RemoteClusterInfo.g.cs index 77265b62d28..3698ba0a69f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RemoteClusterInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RemoteClusterInfo.g.cs @@ -38,7 +38,7 @@ internal sealed partial class RemoteClusterInfoConverter : System.Text.Json.Seri private static readonly System.Text.Json.JsonEncodedText PropShardsCount = System.Text.Json.JsonEncodedText.Encode("shards_count"); private static readonly System.Text.Json.JsonEncodedText PropSkipUnavailable = System.Text.Json.JsonEncodedText.Encode("skip_unavailable"); private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status"); - private static readonly System.Text.Json.JsonEncodedText PropTransportCompress = System.Text.Json.JsonEncodedText.Encode("transport_compress"); + private static readonly System.Text.Json.JsonEncodedText PropTransportCompress = System.Text.Json.JsonEncodedText.Encode("transport.compress"); private static readonly System.Text.Json.JsonEncodedText PropVersion = System.Text.Json.JsonEncodedText.Encode("version"); public override Elastic.Clients.Elasticsearch.Cluster.RemoteClusterInfo Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsCurrentCounts.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsCurrentCounts.g.cs new file mode 100644 index 00000000000..62a4b8bde65 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsCurrentCounts.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class RepositoryStatsCurrentCountsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropActiveDeletions = System.Text.Json.JsonEncodedText.Encode("active_deletions"); + private static readonly System.Text.Json.JsonEncodedText PropClones = System.Text.Json.JsonEncodedText.Encode("clones"); + private static readonly System.Text.Json.JsonEncodedText PropDeletions = System.Text.Json.JsonEncodedText.Encode("deletions"); + private static readonly System.Text.Json.JsonEncodedText PropFinalizations = System.Text.Json.JsonEncodedText.Encode("finalizations"); + private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("shards"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotDeletions = System.Text.Json.JsonEncodedText.Encode("snapshot_deletions"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshots = System.Text.Json.JsonEncodedText.Encode("snapshots"); + + public override Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsCurrentCounts Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propActiveDeletions = default; + LocalJsonValue propClones = default; + LocalJsonValue propDeletions = default; + LocalJsonValue propFinalizations = default; + LocalJsonValue propShards = default; + LocalJsonValue propSnapshotDeletions = default; + LocalJsonValue propSnapshots = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propActiveDeletions.TryReadProperty(ref reader, options, PropActiveDeletions, null)) + { + continue; + } + + if (propClones.TryReadProperty(ref reader, options, PropClones, null)) + { + continue; + } + + if (propDeletions.TryReadProperty(ref reader, options, PropDeletions, null)) + { + continue; + } + + if (propFinalizations.TryReadProperty(ref reader, options, PropFinalizations, null)) + { + continue; + } + + if (propShards.TryReadProperty(ref reader, options, PropShards, null)) + { + continue; + } + + if (propSnapshotDeletions.TryReadProperty(ref reader, options, PropSnapshotDeletions, null)) + { + continue; + } + + if (propSnapshots.TryReadProperty(ref reader, options, PropSnapshots, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsCurrentCounts(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + ActiveDeletions = propActiveDeletions.Value, + Clones = propClones.Value, + Deletions = propDeletions.Value, + Finalizations = propFinalizations.Value, + Shards = propShards.Value, + SnapshotDeletions = propSnapshotDeletions.Value, + Snapshots = propSnapshots.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsCurrentCounts value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropActiveDeletions, value.ActiveDeletions, null, null); + writer.WriteProperty(options, PropClones, value.Clones, null, null); + writer.WriteProperty(options, PropDeletions, value.Deletions, null, null); + writer.WriteProperty(options, PropFinalizations, value.Finalizations, null, null); + writer.WriteProperty(options, PropShards, value.Shards, null, null); + writer.WriteProperty(options, PropSnapshotDeletions, value.SnapshotDeletions, null, null); + writer.WriteProperty(options, PropSnapshots, value.Snapshots, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsCurrentCountsConverter))] +public sealed partial class RepositoryStatsCurrentCounts +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RepositoryStatsCurrentCounts(int activeDeletions, int clones, int deletions, int finalizations, Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsShards shards, int snapshotDeletions, int snapshots) + { + ActiveDeletions = activeDeletions; + Clones = clones; + Deletions = deletions; + Finalizations = finalizations; + Shards = shards; + SnapshotDeletions = snapshotDeletions; + Snapshots = snapshots; + } +#if NET7_0_OR_GREATER + public RepositoryStatsCurrentCounts() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public RepositoryStatsCurrentCounts() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal RepositoryStatsCurrentCounts(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + int ActiveDeletions { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int Clones { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int Deletions { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int Finalizations { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsShards Shards { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int SnapshotDeletions { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int Snapshots { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsShards.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsShards.g.cs new file mode 100644 index 00000000000..9ff7c0ae711 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/RepositoryStatsShards.g.cs @@ -0,0 +1,140 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class RepositoryStatsShardsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropComplete = System.Text.Json.JsonEncodedText.Encode("complete"); + private static readonly System.Text.Json.JsonEncodedText PropIncomplete = System.Text.Json.JsonEncodedText.Encode("incomplete"); + private static readonly System.Text.Json.JsonEncodedText PropStates = System.Text.Json.JsonEncodedText.Encode("states"); + private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); + + public override Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsShards Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propComplete = default; + LocalJsonValue propIncomplete = default; + LocalJsonValue> propStates = default; + LocalJsonValue propTotal = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propComplete.TryReadProperty(ref reader, options, PropComplete, null)) + { + continue; + } + + if (propIncomplete.TryReadProperty(ref reader, options, PropIncomplete, null)) + { + continue; + } + + if (propStates.TryReadProperty(ref reader, options, PropStates, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsShards(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Complete = propComplete.Value, + Incomplete = propIncomplete.Value, + States = propStates.Value, + Total = propTotal.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsShards value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropComplete, value.Complete, null, null); + writer.WriteProperty(options, PropIncomplete, value.Incomplete, null, null); + writer.WriteProperty(options, PropStates, value.States, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.RepositoryStatsShardsConverter))] +public sealed partial class RepositoryStatsShards +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RepositoryStatsShards(int complete, int incomplete, System.Collections.Generic.IReadOnlyDictionary states, int total) + { + Complete = complete; + Incomplete = incomplete; + States = states; + Total = total; + } +#if NET7_0_OR_GREATER + public RepositoryStatsShards() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public RepositoryStatsShards() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal RepositoryStatsShards(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + int Complete { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int Incomplete { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary States { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int Total { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SearchUsageStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SearchUsageStats.g.cs new file mode 100644 index 00000000000..0ad308cf849 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SearchUsageStats.g.cs @@ -0,0 +1,155 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class SearchUsageStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropQueries = System.Text.Json.JsonEncodedText.Encode("queries"); + private static readonly System.Text.Json.JsonEncodedText PropRescorers = System.Text.Json.JsonEncodedText.Encode("rescorers"); + private static readonly System.Text.Json.JsonEncodedText PropRetrievers = System.Text.Json.JsonEncodedText.Encode("retrievers"); + private static readonly System.Text.Json.JsonEncodedText PropSections = System.Text.Json.JsonEncodedText.Encode("sections"); + private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); + + public override Elastic.Clients.Elasticsearch.Cluster.SearchUsageStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue> propQueries = default; + LocalJsonValue> propRescorers = default; + LocalJsonValue> propRetrievers = default; + LocalJsonValue> propSections = default; + LocalJsonValue propTotal = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propQueries.TryReadProperty(ref reader, options, PropQueries, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (propRescorers.TryReadProperty(ref reader, options, PropRescorers, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (propRetrievers.TryReadProperty(ref reader, options, PropRetrievers, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (propSections.TryReadProperty(ref reader, options, PropSections, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + { + continue; + } + + if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.SearchUsageStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Queries = propQueries.Value, + Rescorers = propRescorers.Value, + Retrievers = propRetrievers.Value, + Sections = propSections.Value, + Total = propTotal.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.SearchUsageStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropQueries, value.Queries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRescorers, value.Rescorers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRetrievers, value.Retrievers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropSections, value.Sections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.SearchUsageStatsConverter))] +public sealed partial class SearchUsageStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SearchUsageStats(System.Collections.Generic.IReadOnlyDictionary queries, System.Collections.Generic.IReadOnlyDictionary rescorers, System.Collections.Generic.IReadOnlyDictionary retrievers, System.Collections.Generic.IReadOnlyDictionary sections, long total) + { + Queries = queries; + Rescorers = rescorers; + Retrievers = retrievers; + Sections = sections; + Total = total; + } +#if NET7_0_OR_GREATER + public SearchUsageStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public SearchUsageStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SearchUsageStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary Queries { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary Rescorers { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary Retrievers { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.IReadOnlyDictionary Sections { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long Total { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SnapshotCurrentCounts.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SnapshotCurrentCounts.g.cs new file mode 100644 index 00000000000..7a21c0e38ae --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SnapshotCurrentCounts.g.cs @@ -0,0 +1,184 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class SnapshotCurrentCountsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropCleanups = System.Text.Json.JsonEncodedText.Encode("cleanups"); + private static readonly System.Text.Json.JsonEncodedText PropConcurrentOperations = System.Text.Json.JsonEncodedText.Encode("concurrent_operations"); + private static readonly System.Text.Json.JsonEncodedText PropShardSnapshots = System.Text.Json.JsonEncodedText.Encode("shard_snapshots"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotDeletions = System.Text.Json.JsonEncodedText.Encode("snapshot_deletions"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshots = System.Text.Json.JsonEncodedText.Encode("snapshots"); + + public override Elastic.Clients.Elasticsearch.Cluster.SnapshotCurrentCounts Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propCleanups = default; + LocalJsonValue propConcurrentOperations = default; + LocalJsonValue propShardSnapshots = default; + LocalJsonValue propSnapshotDeletions = default; + LocalJsonValue propSnapshots = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propCleanups.TryReadProperty(ref reader, options, PropCleanups, null)) + { + continue; + } + + if (propConcurrentOperations.TryReadProperty(ref reader, options, PropConcurrentOperations, null)) + { + continue; + } + + if (propShardSnapshots.TryReadProperty(ref reader, options, PropShardSnapshots, null)) + { + continue; + } + + if (propSnapshotDeletions.TryReadProperty(ref reader, options, PropSnapshotDeletions, null)) + { + continue; + } + + if (propSnapshots.TryReadProperty(ref reader, options, PropSnapshots, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.SnapshotCurrentCounts(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Cleanups = propCleanups.Value, + ConcurrentOperations = propConcurrentOperations.Value, + ShardSnapshots = propShardSnapshots.Value, + SnapshotDeletions = propSnapshotDeletions.Value, + Snapshots = propSnapshots.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.SnapshotCurrentCounts value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropCleanups, value.Cleanups, null, null); + writer.WriteProperty(options, PropConcurrentOperations, value.ConcurrentOperations, null, null); + writer.WriteProperty(options, PropShardSnapshots, value.ShardSnapshots, null, null); + writer.WriteProperty(options, PropSnapshotDeletions, value.SnapshotDeletions, null, null); + writer.WriteProperty(options, PropSnapshots, value.Snapshots, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.SnapshotCurrentCountsConverter))] +public sealed partial class SnapshotCurrentCounts +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SnapshotCurrentCounts(int cleanups, int concurrentOperations, int shardSnapshots, int snapshotDeletions, int snapshots) + { + Cleanups = cleanups; + ConcurrentOperations = concurrentOperations; + ShardSnapshots = shardSnapshots; + SnapshotDeletions = snapshotDeletions; + Snapshots = snapshots; + } +#if NET7_0_OR_GREATER + public SnapshotCurrentCounts() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public SnapshotCurrentCounts() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SnapshotCurrentCounts(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Cleanups in progress, not counted in concurrent_operations as they are not concurrent + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + int Cleanups { get; set; } + + /// + /// + /// Sum of snapshots and snapshot_deletions + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + int ConcurrentOperations { get; set; } + + /// + /// + /// Incomplete shard snapshots + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + int ShardSnapshots { get; set; } + + /// + /// + /// Snapshots deletions in progress + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + int SnapshotDeletions { get; set; } + + /// + /// + /// Snapshots currently in progress + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + int Snapshots { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SparseVectorStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SparseVectorStats.g.cs new file mode 100644 index 00000000000..ef3ff1fbf6a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SparseVectorStats.g.cs @@ -0,0 +1,95 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class SparseVectorStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropValueCount = System.Text.Json.JsonEncodedText.Encode("value_count"); + + public override Elastic.Clients.Elasticsearch.Cluster.SparseVectorStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propValueCount = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propValueCount.TryReadProperty(ref reader, options, PropValueCount, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.SparseVectorStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + ValueCount = propValueCount.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.SparseVectorStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropValueCount, value.ValueCount, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.SparseVectorStatsConverter))] +public sealed partial class SparseVectorStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SparseVectorStats(long valueCount) + { + ValueCount = valueCount; + } +#if NET7_0_OR_GREATER + public SparseVectorStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public SparseVectorStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SparseVectorStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + long ValueCount { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SynonymsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SynonymsStats.g.cs new file mode 100644 index 00000000000..bc059b5063c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/SynonymsStats.g.cs @@ -0,0 +1,110 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Cluster; + +internal sealed partial class SynonymsStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropCount = System.Text.Json.JsonEncodedText.Encode("count"); + private static readonly System.Text.Json.JsonEncodedText PropIndexCount = System.Text.Json.JsonEncodedText.Encode("index_count"); + + public override Elastic.Clients.Elasticsearch.Cluster.SynonymsStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propCount = default; + LocalJsonValue propIndexCount = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + { + continue; + } + + if (propIndexCount.TryReadProperty(ref reader, options, PropIndexCount, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Cluster.SynonymsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Count = propCount.Value, + IndexCount = propIndexCount.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.SynonymsStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropIndexCount, value.IndexCount, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.SynonymsStatsConverter))] +public sealed partial class SynonymsStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SynonymsStats(int count, int indexCount) + { + Count = count; + IndexCount = indexCount; + } +#if NET7_0_OR_GREATER + public SynonymsStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public SynonymsStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SynonymsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + int Count { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int IndexCount { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs index d8e4c8b14ff..62ba1ccd009 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs @@ -27,12 +27,16 @@ internal sealed partial class DocStatsConverter : System.Text.Json.Serialization { private static readonly System.Text.Json.JsonEncodedText PropCount = System.Text.Json.JsonEncodedText.Encode("count"); private static readonly System.Text.Json.JsonEncodedText PropDeleted = System.Text.Json.JsonEncodedText.Encode("deleted"); + private static readonly System.Text.Json.JsonEncodedText PropTotalSize = System.Text.Json.JsonEncodedText.Encode("total_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalSizeInBytes = System.Text.Json.JsonEncodedText.Encode("total_size_in_bytes"); public override Elastic.Clients.Elasticsearch.DocStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propCount = default; LocalJsonValue propDeleted = default; + LocalJsonValue propTotalSize = default; + LocalJsonValue propTotalSizeInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propCount.TryReadProperty(ref reader, options, PropCount, null)) @@ -45,6 +49,16 @@ public override Elastic.Clients.Elasticsearch.DocStats Read(ref System.Text.Json continue; } + if (propTotalSize.TryReadProperty(ref reader, options, PropTotalSize, null)) + { + continue; + } + + if (propTotalSizeInBytes.TryReadProperty(ref reader, options, PropTotalSizeInBytes, null)) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -58,7 +72,9 @@ public override Elastic.Clients.Elasticsearch.DocStats Read(ref System.Text.Json return new Elastic.Clients.Elasticsearch.DocStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Count = propCount.Value, - Deleted = propDeleted.Value + Deleted = propDeleted.Value, + TotalSize = propTotalSize.Value, + TotalSizeInBytes = propTotalSizeInBytes.Value }; } @@ -67,6 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSize, value.TotalSize, null, null); + writer.WriteProperty(options, PropTotalSizeInBytes, value.TotalSizeInBytes, null, null); writer.WriteEndObject(); } } @@ -75,9 +93,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class DocStats { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public DocStats(long count) + public DocStats(long count, long totalSizeInBytes) { Count = count; + TotalSizeInBytes = totalSizeInBytes; } #if NET7_0_OR_GREATER public DocStats() @@ -116,4 +135,23 @@ internal DocStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSen /// /// public long? Deleted { get; set; } + + /// + /// + /// Human readable total_size_in_bytes + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? TotalSize { get; set; } + + /// + /// + /// Returns the total size in bytes of all documents in this stats. + /// This value may be more reliable than store_stats.size_in_bytes in estimating the index size. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + long TotalSizeInBytes { get; set; } } \ 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 index e7c8ad7694b..8cf6d5da5fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs @@ -261,6 +261,10 @@ internal ElasticsearchVersionInfo(Elastic.Clients.Elasticsearch.Serialization.Js /// /// The Elasticsearch version number. /// + /// + /// ::: IMPORTANT: For Serverless deployments, this static value is always 8.11.0 and is used solely for backward compatibility with legacy clients. + /// Serverless environments are versionless and automatically upgraded, so this value can be safely ignored. + /// /// public #if NET7_0_OR_GREATER diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Cluster.g.cs index c6f0bc8e309..5add7364e77 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Cluster.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Cluster.g.cs @@ -488,6 +488,147 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } +internal sealed partial class ShardStateConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberAborted = System.Text.Json.JsonEncodedText.Encode("ABORTED"); + private static readonly System.Text.Json.JsonEncodedText MemberFailed = System.Text.Json.JsonEncodedText.Encode("FAILED"); + private static readonly System.Text.Json.JsonEncodedText MemberInit = System.Text.Json.JsonEncodedText.Encode("INIT"); + private static readonly System.Text.Json.JsonEncodedText MemberMissing = System.Text.Json.JsonEncodedText.Encode("MISSING"); + private static readonly System.Text.Json.JsonEncodedText MemberPausedForNodeRemoval = System.Text.Json.JsonEncodedText.Encode("PAUSED_FOR_NODE_REMOVAL"); + private static readonly System.Text.Json.JsonEncodedText MemberQueued = System.Text.Json.JsonEncodedText.Encode("QUEUED"); + private static readonly System.Text.Json.JsonEncodedText MemberSuccess = System.Text.Json.JsonEncodedText.Encode("SUCCESS"); + private static readonly System.Text.Json.JsonEncodedText MemberWaiting = System.Text.Json.JsonEncodedText.Encode("WAITING"); + + public override Elastic.Clients.Elasticsearch.Cluster.ShardState Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberAborted)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Aborted; + } + + if (reader.ValueTextEquals(MemberFailed)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Failed; + } + + if (reader.ValueTextEquals(MemberInit)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Init; + } + + if (reader.ValueTextEquals(MemberMissing)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Missing; + } + + if (reader.ValueTextEquals(MemberPausedForNodeRemoval)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.PausedForNodeRemoval; + } + + if (reader.ValueTextEquals(MemberQueued)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Queued; + } + + if (reader.ValueTextEquals(MemberSuccess)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Success; + } + + if (reader.ValueTextEquals(MemberWaiting)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Waiting; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberAborted.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Aborted; + } + + if (string.Equals(value, MemberFailed.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Failed; + } + + if (string.Equals(value, MemberInit.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Init; + } + + if (string.Equals(value, MemberMissing.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Missing; + } + + if (string.Equals(value, MemberPausedForNodeRemoval.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.PausedForNodeRemoval; + } + + if (string.Equals(value, MemberQueued.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Queued; + } + + if (string.Equals(value, MemberSuccess.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Success; + } + + if (string.Equals(value, MemberWaiting.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Cluster.ShardState.Waiting; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Cluster.ShardState)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ShardState value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Aborted: + writer.WriteStringValue(MemberAborted); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Failed: + writer.WriteStringValue(MemberFailed); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Init: + writer.WriteStringValue(MemberInit); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Missing: + writer.WriteStringValue(MemberMissing); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.PausedForNodeRemoval: + writer.WriteStringValue(MemberPausedForNodeRemoval); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Queued: + writer.WriteStringValue(MemberQueued); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Success: + writer.WriteStringValue(MemberSuccess); + break; + case Elastic.Clients.Elasticsearch.Cluster.ShardState.Waiting: + writer.WriteStringValue(MemberWaiting); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Cluster.ShardState)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Cluster.ShardState ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ShardState value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.AllocationExplainDecisionConverter))] public enum AllocationExplainDecision { @@ -555,4 +696,25 @@ public enum UnassignedInformationReason ReplicaAdded, [System.Runtime.Serialization.EnumMember(Value = "REROUTE_CANCELLED")] RerouteCancelled +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.ShardStateConverter))] +public enum ShardState +{ + [System.Runtime.Serialization.EnumMember(Value = "ABORTED")] + Aborted, + [System.Runtime.Serialization.EnumMember(Value = "FAILED")] + Failed, + [System.Runtime.Serialization.EnumMember(Value = "INIT")] + Init, + [System.Runtime.Serialization.EnumMember(Value = "MISSING")] + Missing, + [System.Runtime.Serialization.EnumMember(Value = "PAUSED_FOR_NODE_REMOVAL")] + PausedForNodeRemoval, + [System.Runtime.Serialization.EnumMember(Value = "QUEUED")] + Queued, + [System.Runtime.Serialization.EnumMember(Value = "SUCCESS")] + Success, + [System.Runtime.Serialization.EnumMember(Value = "WAITING")] + Waiting } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs index c8dcb840c1c..e30ce85921e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs @@ -27,6 +27,7 @@ internal sealed partial class IndicatorHealthStatusConverter : System.Text.Json. { private static readonly System.Text.Json.JsonEncodedText MemberGreen = System.Text.Json.JsonEncodedText.Encode("green"); private static readonly System.Text.Json.JsonEncodedText MemberRed = System.Text.Json.JsonEncodedText.Encode("red"); + private static readonly System.Text.Json.JsonEncodedText MemberUnavailable = System.Text.Json.JsonEncodedText.Encode("unavailable"); private static readonly System.Text.Json.JsonEncodedText MemberUnknown = System.Text.Json.JsonEncodedText.Encode("unknown"); private static readonly System.Text.Json.JsonEncodedText MemberYellow = System.Text.Json.JsonEncodedText.Encode("yellow"); @@ -42,6 +43,11 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthS return Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Red; } + if (reader.ValueTextEquals(MemberUnavailable)) + { + return Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Unavailable; + } + if (reader.ValueTextEquals(MemberUnknown)) { return Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Unknown; @@ -63,6 +69,11 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthS return Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Red; } + if (string.Equals(value, MemberUnavailable.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Unavailable; + } + if (string.Equals(value, MemberUnknown.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Unknown; @@ -86,6 +97,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Red: writer.WriteStringValue(MemberRed); break; + case Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Unavailable: + writer.WriteStringValue(MemberUnavailable); + break; case Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus.Unknown: writer.WriteStringValue(MemberUnknown); break; @@ -200,6 +214,8 @@ public enum IndicatorHealthStatus Green, [System.Runtime.Serialization.EnumMember(Value = "red")] Red, + [System.Runtime.Serialization.EnumMember(Value = "unavailable")] + Unavailable, [System.Runtime.Serialization.EnumMember(Value = "unknown")] Unknown, [System.Runtime.Serialization.EnumMember(Value = "yellow")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs index aa8505e7cf0..2cd4702d5df 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs @@ -360,6 +360,8 @@ internal sealed partial class HealthStatusConverter : System.Text.Json.Serializa private static readonly System.Text.Json.JsonEncodedText MemberGreen1 = System.Text.Json.JsonEncodedText.Encode("GREEN"); private static readonly System.Text.Json.JsonEncodedText MemberRed = System.Text.Json.JsonEncodedText.Encode("red"); private static readonly System.Text.Json.JsonEncodedText MemberRed1 = System.Text.Json.JsonEncodedText.Encode("RED"); + private static readonly System.Text.Json.JsonEncodedText MemberUnavailable = System.Text.Json.JsonEncodedText.Encode("unavailable"); + private static readonly System.Text.Json.JsonEncodedText MemberUnknown = System.Text.Json.JsonEncodedText.Encode("unknown"); private static readonly System.Text.Json.JsonEncodedText MemberYellow = System.Text.Json.JsonEncodedText.Encode("yellow"); private static readonly System.Text.Json.JsonEncodedText MemberYellow1 = System.Text.Json.JsonEncodedText.Encode("YELLOW"); @@ -375,6 +377,16 @@ public override Elastic.Clients.Elasticsearch.HealthStatus Read(ref System.Text. return Elastic.Clients.Elasticsearch.HealthStatus.Red; } + if (reader.ValueTextEquals(MemberUnavailable)) + { + return Elastic.Clients.Elasticsearch.HealthStatus.Unavailable; + } + + if (reader.ValueTextEquals(MemberUnknown)) + { + return Elastic.Clients.Elasticsearch.HealthStatus.Unknown; + } + if (reader.ValueTextEquals(MemberYellow) || reader.ValueTextEquals(MemberYellow1)) { return Elastic.Clients.Elasticsearch.HealthStatus.Yellow; @@ -391,6 +403,16 @@ public override Elastic.Clients.Elasticsearch.HealthStatus Read(ref System.Text. return Elastic.Clients.Elasticsearch.HealthStatus.Red; } + if (string.Equals(value, MemberUnavailable.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.HealthStatus.Unavailable; + } + + if (string.Equals(value, MemberUnknown.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.HealthStatus.Unknown; + } + if (string.Equals(value, MemberYellow.Value, System.StringComparison.OrdinalIgnoreCase) || string.Equals(value, MemberYellow1.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.HealthStatus.Yellow; @@ -409,6 +431,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case Elastic.Clients.Elasticsearch.HealthStatus.Red: writer.WriteStringValue(MemberRed); break; + case Elastic.Clients.Elasticsearch.HealthStatus.Unavailable: + writer.WriteStringValue(MemberUnavailable); + break; + case Elastic.Clients.Elasticsearch.HealthStatus.Unknown: + writer.WriteStringValue(MemberUnknown); + break; case Elastic.Clients.Elasticsearch.HealthStatus.Yellow: writer.WriteStringValue(MemberYellow); break; @@ -612,63 +640,6 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } -internal sealed partial class OpTypeConverter : System.Text.Json.Serialization.JsonConverter -{ - private static readonly System.Text.Json.JsonEncodedText MemberCreate = System.Text.Json.JsonEncodedText.Encode("create"); - private static readonly System.Text.Json.JsonEncodedText MemberIndex = System.Text.Json.JsonEncodedText.Encode("index"); - - public override Elastic.Clients.Elasticsearch.OpType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) - { - if (reader.ValueTextEquals(MemberCreate)) - { - return Elastic.Clients.Elasticsearch.OpType.Create; - } - - if (reader.ValueTextEquals(MemberIndex)) - { - return Elastic.Clients.Elasticsearch.OpType.Index; - } - - var value = reader.GetString()!; - if (string.Equals(value, MemberCreate.Value, System.StringComparison.OrdinalIgnoreCase)) - { - return Elastic.Clients.Elasticsearch.OpType.Create; - } - - if (string.Equals(value, MemberIndex.Value, System.StringComparison.OrdinalIgnoreCase)) - { - return Elastic.Clients.Elasticsearch.OpType.Index; - } - - throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.OpType)}'."); - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.OpType value, System.Text.Json.JsonSerializerOptions options) - { - switch (value) - { - case Elastic.Clients.Elasticsearch.OpType.Create: - writer.WriteStringValue(MemberCreate); - break; - case Elastic.Clients.Elasticsearch.OpType.Index: - writer.WriteStringValue(MemberIndex); - break; - default: - throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.OpType)}'."); - } - } - - public override Elastic.Clients.Elasticsearch.OpType ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) - { - return Read(ref reader, typeToConvert, options); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.OpType value, System.Text.Json.JsonSerializerOptions options) - { - Write(writer, value, options); - } -} - internal sealed partial class VersionTypeConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText MemberExternal = System.Text.Json.JsonEncodedText.Encode("external"); @@ -811,6 +782,63 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } +internal sealed partial class OpTypeConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCreate = System.Text.Json.JsonEncodedText.Encode("create"); + private static readonly System.Text.Json.JsonEncodedText MemberIndex = System.Text.Json.JsonEncodedText.Encode("index"); + + public override Elastic.Clients.Elasticsearch.OpType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCreate)) + { + return Elastic.Clients.Elasticsearch.OpType.Create; + } + + if (reader.ValueTextEquals(MemberIndex)) + { + return Elastic.Clients.Elasticsearch.OpType.Index; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCreate.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.OpType.Create; + } + + if (string.Equals(value, MemberIndex.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.OpType.Index; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.OpType)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.OpType value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.OpType.Create: + writer.WriteStringValue(MemberCreate); + break; + case Elastic.Clients.Elasticsearch.OpType.Index: + writer.WriteStringValue(MemberIndex); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.OpType)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.OpType ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.OpType value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + internal sealed partial class ThreadTypeConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText MemberBlock = System.Text.Json.JsonEncodedText.Encode("block"); @@ -2955,6 +2983,10 @@ public enum HealthStatus /// [System.Runtime.Serialization.EnumMember(Value = "red")] Red, + [System.Runtime.Serialization.EnumMember(Value = "unavailable")] + Unavailable, + [System.Runtime.Serialization.EnumMember(Value = "unknown")] + Unknown, /// /// /// All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired. @@ -2992,25 +3024,6 @@ public enum WaitForEvents Urgent } -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.OpTypeConverter))] -public enum OpType -{ - /// - /// - /// Only index documents that do not already exist. - /// - /// - [System.Runtime.Serialization.EnumMember(Value = "create")] - Create, - /// - /// - /// Overwrite any documents that already exist. - /// - /// - [System.Runtime.Serialization.EnumMember(Value = "index")] - Index -} - [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.VersionTypeConverter))] public enum VersionType { @@ -3065,6 +3078,25 @@ public enum Conflicts Proceed } +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.OpTypeConverter))] +public enum OpType +{ + /// + /// + /// Only index documents that do not already exist. + /// + /// + [System.Runtime.Serialization.EnumMember(Value = "create")] + Create, + /// + /// + /// Overwrite any documents that already exist. + /// + /// + [System.Runtime.Serialization.EnumMember(Value = "index")] + Index +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.ThreadTypeConverter))] public enum ThreadType { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs index c55141c52f4..5401d0a38d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs @@ -27,6 +27,7 @@ internal sealed partial class FielddataStatsConverter : System.Text.Json.Seriali { private static readonly System.Text.Json.JsonEncodedText PropEvictions = System.Text.Json.JsonEncodedText.Encode("evictions"); private static readonly System.Text.Json.JsonEncodedText PropFields = System.Text.Json.JsonEncodedText.Encode("fields"); + private static readonly System.Text.Json.JsonEncodedText PropGlobalOrdinals = System.Text.Json.JsonEncodedText.Encode("global_ordinals"); private static readonly System.Text.Json.JsonEncodedText PropMemorySize = System.Text.Json.JsonEncodedText.Encode("memory_size"); private static readonly System.Text.Json.JsonEncodedText PropMemorySizeInBytes = System.Text.Json.JsonEncodedText.Encode("memory_size_in_bytes"); @@ -35,6 +36,7 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propEvictions = default; LocalJsonValue?> propFields = default; + LocalJsonValue propGlobalOrdinals = default; LocalJsonValue propMemorySize = default; LocalJsonValue propMemorySizeInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -49,6 +51,11 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex continue; } + if (propGlobalOrdinals.TryReadProperty(ref reader, options, PropGlobalOrdinals, null)) + { + continue; + } + if (propMemorySize.TryReadProperty(ref reader, options, PropMemorySize, null)) { continue; @@ -73,6 +80,7 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex { Evictions = propEvictions.Value, Fields = propFields.Value, + GlobalOrdinals = propGlobalOrdinals.Value, MemorySize = propMemorySize.Value, MemorySizeInBytes = propMemorySizeInBytes.Value }; @@ -83,6 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEvictions, value.Evictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropGlobalOrdinals, value.GlobalOrdinals, null, null); writer.WriteProperty(options, PropMemorySize, value.MemorySize, null, null); writer.WriteProperty(options, PropMemorySizeInBytes, value.MemorySizeInBytes, null, null); writer.WriteEndObject(); @@ -93,8 +102,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class FielddataStats { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public FielddataStats(long memorySizeInBytes) + public FielddataStats(Elastic.Clients.Elasticsearch.GlobalOrdinalsStats globalOrdinals, long memorySizeInBytes) { + GlobalOrdinals = globalOrdinals; MemorySizeInBytes = memorySizeInBytes; } #if NET7_0_OR_GREATER @@ -116,6 +126,11 @@ internal FielddataStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc public long? Evictions { get; set; } public System.Collections.Generic.IReadOnlyDictionary? Fields { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.GlobalOrdinalsStats GlobalOrdinals { get; set; } public Elastic.Clients.Elasticsearch.ByteSize? MemorySize { get; set; } public #if NET7_0_OR_GREATER diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalFieldStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalFieldStats.g.cs new file mode 100644 index 00000000000..433ea30209f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalFieldStats.g.cs @@ -0,0 +1,120 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class GlobalOrdinalFieldStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropBuildTime = System.Text.Json.JsonEncodedText.Encode("build_time"); + private static readonly System.Text.Json.JsonEncodedText PropBuildTimeInMillis = System.Text.Json.JsonEncodedText.Encode("build_time_in_millis"); + private static readonly System.Text.Json.JsonEncodedText PropShardMaxValueCount = System.Text.Json.JsonEncodedText.Encode("shard_max_value_count"); + + public override Elastic.Clients.Elasticsearch.GlobalOrdinalFieldStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propBuildTime = default; + LocalJsonValue propBuildTimeInMillis = default; + LocalJsonValue propShardMaxValueCount = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propBuildTime.TryReadProperty(ref reader, options, PropBuildTime, null)) + { + continue; + } + + if (propBuildTimeInMillis.TryReadProperty(ref reader, options, PropBuildTimeInMillis, null)) + { + continue; + } + + if (propShardMaxValueCount.TryReadProperty(ref reader, options, PropShardMaxValueCount, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.GlobalOrdinalFieldStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + BuildTime = propBuildTime.Value, + BuildTimeInMillis = propBuildTimeInMillis.Value, + ShardMaxValueCount = propShardMaxValueCount.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.GlobalOrdinalFieldStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropBuildTime, value.BuildTime, null, null); + writer.WriteProperty(options, PropBuildTimeInMillis, value.BuildTimeInMillis, null, null); + writer.WriteProperty(options, PropShardMaxValueCount, value.ShardMaxValueCount, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.GlobalOrdinalFieldStatsConverter))] +public sealed partial class GlobalOrdinalFieldStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GlobalOrdinalFieldStats(long buildTimeInMillis, long shardMaxValueCount) + { + BuildTimeInMillis = buildTimeInMillis; + ShardMaxValueCount = shardMaxValueCount; + } +#if NET7_0_OR_GREATER + public GlobalOrdinalFieldStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public GlobalOrdinalFieldStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal GlobalOrdinalFieldStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public string? BuildTime { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long BuildTimeInMillis { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long ShardMaxValueCount { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalsStats.g.cs new file mode 100644 index 00000000000..8c90ed483b9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GlobalOrdinalsStats.g.cs @@ -0,0 +1,115 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +internal sealed partial class GlobalOrdinalsStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropBuildTime = System.Text.Json.JsonEncodedText.Encode("build_time"); + private static readonly System.Text.Json.JsonEncodedText PropBuildTimeInMillis = System.Text.Json.JsonEncodedText.Encode("build_time_in_millis"); + private static readonly System.Text.Json.JsonEncodedText PropFields = System.Text.Json.JsonEncodedText.Encode("fields"); + + public override Elastic.Clients.Elasticsearch.GlobalOrdinalsStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propBuildTime = default; + LocalJsonValue propBuildTimeInMillis = default; + LocalJsonValue?> propFields = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propBuildTime.TryReadProperty(ref reader, options, PropBuildTime, null)) + { + continue; + } + + if (propBuildTimeInMillis.TryReadProperty(ref reader, options, PropBuildTimeInMillis, null)) + { + continue; + } + + if (propFields.TryReadProperty(ref reader, options, PropFields, static System.Collections.Generic.IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.GlobalOrdinalsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + BuildTime = propBuildTime.Value, + BuildTimeInMillis = propBuildTimeInMillis.Value, + Fields = propFields.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.GlobalOrdinalsStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropBuildTime, value.BuildTime, null, null); + writer.WriteProperty(options, PropBuildTimeInMillis, value.BuildTimeInMillis, null, null); + writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.GlobalOrdinalsStatsConverter))] +public sealed partial class GlobalOrdinalsStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GlobalOrdinalsStats(long buildTimeInMillis) + { + BuildTimeInMillis = buildTimeInMillis; + } +#if NET7_0_OR_GREATER + public GlobalOrdinalsStats() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public GlobalOrdinalsStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal GlobalOrdinalsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public string? BuildTime { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long BuildTimeInMillis { get; set; } + public System.Collections.Generic.IReadOnlyDictionary? Fields { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs index d69025d8588..ee268382d7a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs @@ -26,6 +26,7 @@ namespace Elastic.Clients.Elasticsearch.Nodes; internal sealed partial class JvmMemoryStatsConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropHeapCommittedInBytes = System.Text.Json.JsonEncodedText.Encode("heap_committed_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropHeapMax = System.Text.Json.JsonEncodedText.Encode("heap_max"); private static readonly System.Text.Json.JsonEncodedText PropHeapMaxInBytes = System.Text.Json.JsonEncodedText.Encode("heap_max_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropHeapUsedInBytes = System.Text.Json.JsonEncodedText.Encode("heap_used_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropHeapUsedPercent = System.Text.Json.JsonEncodedText.Encode("heap_used_percent"); @@ -37,6 +38,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propHeapCommittedInBytes = default; + LocalJsonValue propHeapMax = default; LocalJsonValue propHeapMaxInBytes = default; LocalJsonValue propHeapUsedInBytes = default; LocalJsonValue propHeapUsedPercent = default; @@ -50,6 +52,11 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst continue; } + if (propHeapMax.TryReadProperty(ref reader, options, PropHeapMax, null)) + { + continue; + } + if (propHeapMaxInBytes.TryReadProperty(ref reader, options, PropHeapMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; @@ -93,6 +100,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst return new Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { HeapCommittedInBytes = propHeapCommittedInBytes.Value, + HeapMax = propHeapMax.Value, HeapMaxInBytes = propHeapMaxInBytes.Value, HeapUsedInBytes = propHeapUsedInBytes.Value, HeapUsedPercent = propHeapUsedPercent.Value, @@ -106,6 +114,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHeapCommittedInBytes, value.HeapCommittedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapMax, value.HeapMax, null, null); writer.WriteProperty(options, PropHeapMaxInBytes, value.HeapMaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHeapUsedInBytes, value.HeapUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHeapUsedPercent, value.HeapUsedPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); @@ -142,6 +151,13 @@ internal JvmMemoryStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// public long? HeapCommittedInBytes { get; set; } + /// + /// + /// Maximum amount of memory, available for use by the heap. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? HeapMax { get; set; } + /// /// /// Maximum amount of memory, in bytes, available for use by the heap. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs index dfb4531044b..2aa2286d86b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs @@ -32,7 +32,9 @@ internal sealed partial class PressureMemoryConverter : System.Text.Json.Seriali private static readonly System.Text.Json.JsonEncodedText PropCoordinating = System.Text.Json.JsonEncodedText.Encode("coordinating"); private static readonly System.Text.Json.JsonEncodedText PropCoordinatingInBytes = System.Text.Json.JsonEncodedText.Encode("coordinating_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropCoordinatingRejections = System.Text.Json.JsonEncodedText.Encode("coordinating_rejections"); + private static readonly System.Text.Json.JsonEncodedText PropLargeOperationRejections = System.Text.Json.JsonEncodedText.Encode("large_operation_rejections"); private static readonly System.Text.Json.JsonEncodedText PropPrimary = System.Text.Json.JsonEncodedText.Encode("primary"); + private static readonly System.Text.Json.JsonEncodedText PropPrimaryDocumentRejections = System.Text.Json.JsonEncodedText.Encode("primary_document_rejections"); private static readonly System.Text.Json.JsonEncodedText PropPrimaryInBytes = System.Text.Json.JsonEncodedText.Encode("primary_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropPrimaryRejections = System.Text.Json.JsonEncodedText.Encode("primary_rejections"); private static readonly System.Text.Json.JsonEncodedText PropReplica = System.Text.Json.JsonEncodedText.Encode("replica"); @@ -49,7 +51,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst LocalJsonValue propCoordinating = default; LocalJsonValue propCoordinatingInBytes = default; LocalJsonValue propCoordinatingRejections = default; + LocalJsonValue propLargeOperationRejections = default; LocalJsonValue propPrimary = default; + LocalJsonValue propPrimaryDocumentRejections = default; LocalJsonValue propPrimaryInBytes = default; LocalJsonValue propPrimaryRejections = default; LocalJsonValue propReplica = default; @@ -92,11 +96,21 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } + if (propLargeOperationRejections.TryReadProperty(ref reader, options, PropLargeOperationRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, null)) { continue; } + if (propPrimaryDocumentRejections.TryReadProperty(ref reader, options, PropPrimaryDocumentRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propPrimaryInBytes.TryReadProperty(ref reader, options, PropPrimaryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; @@ -141,7 +155,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst Coordinating = propCoordinating.Value, CoordinatingInBytes = propCoordinatingInBytes.Value, CoordinatingRejections = propCoordinatingRejections.Value, + LargeOperationRejections = propLargeOperationRejections.Value, Primary = propPrimary.Value, + PrimaryDocumentRejections = propPrimaryDocumentRejections.Value, PrimaryInBytes = propPrimaryInBytes.Value, PrimaryRejections = propPrimaryRejections.Value, Replica = propReplica.Value, @@ -160,7 +176,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCoordinating, value.Coordinating, null, null); writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLargeOperationRejections, value.LargeOperationRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimary, value.Primary, null, null); + writer.WriteProperty(options, PropPrimaryDocumentRejections, value.PrimaryDocumentRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReplica, value.Replica, null, null); @@ -239,6 +257,7 @@ internal PressureMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// public long? CoordinatingRejections { get; set; } + public long? LargeOperationRejections { get; set; } /// /// @@ -246,6 +265,7 @@ internal PressureMemory(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// public Elastic.Clients.Elasticsearch.ByteSize? Primary { get; set; } + public long? PrimaryDocumentRejections { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs index d87428ad2bb..710b4dfa4c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs @@ -31,7 +31,6 @@ internal sealed partial class SegmentsStatsConverter : System.Text.Json.Serializ private static readonly System.Text.Json.JsonEncodedText PropFileSizes = System.Text.Json.JsonEncodedText.Encode("file_sizes"); private static readonly System.Text.Json.JsonEncodedText PropFixedBitSet = System.Text.Json.JsonEncodedText.Encode("fixed_bit_set"); private static readonly System.Text.Json.JsonEncodedText PropFixedBitSetMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("fixed_bit_set_memory_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropIndexWriterMaxMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("index_writer_max_memory_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropIndexWriterMemory = System.Text.Json.JsonEncodedText.Encode("index_writer_memory"); private static readonly System.Text.Json.JsonEncodedText PropIndexWriterMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("index_writer_memory_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropMaxUnsafeAutoIdTimestamp = System.Text.Json.JsonEncodedText.Encode("max_unsafe_auto_id_timestamp"); @@ -41,12 +40,12 @@ internal sealed partial class SegmentsStatsConverter : System.Text.Json.Serializ private static readonly System.Text.Json.JsonEncodedText PropNormsMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("norms_memory_in_bytes"); private static readonly System.Text.Json.JsonEncodedText PropPointsMemory = System.Text.Json.JsonEncodedText.Encode("points_memory"); private static readonly System.Text.Json.JsonEncodedText PropPointsMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("points_memory_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropStoredFieldsMemory = System.Text.Json.JsonEncodedText.Encode("stored_fields_memory"); private static readonly System.Text.Json.JsonEncodedText PropStoredFieldsMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("stored_fields_memory_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropStoredMemory = System.Text.Json.JsonEncodedText.Encode("stored_memory"); private static readonly System.Text.Json.JsonEncodedText PropTermsMemory = System.Text.Json.JsonEncodedText.Encode("terms_memory"); private static readonly System.Text.Json.JsonEncodedText PropTermsMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("terms_memory_in_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTermVectorsMemory = System.Text.Json.JsonEncodedText.Encode("term_vectors_memory"); private static readonly System.Text.Json.JsonEncodedText PropTermVectorsMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("term_vectors_memory_in_bytes"); - private static readonly System.Text.Json.JsonEncodedText PropTermVectoryMemory = System.Text.Json.JsonEncodedText.Encode("term_vectory_memory"); private static readonly System.Text.Json.JsonEncodedText PropVersionMapMemory = System.Text.Json.JsonEncodedText.Encode("version_map_memory"); private static readonly System.Text.Json.JsonEncodedText PropVersionMapMemoryInBytes = System.Text.Json.JsonEncodedText.Encode("version_map_memory_in_bytes"); @@ -59,7 +58,6 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text LocalJsonValue> propFileSizes = default; LocalJsonValue propFixedBitSet = default; LocalJsonValue propFixedBitSetMemoryInBytes = default; - LocalJsonValue propIndexWriterMaxMemoryInBytes = default; LocalJsonValue propIndexWriterMemory = default; LocalJsonValue propIndexWriterMemoryInBytes = default; LocalJsonValue propMaxUnsafeAutoIdTimestamp = default; @@ -69,12 +67,12 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text LocalJsonValue propNormsMemoryInBytes = default; LocalJsonValue propPointsMemory = default; LocalJsonValue propPointsMemoryInBytes = default; + LocalJsonValue propStoredFieldsMemory = default; LocalJsonValue propStoredFieldsMemoryInBytes = default; - LocalJsonValue propStoredMemory = default; LocalJsonValue propTermsMemory = default; LocalJsonValue propTermsMemoryInBytes = default; + LocalJsonValue propTermVectorsMemory = default; LocalJsonValue propTermVectorsMemoryInBytes = default; - LocalJsonValue propTermVectoryMemory = default; LocalJsonValue propVersionMapMemory = default; LocalJsonValue propVersionMapMemoryInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -109,11 +107,6 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text continue; } - if (propIndexWriterMaxMemoryInBytes.TryReadProperty(ref reader, options, PropIndexWriterMaxMemoryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) - { - continue; - } - if (propIndexWriterMemory.TryReadProperty(ref reader, options, PropIndexWriterMemory, null)) { continue; @@ -159,12 +152,12 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text continue; } - if (propStoredFieldsMemoryInBytes.TryReadProperty(ref reader, options, PropStoredFieldsMemoryInBytes, null)) + if (propStoredFieldsMemory.TryReadProperty(ref reader, options, PropStoredFieldsMemory, null)) { continue; } - if (propStoredMemory.TryReadProperty(ref reader, options, PropStoredMemory, null)) + if (propStoredFieldsMemoryInBytes.TryReadProperty(ref reader, options, PropStoredFieldsMemoryInBytes, null)) { continue; } @@ -179,12 +172,12 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text continue; } - if (propTermVectorsMemoryInBytes.TryReadProperty(ref reader, options, PropTermVectorsMemoryInBytes, null)) + if (propTermVectorsMemory.TryReadProperty(ref reader, options, PropTermVectorsMemory, null)) { continue; } - if (propTermVectoryMemory.TryReadProperty(ref reader, options, PropTermVectoryMemory, null)) + if (propTermVectorsMemoryInBytes.TryReadProperty(ref reader, options, PropTermVectorsMemoryInBytes, null)) { continue; } @@ -217,7 +210,6 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text FileSizes = propFileSizes.Value, FixedBitSet = propFixedBitSet.Value, FixedBitSetMemoryInBytes = propFixedBitSetMemoryInBytes.Value, - IndexWriterMaxMemoryInBytes = propIndexWriterMaxMemoryInBytes.Value, IndexWriterMemory = propIndexWriterMemory.Value, IndexWriterMemoryInBytes = propIndexWriterMemoryInBytes.Value, MaxUnsafeAutoIdTimestamp = propMaxUnsafeAutoIdTimestamp.Value, @@ -227,12 +219,12 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text NormsMemoryInBytes = propNormsMemoryInBytes.Value, PointsMemory = propPointsMemory.Value, PointsMemoryInBytes = propPointsMemoryInBytes.Value, + StoredFieldsMemory = propStoredFieldsMemory.Value, StoredFieldsMemoryInBytes = propStoredFieldsMemoryInBytes.Value, - StoredMemory = propStoredMemory.Value, TermsMemory = propTermsMemory.Value, TermsMemoryInBytes = propTermsMemoryInBytes.Value, + TermVectorsMemory = propTermVectorsMemory.Value, TermVectorsMemoryInBytes = propTermVectorsMemoryInBytes.Value, - TermVectoryMemory = propTermVectoryMemory.Value, VersionMapMemory = propVersionMapMemory.Value, VersionMapMemoryInBytes = propVersionMapMemoryInBytes.Value }; @@ -247,7 +239,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFileSizes, value.FileSizes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropFixedBitSet, value.FixedBitSet, null, null); writer.WriteProperty(options, PropFixedBitSetMemoryInBytes, value.FixedBitSetMemoryInBytes, null, null); - writer.WriteProperty(options, PropIndexWriterMaxMemoryInBytes, value.IndexWriterMaxMemoryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexWriterMemory, value.IndexWriterMemory, null, null); writer.WriteProperty(options, PropIndexWriterMemoryInBytes, value.IndexWriterMemoryInBytes, null, null); writer.WriteProperty(options, PropMaxUnsafeAutoIdTimestamp, value.MaxUnsafeAutoIdTimestamp, null, null); @@ -257,12 +248,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropNormsMemoryInBytes, value.NormsMemoryInBytes, null, null); writer.WriteProperty(options, PropPointsMemory, value.PointsMemory, null, null); writer.WriteProperty(options, PropPointsMemoryInBytes, value.PointsMemoryInBytes, null, null); + writer.WriteProperty(options, PropStoredFieldsMemory, value.StoredFieldsMemory, null, null); writer.WriteProperty(options, PropStoredFieldsMemoryInBytes, value.StoredFieldsMemoryInBytes, null, null); - writer.WriteProperty(options, PropStoredMemory, value.StoredMemory, null, null); writer.WriteProperty(options, PropTermsMemory, value.TermsMemory, null, null); writer.WriteProperty(options, PropTermsMemoryInBytes, value.TermsMemoryInBytes, null, null); + writer.WriteProperty(options, PropTermVectorsMemory, value.TermVectorsMemory, null, null); writer.WriteProperty(options, PropTermVectorsMemoryInBytes, value.TermVectorsMemoryInBytes, null, null); - writer.WriteProperty(options, PropTermVectoryMemory, value.TermVectoryMemory, null, null); writer.WriteProperty(options, PropVersionMapMemory, value.VersionMapMemory, null, null); writer.WriteProperty(options, PropVersionMapMemoryInBytes, value.VersionMapMemoryInBytes, null, null); writer.WriteEndObject(); @@ -365,7 +356,6 @@ internal SegmentsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct required #endif long FixedBitSetMemoryInBytes { get; set; } - public long? IndexWriterMaxMemoryInBytes { get; set; } /// /// @@ -450,6 +440,13 @@ internal SegmentsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct #endif long PointsMemoryInBytes { get; set; } + /// + /// + /// Total amount of memory used for stored fields across all shards assigned to selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? StoredFieldsMemory { get; set; } + /// /// /// Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes. @@ -460,7 +457,6 @@ internal SegmentsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct required #endif long StoredFieldsMemoryInBytes { get; set; } - public Elastic.Clients.Elasticsearch.ByteSize? StoredMemory { get; set; } /// /// @@ -480,6 +476,13 @@ internal SegmentsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct #endif long TermsMemoryInBytes { get; set; } + /// + /// + /// Total amount of memory used for term vectors across all shards assigned to selected nodes. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? TermVectorsMemory { get; set; } + /// /// /// Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes. @@ -491,13 +494,6 @@ internal SegmentsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct #endif long TermVectorsMemoryInBytes { get; set; } - /// - /// - /// Total amount of memory used for term vectors across all shards assigned to selected nodes. - /// - /// - public Elastic.Clients.Elasticsearch.ByteSize? TermVectoryMemory { get; set; } - /// /// /// Total amount of memory used by all version maps across all shards assigned to selected nodes.