Skip to content

Commit 42c0203

Browse files
authored
[8.19] Regenerate client (#8833)
1 parent b206432 commit 42c0203

20 files changed

Lines changed: 412 additions & 71 deletions

src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ internal static class ApiUrlLookup
153153
internal static ApiUrls InferenceChatCompletionUnified = new ApiUrls(new[] { "_inference/chat_completion/{inference_id}/_stream" });
154154
internal static ApiUrls InferenceCompletion = new ApiUrls(new[] { "_inference/completion/{inference_id}" });
155155
internal static ApiUrls InferenceDelete = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
156-
internal static ApiUrls InferenceGet = new ApiUrls(new[] { "_inference", "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
156+
internal static ApiUrls InferenceGet = new ApiUrls(new[] { "_inference", "_inference/{inference_id}", "_inference/{task_type}/{inference_id}", "_inference/{task_type}/_all" });
157157
internal static ApiUrls InferenceInference = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
158158
internal static ApiUrls InferencePut = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
159159
internal static ApiUrls InferencePutAlibabacloud = new ApiUrls(new[] { "_inference/{task_type}/{alibabacloud_inference_id}" });

src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataStreamSettingsRequest.g.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public sealed partial class PutDataStreamSettingsRequestParameters : Elastic.Tra
5757
/// Update data stream settings.
5858
/// </para>
5959
/// <para>
60+
/// NOTE: Available in 8.19. Not available in earlier versions.
61+
/// </para>
62+
/// <para>
6063
/// This API can be used to override settings on specific data streams. These overrides will take precedence over what
6164
/// is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,
6265
/// only certain settings are allowed. If possible, the setting change is applied to all
@@ -136,6 +139,9 @@ internal PutDataStreamSettingsRequest(Elastic.Clients.Elasticsearch.Serializatio
136139
/// Update data stream settings.
137140
/// </para>
138141
/// <para>
142+
/// NOTE: Available in 8.19. Not available in earlier versions.
143+
/// </para>
144+
/// <para>
139145
/// This API can be used to override settings on specific data streams. These overrides will take precedence over what
140146
/// is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,
141147
/// only certain settings are allowed. If possible, the setting change is applied to all
@@ -302,6 +308,9 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataStreamSettingsReques
302308
/// Update data stream settings.
303309
/// </para>
304310
/// <para>
311+
/// NOTE: Available in 8.19. Not available in earlier versions.
312+
/// </para>
313+
/// <para>
305314
/// This API can be used to override settings on specific data streams. These overrides will take precedence over what
306315
/// is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,
307316
/// only certain settings are allowed. If possible, the setting change is applied to all

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public GetInferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? tas
4343
{
4444
}
4545

46+
public GetInferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType) : base(r => r.Optional("task_type", taskType))
47+
{
48+
}
49+
4650
public GetInferenceRequest()
4751
{
4852
}
@@ -63,14 +67,15 @@ internal GetInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon
6367

6468
/// <summary>
6569
/// <para>
66-
/// The inference Id
70+
/// The inference Id of the endpoint to return. Using <c>_all</c> or <c>*</c> will return all endpoints with the specified
71+
/// <c>task_type</c> if one is specified, or all endpoints for all task types if no <c>task_type</c> is specified
6772
/// </para>
6873
/// </summary>
6974
public Elastic.Clients.Elasticsearch.Id? InferenceId { get => P<Elastic.Clients.Elasticsearch.Id?>("inference_id"); set => PO("inference_id", value); }
7075

7176
/// <summary>
7277
/// <para>
73-
/// The task type
78+
/// The task type of the endpoint to return
7479
/// </para>
7580
/// </summary>
7681
public Elastic.Clients.Elasticsearch.Inference.TaskType? TaskType { get => P<Elastic.Clients.Elasticsearch.Inference.TaskType?>("task_type"); set => PO("task_type", value); }
@@ -101,6 +106,11 @@ public GetInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.Tas
101106
Instance = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest(taskType, inferenceId);
102107
}
103108

109+
public GetInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType)
110+
{
111+
Instance = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest(taskType);
112+
}
113+
104114
public GetInferenceRequestDescriptor()
105115
{
106116
Instance = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance);
@@ -111,7 +121,8 @@ public GetInferenceRequestDescriptor()
111121

112122
/// <summary>
113123
/// <para>
114-
/// The inference Id
124+
/// The inference Id of the endpoint to return. Using <c>_all</c> or <c>*</c> will return all endpoints with the specified
125+
/// <c>task_type</c> if one is specified, or all endpoints for all task types if no <c>task_type</c> is specified
115126
/// </para>
116127
/// </summary>
117128
public Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id? value)
@@ -122,7 +133,7 @@ public Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor Inf
122133

123134
/// <summary>
124135
/// <para>
125-
/// The task type
136+
/// The task type of the endpoint to return
126137
/// </para>
127138
/// </summary>
128139
public Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.TaskType? value)

src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public sealed partial class GetSnapshotRequestParameters : Elastic.Transport.Req
9797
/// <summary>
9898
/// <para>
9999
/// The maximum number of snapshots to return.
100-
/// The default is 0, which means to return all that match the request without limit.
100+
/// The default is -1, which means to return all that match the request without limit.
101101
/// </para>
102102
/// </summary>
103103
public int? Size { get => Q<int?>("size"); set => Q("size", value); }
@@ -270,7 +270,7 @@ internal GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons
270270
/// <summary>
271271
/// <para>
272272
/// The maximum number of snapshots to return.
273-
/// The default is 0, which means to return all that match the request without limit.
273+
/// The default is -1, which means to return all that match the request without limit.
274274
/// </para>
275275
/// </summary>
276276
public int? Size { get => Q<int?>("size"); set => Q("size", value); }
@@ -485,7 +485,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Order
485485
/// <summary>
486486
/// <para>
487487
/// The maximum number of snapshots to return.
488-
/// The default is 0, which means to return all that match the request without limit.
488+
/// The default is -1, which means to return all that match the request without limit.
489489
/// </para>
490490
/// </summary>
491491
public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Size(int? value)

