Skip to content

Commit cbb7606

Browse files
Regenerate client using the latest spec (#8234) (#8235)
Co-authored-by: Florian Bernd <[email protected]>
1 parent e260746 commit cbb7606

File tree

8 files changed

+36
-8
lines changed

8 files changed

+36
-8
lines changed

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve
9595

9696
if (property == "knn")
9797
{
98-
variant.Knn = JsonSerializer.Deserialize<ICollection<Elastic.Clients.Elasticsearch.Serverless.KnnSearch>?>(ref reader, options);
98+
variant.Knn = SingleOrManySerializationHelper.Deserialize<Elastic.Clients.Elasticsearch.Serverless.KnnSearch>(ref reader, options);
9999
continue;
100100
}
101101

@@ -131,7 +131,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve
131131

132132
if (property == "rescore")
133133
{
134-
variant.Rescore = JsonSerializer.Deserialize<ICollection<Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore>?>(ref reader, options);
134+
variant.Rescore = SingleOrManySerializationHelper.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore>(ref reader, options);
135135
continue;
136136
}
137137

@@ -167,7 +167,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve
167167

168168
if (property == "sort")
169169
{
170-
variant.Sort = JsonSerializer.Deserialize<ICollection<Elastic.Clients.Elasticsearch.Serverless.SortOptions>?>(ref reader, options);
170+
variant.Sort = SingleOrManySerializationHelper.Deserialize<Elastic.Clients.Elasticsearch.Serverless.SortOptions>(ref reader, options);
171171
continue;
172172
}
173173

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert
300300

301301
if (property == "routing_path")
302302
{
303-
variant.RoutingPath = JsonSerializer.Deserialize<ICollection<string>?>(ref reader, options);
303+
variant.RoutingPath = SingleOrManySerializationHelper.Deserialize<string>(ref reader, options);
304304
continue;
305305
}
306306

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public sealed partial class InferenceResponseResult
5151
/// <para>If the model is trained for a text classification or zero shot classification task, the response is the<br/>predicted class.<br/>For named entity recognition (NER) tasks, it contains the annotated text output.<br/>For fill mask tasks, it contains the top prediction for replacing the mask token.<br/>For text embedding tasks, it contains the raw numerical text embedding values.<br/>For regression models, its a numerical value<br/>For classification models, it may be an integer, double, boolean or string depending on prediction type</para>
5252
/// </summary>
5353
[JsonInclude, JsonPropertyName("predicted_value")]
54+
[SingleOrManyCollectionConverter(typeof(object))]
5455
public IReadOnlyCollection<object>? PredictedValue { get; init; }
5556

5657
/// <summary>

src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceRequest.g.cs

+24
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ namespace Elastic.Clients.Elasticsearch.Inference;
3131

3232
public sealed partial class DeleteInferenceRequestParameters : RequestParameters
3333
{
34+
/// <summary>
35+
/// <para>When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned</para>
36+
/// </summary>
37+
public bool? DryRun { get => Q<bool?>("dry_run"); set => Q("dry_run", value); }
38+
39+
/// <summary>
40+
/// <para>When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields</para>
41+
/// </summary>
42+
public bool? Force { get => Q<bool?>("force"); set => Q("force", value); }
3443
}
3544

3645
/// <summary>
@@ -53,6 +62,18 @@ public DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType?
5362
internal override bool SupportsBody => false;
5463

5564
internal override string OperationName => "inference.delete";
65+
66+
/// <summary>
67+
/// <para>When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned</para>
68+
/// </summary>
69+
[JsonIgnore]
70+
public bool? DryRun { get => Q<bool?>("dry_run"); set => Q("dry_run", value); }
71+
72+
/// <summary>
73+
/// <para>When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields</para>
74+
/// </summary>
75+
[JsonIgnore]
76+
public bool? Force { get => Q<bool?>("force"); set => Q("force", value); }
5677
}
5778

5879
/// <summary>
@@ -78,6 +99,9 @@ public DeleteInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Id inferen
7899

79100
internal override string OperationName => "inference.delete";
80101

102+
public DeleteInferenceRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun);
103+
public DeleteInferenceRequestDescriptor Force(bool? force = true) => Qs("force", force);
104+
81105
public DeleteInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id inferenceId)
82106
{
83107
RouteValues.Required("inference_id", inferenceId);

src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/DeleteInferenceResponse.g.cs

+2
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ public sealed partial class DeleteInferenceResponse : ElasticsearchResponse
3333
/// </summary>
3434
[JsonInclude, JsonPropertyName("acknowledged")]
3535
public bool Acknowledged { get; init; }
36+
[JsonInclude, JsonPropertyName("pipelines")]
37+
public IReadOnlyCollection<string> Pipelines { get; init; }
3638
}

src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve
9595

9696
if (property == "knn")
9797
{
98-
variant.Knn = JsonSerializer.Deserialize<ICollection<Elastic.Clients.Elasticsearch.KnnSearch>?>(ref reader, options);
98+
variant.Knn = SingleOrManySerializationHelper.Deserialize<Elastic.Clients.Elasticsearch.KnnSearch>(ref reader, options);
9999
continue;
100100
}
101101

@@ -131,7 +131,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve
131131

132132
if (property == "rescore")
133133
{
134-
variant.Rescore = JsonSerializer.Deserialize<ICollection<Elastic.Clients.Elasticsearch.Core.Search.Rescore>?>(ref reader, options);
134+
variant.Rescore = SingleOrManySerializationHelper.Deserialize<Elastic.Clients.Elasticsearch.Core.Search.Rescore>(ref reader, options);
135135
continue;
136136
}
137137

@@ -167,7 +167,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve
167167

168168
if (property == "sort")
169169
{
170-
variant.Sort = JsonSerializer.Deserialize<ICollection<Elastic.Clients.Elasticsearch.SortOptions>?>(ref reader, options);
170+
variant.Sort = SingleOrManySerializationHelper.Deserialize<Elastic.Clients.Elasticsearch.SortOptions>(ref reader, options);
171171
continue;
172172
}
173173

src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert
300300

301301
if (property == "routing_path")
302302
{
303-
variant.RoutingPath = JsonSerializer.Deserialize<ICollection<string>?>(ref reader, options);
303+
variant.RoutingPath = SingleOrManySerializationHelper.Deserialize<string>(ref reader, options);
304304
continue;
305305
}
306306

src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public sealed partial class InferenceResponseResult
5151
/// <para>If the model is trained for a text classification or zero shot classification task, the response is the<br/>predicted class.<br/>For named entity recognition (NER) tasks, it contains the annotated text output.<br/>For fill mask tasks, it contains the top prediction for replacing the mask token.<br/>For text embedding tasks, it contains the raw numerical text embedding values.<br/>For regression models, its a numerical value<br/>For classification models, it may be an integer, double, boolean or string depending on prediction type</para>
5252
/// </summary>
5353
[JsonInclude, JsonPropertyName("predicted_value")]
54+
[SingleOrManyCollectionConverter(typeof(object))]
5455
public IReadOnlyCollection<object>? PredictedValue { get; init; }
5556

5657
/// <summary>

0 commit comments

Comments
 (0)