From 540dcbcf27155f2365a4bd8d424200e89c9dc250 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Wed, 12 Jun 2024 15:17:21 +0200 Subject: [PATCH] Regenerate client using the latest spec (#8234) --- .../Types/Core/MSearch/MultisearchBody.g.cs | 6 ++--- .../Types/IndexManagement/IndexSettings.g.cs | 2 +- .../InferenceResponseResult.g.cs | 1 + .../Api/Inference/DeleteInferenceRequest.g.cs | 24 +++++++++++++++++++ .../Inference/DeleteInferenceResponse.g.cs | 2 ++ .../Types/Core/MSearch/MultisearchBody.g.cs | 6 ++--- .../Types/IndexManagement/IndexSettings.g.cs | 2 +- .../InferenceResponseResult.g.cs | 1 + 8 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 3677729491b..2d5869dba4e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -95,7 +95,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } @@ -131,7 +131,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "rescore") { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); + variant.Rescore = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } @@ -167,7 +167,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "sort") { - variant.Sort = JsonSerializer.Deserialize?>(ref reader, options); + variant.Sort = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs index 36859df462f..26d2b1a5500 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -300,7 +300,7 @@ public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "routing_path") { - variant.RoutingPath = JsonSerializer.Deserialize?>(ref reader, options); + variant.RoutingPath = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs index 259f2d9be0d..5e6d8cbf1b2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs @@ -51,6 +51,7 @@ public sealed partial class InferenceResponseResult /// If the model is trained for a text classification or zero shot classification task, the response is the
predicted class.
For named entity recognition (NER) tasks, it contains the annotated text output.
For fill mask tasks, it contains the top prediction for replacing the mask token.
For text embedding tasks, it contains the raw numerical text embedding values.
For regression models, its a numerical value
For classification models, it may be an integer, double, boolean or string depending on prediction type
/// [JsonInclude, JsonPropertyName("predicted_value")] + [SingleOrManyCollectionConverter(typeof(object))] public IReadOnlyCollection? PredictedValue { get; init; } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceRequest.g.cs index ad0207b2280..1789b42921a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceRequest.g.cs @@ -31,6 +31,15 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class DeleteInferenceRequestParameters : RequestParameters { + /// + /// When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned + /// + public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } + + /// + /// When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields + /// + public bool? Force { get => Q("force"); set => Q("force", value); } } /// @@ -53,6 +62,18 @@ public DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? internal override bool SupportsBody => false; internal override string OperationName => "inference.delete"; + + /// + /// When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned + /// + [JsonIgnore] + public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } + + /// + /// When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields + /// + [JsonIgnore] + public bool? Force { get => Q("force"); set => Q("force", value); } } /// @@ -78,6 +99,9 @@ public DeleteInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Id inferen internal override string OperationName => "inference.delete"; + public DeleteInferenceRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); + public DeleteInferenceRequestDescriptor Force(bool? force = true) => Qs("force", force); + public DeleteInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id inferenceId) { RouteValues.Required("inference_id", inferenceId); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceResponse.g.cs index 92fff276e64..98fe1534228 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceResponse.g.cs @@ -33,4 +33,6 @@ public sealed partial class DeleteInferenceResponse : ElasticsearchResponse /// [JsonInclude, JsonPropertyName("acknowledged")] public bool Acknowledged { get; init; } + [JsonInclude, JsonPropertyName("pipelines")] + public IReadOnlyCollection Pipelines { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 6af770f0a3d..014d82faeb3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -95,7 +95,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } @@ -131,7 +131,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "rescore") { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); + variant.Rescore = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } @@ -167,7 +167,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "sort") { - variant.Sort = JsonSerializer.Deserialize?>(ref reader, options); + variant.Sort = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs index 9571bb04a77..18cd16647a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -300,7 +300,7 @@ public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "routing_path") { - variant.RoutingPath = JsonSerializer.Deserialize?>(ref reader, options); + variant.RoutingPath = SingleOrManySerializationHelper.Deserialize(ref reader, options); continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs index b7f56e93114..eebe075625e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs @@ -51,6 +51,7 @@ public sealed partial class InferenceResponseResult /// If the model is trained for a text classification or zero shot classification task, the response is the
predicted class.
For named entity recognition (NER) tasks, it contains the annotated text output.
For fill mask tasks, it contains the top prediction for replacing the mask token.
For text embedding tasks, it contains the raw numerical text embedding values.
For regression models, its a numerical value
For classification models, it may be an integer, double, boolean or string depending on prediction type
///
[JsonInclude, JsonPropertyName("predicted_value")] + [SingleOrManyCollectionConverter(typeof(object))] public IReadOnlyCollection? PredictedValue { get; init; } ///