src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,23 @@ public virtual Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse Get(
267267
return DoRequest<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest, Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse, Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestParameters>(request);
268268
}
269269

270+
public virtual Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse Get(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType)
271+
{
272+
var builder = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor(taskType);
273+
var request = builder.Instance;
274+
request.BeforeRequest();
275+
return DoRequest<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest, Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse, Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestParameters>(request);
276+
}
277+
278+
public virtual Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse Get(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, System.Action<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor> action)
279+
{
280+
var builder = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor(taskType);
281+
action.Invoke(builder);
282+
var request = builder.Instance;
283+
request.BeforeRequest();
284+
return DoRequest<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest, Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse, Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestParameters>(request);
285+
}
286+
270287
public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse> GetAsync(Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest request, System.Threading.CancellationToken cancellationToken = default)
271288
{
272289
request.BeforeRequest();
@@ -324,6 +341,23 @@ public virtual Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse Get(
324341
return DoRequestAsync<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest, Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse, Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestParameters>(request, cancellationToken);
325342
}
326343

344+
public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse> GetAsync(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, System.Threading.CancellationToken cancellationToken = default)
345+
{
346+
var builder = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor(taskType);
347+
var request = builder.Instance;
348+
request.BeforeRequest();
349+
return DoRequestAsync<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest, Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse, Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestParameters>(request, cancellationToken);
350+
}
351+
352+
public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse> GetAsync(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, System.Action<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor> action, System.Threading.CancellationToken cancellationToken = default)
353+
{
354+
var builder = new Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestDescriptor(taskType);
355+
action.Invoke(builder);
356+
var request = builder.Instance;
357+
request.BeforeRequest();
358+
return DoRequestAsync<Elastic.Clients.Elasticsearch.Inference.GetInferenceRequest, Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse, Elastic.Clients.Elasticsearch.Inference.GetInferenceRequestParameters>(request, cancellationToken);
359+
}
360+
327361
public virtual Elastic.Clients.Elasticsearch.Inference.InferenceResponse Inference(Elastic.Clients.Elasticsearch.Inference.InferenceRequest request)
328362
{
329363
request.BeforeRequest();

src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermLookup.Converters.g.cs

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,36 @@ namespace Elastic.Clients.Elasticsearch.Aggregations.Json;
2525

2626
public sealed partial class MultiTermLookupConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.Aggregations.MultiTermLookup>
2727
{
28-
private static readonly System.Text.Json.JsonEncodedText PropField = System.Text.Json.JsonEncodedText.Encode("field"u8);
2928
private static readonly System.Text.Json.JsonEncodedText PropMissing = System.Text.Json.JsonEncodedText.Encode("missing"u8);
29+
private static readonly System.Text.Json.JsonEncodedText VariantField = System.Text.Json.JsonEncodedText.Encode("field");
30+
private static readonly System.Text.Json.JsonEncodedText VariantScript = System.Text.Json.JsonEncodedText.Encode("script");
3031

3132
public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermLookup Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
3233
{
3334
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
34-
LocalJsonValue<Elastic.Clients.Elasticsearch.Field> propField = default;
3535
LocalJsonValue<object?> propMissing = default;
36+
string? variantType = null;
37+
object? variant = null;
3638
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
3739
{
38-
if (propField.TryReadProperty(ref reader, options, PropField, null))
40+
if (propMissing.TryReadProperty(ref reader, options, PropMissing, null))
3941
{
4042
continue;
4143
}
4244

43-
if (propMissing.TryReadProperty(ref reader, options, PropMissing, null))
45+
if (reader.ValueTextEquals(VariantField))
4446
{
47+
variantType = VariantField.Value;
48+
reader.Read();
49+
variant = reader.ReadValue<Elastic.Clients.Elasticsearch.Field>(options, null);
50+
continue;
51+
}
52+
53+
if (reader.ValueTextEquals(VariantScript))
54+
{
55+
variantType = VariantScript.Value;
56+
reader.Read();
57+
variant = reader.ReadValue<Elastic.Clients.Elasticsearch.Script>(options, null);
4558
continue;
4659
}
4760

@@ -57,15 +70,29 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermLookup Read(
5770
reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
5871
return new Elastic.Clients.Elasticsearch.Aggregations.MultiTermLookup(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
5972
{
60-
Field = propField.Value,
73+
VariantType = variantType,
74+
Variant = variant,
6175
Missing = propMissing.Value
6276
};
6377
}
6478

6579
public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MultiTermLookup value, System.Text.Json.JsonSerializerOptions options)
6680
{
6781
writer.WriteStartObject();
68-
writer.WriteProperty(options, PropField, value.Field, null, null);
82+
switch (value.VariantType)
83+
{
84+
case null:
85+
break;
86+
case "field":
87+
writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Field)value.Variant, null, null);
88+
break;
89+
case "script":
90+
writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Script)value.Variant, null, null);
91+
break;
92+
default:
93+
throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Aggregations.MultiTermLookup)}'.");
94+
}
95+
6996
writer.WriteProperty(options, PropMissing, value.Missing, null, null);
7097
writer.WriteEndObject();
7198
}

0 commit comments

Comments
 (0)