From bbae2663fb8440fc518920a2c7e5949abc0425fd Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Thu, 4 Sep 2025 14:12:26 +0000 Subject: [PATCH] Regenerate client --- .../_Generated/Api/ApiUrlLookup.g.cs | 1 + .../Api/DeleteByQueryRequest.Converters.g.cs | 11 +- .../_Generated/Api/DeleteByQueryRequest.g.cs | 160 ++++++++----- .../Api/Inference/PutAlibabacloudRequest.g.cs | 13 +- .../Inference/PutAmazonbedrockRequest.g.cs | 13 +- .../Inference/PutAmazonsagemakerRequest.g.cs | 13 +- .../Api/Inference/PutAnthropicRequest.g.cs | 13 +- .../Inference/PutAzureaistudioRequest.g.cs | 13 +- .../Api/Inference/PutAzureopenaiRequest.g.cs | 13 +- .../Api/Inference/PutCohereRequest.g.cs | 13 +- .../Api/Inference/PutCustomRequest.g.cs | 13 +- .../Api/Inference/PutDeepseekRequest.g.cs | 13 +- .../Inference/PutElasticsearchRequest.g.cs | 13 +- .../Api/Inference/PutElserRequest.g.cs | 13 +- .../Inference/PutGoogleaistudioRequest.g.cs | 13 +- .../Inference/PutGooglevertexaiRequest.g.cs | 13 +- .../Api/Inference/PutHuggingFaceRequest.g.cs | 13 +- .../Api/Inference/PutJinaaiRequest.g.cs | 13 +- .../Api/Inference/PutMistralRequest.g.cs | 13 +- .../Api/Inference/PutOpenaiRequest.g.cs | 13 +- .../Api/Inference/PutVoyageaiRequest.g.cs | 13 +- .../_Generated/Api/ReindexRequest.g.cs | 6 +- .../SetUpgradeModeRequest.Converters.g.cs | 53 +++++ .../SetUpgradeModeRequest.g.cs | 219 ++++++++++++++++++ .../SetUpgradeModeResponse.Converters.g.cs | 63 +++++ .../SetUpgradeModeResponse.g.cs | 50 ++++ .../Client/ElasticsearchClient.Transform.g.cs | 46 ++++ .../InferenceChunkingSettings.Converters.g.cs | 8 +- .../Inference/InferenceChunkingSettings.g.cs | 49 ++-- .../Types/Inference/InferenceEndpoint.g.cs | 13 +- .../Mapping/ChunkingSettings.Converters.g.cs | 8 +- .../Types/Mapping/ChunkingSettings.g.cs | 39 ++-- .../Types/ShardFailure.Converters.g.cs | 22 +- .../_Generated/Types/ShardFailure.g.cs | 10 +- 34 files changed, 846 insertions(+), 146 deletions(-) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.g.cs diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs index 05d8bcc7edb..18d5519df7c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -465,6 +465,7 @@ internal static class ApiUrlLookup internal static ApiUrls TransformManagementPutTransform = new ApiUrls(new[] { "_transform/{transform_id}" }); internal static ApiUrls TransformManagementResetTransform = new ApiUrls(new[] { "_transform/{transform_id}/_reset" }); internal static ApiUrls TransformManagementScheduleNowTransform = new ApiUrls(new[] { "_transform/{transform_id}/_schedule_now" }); + internal static ApiUrls TransformManagementSetUpgradeMode = new ApiUrls(new[] { "_transform/set_upgrade_mode" }); internal static ApiUrls TransformManagementStartTransform = new ApiUrls(new[] { "_transform/{transform_id}/_start" }); internal static ApiUrls TransformManagementStopTransform = new ApiUrls(new[] { "_transform/{transform_id}/_stop" }); internal static ApiUrls TransformManagementUpdateTransform = new ApiUrls(new[] { "_transform/{transform_id}/_update" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.Converters.g.cs index 71d0eead619..736e86dc6d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.Converters.g.cs @@ -28,6 +28,7 @@ public sealed partial class DeleteByQueryRequestConverter : System.Text.Json.Ser private static readonly System.Text.Json.JsonEncodedText PropMaxDocs = System.Text.Json.JsonEncodedText.Encode("max_docs"); private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query"); private static readonly System.Text.Json.JsonEncodedText PropSlice = System.Text.Json.JsonEncodedText.Encode("slice"); + private static readonly System.Text.Json.JsonEncodedText PropSort = System.Text.Json.JsonEncodedText.Encode("sort"); public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -35,6 +36,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst LocalJsonValue propMaxDocs = default; LocalJsonValue propQuery = default; LocalJsonValue propSlice = default; + LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) @@ -52,6 +54,11 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst continue; } + if (propSort.TryReadProperty(ref reader, options, PropSort, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -66,7 +73,8 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst { MaxDocs = propMaxDocs.Value, Query = propQuery.Value, - Slice = propSlice.Value + Slice = propSlice.Value, + Sort = propSort.Value }; } @@ -76,6 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSlice, value.Slice, null, null); + writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs index 1386e433217..5a951967d07 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs @@ -187,13 +187,6 @@ public sealed partial class DeleteByQueryRequestParameters : Elastic.Transport.R /// public Elastic.Clients.Elasticsearch.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public System.Collections.Generic.ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); } - /// /// /// The specific tag of the request for logging and statistical purposes. @@ -601,13 +594,6 @@ internal DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// public Elastic.Clients.Elasticsearch.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public System.Collections.Generic.ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); } - /// /// /// The specific tag of the request for logging and statistical purposes. @@ -681,6 +667,13 @@ internal DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; } + + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public System.Collections.Generic.ICollection? Sort { get; set; } } /// @@ -1142,28 +1135,6 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Slices(Syste return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(System.Collections.Generic.ICollection? value) - { - Instance.Sort = value; - return this; - } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params string[] values) - { - Instance.Sort = [.. values]; - return this; - } - /// /// /// The specific tag of the request for logging and statistical purposes. @@ -1329,6 +1300,62 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Slice(Sys return this; } + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(System.Collections.Generic.ICollection? value) + { + Instance.Sort = value; + return this; + } + + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params Elastic.Clients.Elasticsearch.SortOptions[] values) + { + Instance.Sort = [.. values]; + return this; + } + + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SortOptionsDescriptor.Build(action)); + } + + Instance.Sort = items; + return this; + } + + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SortOptionsDescriptor.Build(action)); + } + + Instance.Sort = items; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.DeleteByQueryRequest Build(System.Action action) { @@ -1838,28 +1865,6 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor S return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(System.Collections.Generic.ICollection? value) - { - Instance.Sort = value; - return this; - } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params string[] values) - { - Instance.Sort = [.. values]; - return this; - } - /// /// /// The specific tag of the request for logging and statistical purposes. @@ -2003,6 +2008,45 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor S return this; } + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(System.Collections.Generic.ICollection? value) + { + Instance.Sort = value; + return this; + } + + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params Elastic.Clients.Elasticsearch.SortOptions[] values) + { + Instance.Sort = [.. values]; + return this; + } + + /// + /// + /// A sort object that specifies the order of deleted documents. + /// + /// + public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SortOptionsDescriptor.Build(action)); + } + + Instance.Sort = items; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.DeleteByQueryRequest Build(System.Action> action) { 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 1863c01648d..70e9935eb6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudRequest.g.cs @@ -220,7 +220,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudRequestDescriptor /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 76566635860..8f96bd72106 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs @@ -228,7 +228,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockRequestDescriptor /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAmazonbedrockRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerRequest.g.cs index 35ae86225b6..db3fa1f85fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerRequest.g.cs @@ -221,7 +221,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutAmazonsagemakerRequestDescript /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutAmazonsagemakerRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutAmazonsagemakerRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAmazonsagemakerRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 8311ddddcde..04fae14c424 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicRequest.g.cs @@ -222,7 +222,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor Chu /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 543e3652250..6f5cea295df 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioRequest.g.cs @@ -220,7 +220,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 dd7aab791c0..7c11fa62a2b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiRequest.g.cs @@ -258,7 +258,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiRequestDescriptor C /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutAzureopenaiRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 7960f25b0b0..648ab748d9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereRequest.g.cs @@ -221,7 +221,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutCohereRequestDescriptor Chunki /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutCohereRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutCohereRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutCohereRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomRequest.g.cs index 7755908a00d..e4aa68e8f09 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomRequest.g.cs @@ -327,7 +327,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutCustomRequestDescriptor Chunki /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutCustomRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutCustomRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutCustomRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekRequest.g.cs index 16ffe77fac2..e788fb2c593 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekRequest.g.cs @@ -213,7 +213,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutDeepseekRequestDescriptor Chun /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutDeepseekRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutDeepseekRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutDeepseekRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 8c176a94586..2c83850ee6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs @@ -256,7 +256,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 0e96a1d5ae8..e7691cbbf40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserRequest.g.cs @@ -248,7 +248,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutElserRequestDescriptor Chunkin /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutElserRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutElserRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutElserRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 fa84d6403af..23ce5d24593 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioRequest.g.cs @@ -212,7 +212,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRequestDescripto /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutGoogleaistudioRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 23f9dec61dc..310dc04a8fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiRequest.g.cs @@ -220,7 +220,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRequestDescripto /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutGooglevertexaiRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 5a88093eed8..cf24d8bbe1b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs @@ -400,7 +400,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor C /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 034d2b7bd08..1e2048e0fa8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiRequest.g.cs @@ -228,7 +228,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutJinaaiRequestDescriptor Chunki /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutJinaaiRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutJinaaiRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutJinaaiRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 0887b249715..d1edc67507f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs @@ -212,7 +212,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor Chunk /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 7b7499b4c24..a8180d2e531 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiRequest.g.cs @@ -222,7 +222,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutOpenaiRequestDescriptor Chunki /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutOpenaiRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutOpenaiRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutOpenaiRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; 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 a7f47242827..dc91bd8adce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiRequest.g.cs @@ -226,7 +226,18 @@ public Elastic.Clients.Elasticsearch.Inference.PutVoyageaiRequestDescriptor Chun /// The chunking configuration object. /// /// - public Elastic.Clients.Elasticsearch.Inference.PutVoyageaiRequestDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.PutVoyageaiRequestDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// The chunking configuration object. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutVoyageaiRequestDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs index 252ecd7e9a0..b45729811e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs @@ -180,7 +180,7 @@ public sealed partial class ReindexRequestParameters : Elastic.Transport.Request /// /// /// -/// When requested with wait_for_completion=false, a task id is returned, which can be used via the task management API to monitor, debug, or cancel the task. The task may disappear or fail if the node shuts down. +/// When requested with wait_for_completion=false, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down. /// When retrying a failed reindex operation, it might be necessary to set conflicts=proceed or to first delete the partial destination index. /// Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause. /// @@ -428,7 +428,7 @@ internal ReindexRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// /// -/// When requested with wait_for_completion=false, a task id is returned, which can be used via the task management API to monitor, debug, or cancel the task. The task may disappear or fail if the node shuts down. +/// When requested with wait_for_completion=false, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down. /// When retrying a failed reindex operation, it might be necessary to set conflicts=proceed or to first delete the partial destination index. /// Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause. /// @@ -838,7 +838,7 @@ public Elastic.Clients.Elasticsearch.ReindexRequestDescriptor RequestConfigurati /// /// /// -/// When requested with wait_for_completion=false, a task id is returned, which can be used via the task management API to monitor, debug, or cancel the task. The task may disappear or fail if the node shuts down. +/// When requested with wait_for_completion=false, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down. /// When retrying a failed reindex operation, it might be necessary to set conflicts=proceed or to first delete the partial destination index. /// Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.Converters.g.cs new file mode 100644 index 00000000000..2d08f0d67d7 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.Converters.g.cs @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.TransformManagement.Json; + +public sealed partial class SetUpgradeModeRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + 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.TransformManagement.SetUpgradeModeRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.g.cs new file mode 100644 index 00000000000..c8a72e56d21 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeRequest.g.cs @@ -0,0 +1,219 @@ +// 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.TransformManagement; + +public sealed partial class SetUpgradeModeRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// When true, it enables upgrade_mode which temporarily halts all + /// transform tasks and prohibits new transform tasks from + /// starting. + /// + /// + public bool? Enabled { get => Q("enabled"); set => Q("enabled", value); } + + /// + /// + /// The time to wait for the request to be completed. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Set upgrade_mode for transform indices. +/// Sets a cluster wide upgrade_mode setting that prepares transform +/// indices for an upgrade. +/// When upgrading your cluster, in some circumstances you must restart your +/// nodes and reindex your transform indices. In those circumstances, +/// there must be no transforms running. You can close the transforms, +/// do the upgrade, then open all the transforms again. Alternatively, +/// you can use this API to temporarily halt tasks associated with the transforms +/// and prevent new transforms from opening. You can also use this API +/// during upgrades that do not require you to reindex your transform +/// indices, though stopping transforms is not a requirement in that case. +/// You can see the current value for the upgrade_mode setting by using the get +/// transform info API. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TransformManagement.Json.SetUpgradeModeRequestConverter))] +public sealed partial class SetUpgradeModeRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public SetUpgradeModeRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public SetUpgradeModeRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SetUpgradeModeRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.TransformManagementSetUpgradeMode; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => false; + + internal override string OperationName => "transform.set_upgrade_mode"; + + /// + /// + /// When true, it enables upgrade_mode which temporarily halts all + /// transform tasks and prohibits new transform tasks from + /// starting. + /// + /// + public bool? Enabled { get => Q("enabled"); set => Q("enabled", value); } + + /// + /// + /// The time to wait for the request to be completed. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Set upgrade_mode for transform indices. +/// Sets a cluster wide upgrade_mode setting that prepares transform +/// indices for an upgrade. +/// When upgrading your cluster, in some circumstances you must restart your +/// nodes and reindex your transform indices. In those circumstances, +/// there must be no transforms running. You can close the transforms, +/// do the upgrade, then open all the transforms again. Alternatively, +/// you can use this API to temporarily halt tasks associated with the transforms +/// and prevent new transforms from opening. You can also use this API +/// during upgrades that do not require you to reindex your transform +/// indices, though stopping transforms is not a requirement in that case. +/// You can see the current value for the upgrade_mode setting by using the get +/// transform info API. +/// +/// +public readonly partial struct SetUpgradeModeRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SetUpgradeModeRequestDescriptor(Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest instance) + { + Instance = instance; + } + + public SetUpgradeModeRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest instance) => new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest(Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// When true, it enables upgrade_mode which temporarily halts all + /// transform tasks and prohibits new transform tasks from + /// starting. + /// + /// + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor Enabled(bool? value = true) + { + Instance.Enabled = value; + return this; + } + + /// + /// + /// The time to wait for the request to be completed. + /// + /// + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.Converters.g.cs new file mode 100644 index 00000000000..62b1c488ac1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.Converters.g.cs @@ -0,0 +1,63 @@ +// 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.TransformManagement.Json; + +public sealed partial class SetUpgradeModeResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged"); + + public override Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeResponse 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; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, 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.TransformManagement.SetUpgradeModeResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Acknowledged = propAcknowledged.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.g.cs new file mode 100644 index 00000000000..29c6018afaf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/SetUpgradeModeResponse.g.cs @@ -0,0 +1,50 @@ +// 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.TransformManagement; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TransformManagement.Json.SetUpgradeModeResponseConverter))] +public sealed partial class SetUpgradeModeResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SetUpgradeModeResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SetUpgradeModeResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// For a successful response, this value is always true. On failure, an exception is returned instead. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + bool Acknowledged { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs index 265d90ffea4..d9f6dbc4821 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs @@ -446,6 +446,52 @@ public virtual Elastic.Clients.Elasticsearch.TransformManagement.ScheduleNowTran return DoRequestAsync(request, cancellationToken); } + public virtual Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeResponse SetUpgradeMode(Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeResponse SetUpgradeMode() + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeResponse SetUpgradeMode(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task SetUpgradeModeAsync(Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task SetUpgradeModeAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task SetUpgradeModeAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.SetUpgradeModeRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual Elastic.Clients.Elasticsearch.TransformManagement.StartTransformResponse StartTransform(Elastic.Clients.Elasticsearch.TransformManagement.StartTransformRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.Converters.g.cs index 13bcc574cfe..533cbadc7d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.Converters.g.cs @@ -38,8 +38,8 @@ public override Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSetting LocalJsonValue propMaxChunkSize = default; LocalJsonValue propOverlap = default; LocalJsonValue propSentenceOverlap = default; - LocalJsonValue propSeparatorGroup = default; - LocalJsonValue> propSeparators = default; + LocalJsonValue propSeparatorGroup = default; + LocalJsonValue?> propSeparators = default; LocalJsonValue propStrategy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSetting continue; } - if (propSeparators.TryReadProperty(ref reader, options, PropSeparators, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propSeparators.TryReadProperty(ref reader, options, PropSeparators, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -101,7 +101,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropOverlap, value.Overlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparatorGroup, value.SeparatorGroup, null, null); - writer.WriteProperty(options, PropSeparators, value.Separators, 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, PropSeparators, value.Separators, 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, PropStrategy, value.Strategy, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs index c6e2f879de2..53dc7829797 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs @@ -31,19 +31,12 @@ namespace Elastic.Clients.Elasticsearch.Inference; [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.Json.InferenceChunkingSettingsConverter))] public sealed partial class InferenceChunkingSettings { - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public InferenceChunkingSettings(string separatorGroup, System.Collections.Generic.ICollection separators) - { - SeparatorGroup = separatorGroup; - Separators = separators; - } #if NET7_0_OR_GREATER public InferenceChunkingSettings() { } #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 InferenceChunkingSettings() { } @@ -82,7 +75,7 @@ internal InferenceChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.J /// /// - /// This parameter is only applicable when using the recursive chunking strategy. + /// Only applicable to the recursive strategy and required when using it. /// /// /// Sets a predefined list of separators in the saved chunking settings based on the selected text type. @@ -92,15 +85,14 @@ internal InferenceChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.J /// Using this parameter is an alternative to manually specifying a custom separators list. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - string SeparatorGroup { get; set; } + public string? SeparatorGroup { get; set; } /// /// - /// A list of strings used as possible split points when chunking text with the recursive strategy. + /// Only applicable to the recursive strategy and required when using it. + /// + /// + /// A list of strings used as possible split points when chunking text. /// /// /// Each string can be a plain string or a regular expression (regex) pattern. @@ -111,11 +103,7 @@ internal InferenceChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.J /// the max_chunk_size limit, to reduce the total number of chunks generated. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.ICollection Separators { get; set; } + public System.Collections.Generic.ICollection? Separators { get; set; } /// /// @@ -211,7 +199,7 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescript /// /// - /// This parameter is only applicable when using the recursive chunking strategy. + /// Only applicable to the recursive strategy and required when using it. /// /// /// Sets a predefined list of separators in the saved chunking settings based on the selected text type. @@ -221,7 +209,7 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescript /// Using this parameter is an alternative to manually specifying a custom separators list. /// /// - public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor SeparatorGroup(string value) + public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor SeparatorGroup(string? value) { Instance.SeparatorGroup = value; return this; @@ -229,7 +217,10 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescript /// /// - /// A list of strings used as possible split points when chunking text with the recursive strategy. + /// Only applicable to the recursive strategy and required when using it. + /// + /// + /// A list of strings used as possible split points when chunking text. /// /// /// Each string can be a plain string or a regular expression (regex) pattern. @@ -240,7 +231,7 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescript /// the max_chunk_size limit, to reduce the total number of chunks generated. /// /// - public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor Separators(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor Separators(System.Collections.Generic.ICollection? value) { Instance.Separators = value; return this; @@ -248,7 +239,10 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescript /// /// - /// A list of strings used as possible split points when chunking text with the recursive strategy. + /// Only applicable to the recursive strategy and required when using it. + /// + /// + /// A list of strings used as possible split points when chunking text. /// /// /// Each string can be a plain string or a regular expression (regex) pattern. @@ -299,8 +293,13 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescript } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings Build(System.Action action) + internal static Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings Build(System.Action? action) { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor(new Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs index 304daa42996..d889d77ac56 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs @@ -131,7 +131,18 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor Chunk /// Chunking configuration object /// /// - public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor ChunkingSettings(System.Action action) + public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor ChunkingSettings() + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// Chunking configuration object + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor ChunkingSettings(System.Action? action) { Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.Converters.g.cs index 1760c3ebb96..193b6982ea9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.Converters.g.cs @@ -38,8 +38,8 @@ public override Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings Read(ref LocalJsonValue propMaxChunkSize = default; LocalJsonValue propOverlap = default; LocalJsonValue propSentenceOverlap = default; - LocalJsonValue propSeparatorGroup = default; - LocalJsonValue> propSeparators = default; + LocalJsonValue propSeparatorGroup = default; + LocalJsonValue?> propSeparators = default; LocalJsonValue propStrategy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings Read(ref continue; } - if (propSeparators.TryReadProperty(ref reader, options, PropSeparators, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propSeparators.TryReadProperty(ref reader, options, PropSeparators, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -101,7 +101,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropOverlap, value.Overlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparatorGroup, value.SeparatorGroup, null, null); - writer.WriteProperty(options, PropSeparators, value.Separators, 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, PropSeparators, value.Separators, 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, PropStrategy, value.Strategy, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs index 46fa67cbd15..3d7dd86c1a1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs @@ -27,11 +27,9 @@ namespace Elastic.Clients.Elasticsearch.Mapping; public sealed partial class ChunkingSettings { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ChunkingSettings(int maxChunkSize, string separatorGroup, System.Collections.Generic.ICollection separators, string strategy) + public ChunkingSettings(int maxChunkSize, string strategy) { MaxChunkSize = maxChunkSize; - SeparatorGroup = separatorGroup; - Separators = separators; Strategy = strategy; } #if NET7_0_OR_GREATER @@ -83,7 +81,7 @@ internal ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// - /// This parameter is only applicable when using the recursive chunking strategy. + /// Only applicable to the recursive strategy and required when using it. /// /// /// Sets a predefined list of separators in the saved chunking settings based on the selected text type. @@ -93,15 +91,14 @@ internal ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Using this parameter is an alternative to manually specifying a custom separators list. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - string SeparatorGroup { get; set; } + public string? SeparatorGroup { get; set; } /// /// - /// A list of strings used as possible split points when chunking text with the recursive strategy. + /// Only applicable to the recursive strategy and required when using it. + /// + /// + /// A list of strings used as possible split points when chunking text. /// /// /// Each string can be a plain string or a regular expression (regex) pattern. @@ -112,11 +109,7 @@ internal ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// the max_chunk_size limit, to reduce the total number of chunks generated. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.ICollection Separators { get; set; } + public System.Collections.Generic.ICollection? Separators { get; set; } /// /// @@ -211,7 +204,7 @@ public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Sentence /// /// - /// This parameter is only applicable when using the recursive chunking strategy. + /// Only applicable to the recursive strategy and required when using it. /// /// /// Sets a predefined list of separators in the saved chunking settings based on the selected text type. @@ -221,7 +214,7 @@ public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Sentence /// Using this parameter is an alternative to manually specifying a custom separators list. /// /// - public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor SeparatorGroup(string value) + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor SeparatorGroup(string? value) { Instance.SeparatorGroup = value; return this; @@ -229,7 +222,10 @@ public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Separato /// /// - /// A list of strings used as possible split points when chunking text with the recursive strategy. + /// Only applicable to the recursive strategy and required when using it. + /// + /// + /// A list of strings used as possible split points when chunking text. /// /// /// Each string can be a plain string or a regular expression (regex) pattern. @@ -240,7 +236,7 @@ public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Separato /// the max_chunk_size limit, to reduce the total number of chunks generated. /// /// - public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Separators(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Separators(System.Collections.Generic.ICollection? value) { Instance.Separators = value; return this; @@ -248,7 +244,10 @@ public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Separato /// /// - /// A list of strings used as possible split points when chunking text with the recursive strategy. + /// Only applicable to the recursive strategy and required when using it. + /// + /// + /// A list of strings used as possible split points when chunking text. /// /// /// Each string can be a plain string or a regular expression (regex) pattern. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.Converters.g.cs index ae3546141b7..0840e72be27 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.Converters.g.cs @@ -26,9 +26,13 @@ namespace Elastic.Clients.Elasticsearch.Json; public sealed partial class ShardFailureConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("index"); + private static readonly System.Text.Json.JsonEncodedText PropIndex1 = System.Text.Json.JsonEncodedText.Encode("_index"); private static readonly System.Text.Json.JsonEncodedText PropNode = System.Text.Json.JsonEncodedText.Encode("node"); + private static readonly System.Text.Json.JsonEncodedText PropNode1 = System.Text.Json.JsonEncodedText.Encode("_node"); + private static readonly System.Text.Json.JsonEncodedText PropPrimary = System.Text.Json.JsonEncodedText.Encode("primary"); private static readonly System.Text.Json.JsonEncodedText PropReason = System.Text.Json.JsonEncodedText.Encode("reason"); private static readonly System.Text.Json.JsonEncodedText PropShard = System.Text.Json.JsonEncodedText.Encode("shard"); + private static readonly System.Text.Json.JsonEncodedText PropShard1 = System.Text.Json.JsonEncodedText.Encode("_shard"); private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status"); public override Elastic.Clients.Elasticsearch.ShardFailure Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -36,17 +40,23 @@ public override Elastic.Clients.Elasticsearch.ShardFailure Read(ref System.Text. reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propIndex = default; LocalJsonValue propNode = default; + LocalJsonValue propPrimary = default; LocalJsonValue propReason = default; - LocalJsonValue propShard = default; + LocalJsonValue propShard = default; LocalJsonValue propStatus = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, null) || propIndex.TryReadProperty(ref reader, options, PropIndex1, null)) { continue; } - if (propNode.TryReadProperty(ref reader, options, PropNode, null)) + if (propNode.TryReadProperty(ref reader, options, PropNode, null) || propNode.TryReadProperty(ref reader, options, PropNode1, null)) + { + continue; + } + + if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.ShardFailure Read(ref System.Text. continue; } - if (propShard.TryReadProperty(ref reader, options, PropShard, null)) + if (propShard.TryReadProperty(ref reader, options, PropShard, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propShard.TryReadProperty(ref reader, options, PropShard1, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,6 +90,7 @@ public override Elastic.Clients.Elasticsearch.ShardFailure Read(ref System.Text. { Index = propIndex.Value, Node = propNode.Value, + Primary = propPrimary.Value, Reason = propReason.Value, Shard = propShard.Value, Status = propStatus.Value @@ -91,8 +102,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); + writer.WriteProperty(options, PropPrimary, value.Primary, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReason, value.Reason, null, null); - writer.WriteProperty(options, PropShard, value.Shard, null, null); + writer.WriteProperty(options, PropShard, value.Shard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStatus, value.Status, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.g.cs index 0a0f08410bf..12cc062592f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardFailure.g.cs @@ -27,10 +27,9 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class ShardFailure { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ShardFailure(Elastic.Clients.Elasticsearch.ErrorCause reason, int shard) + public ShardFailure(Elastic.Clients.Elasticsearch.ErrorCause reason) { Reason = reason; - Shard = shard; } #if NET7_0_OR_GREATER public ShardFailure() @@ -51,15 +50,12 @@ internal ShardFailure(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo public string? Index { get; set; } public string? Node { get; set; } + public bool? Primary { get; set; } public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.ErrorCause Reason { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int Shard { get; set; } + public int? Shard { get; set; } public string? Status { get; set; } } \ No newline at end of file