diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
index d21f64b5921..111c0c9bdce 100644
--- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
+++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
@@ -16,9 +16,14 @@
true
true
annotations
+ true
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
index ed385a30bf7..2bb7a2d0e9a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
@@ -64,6 +64,14 @@ public AsyncSearchStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r =>
internal override string OperationName => "async_search.status";
+ ///
+ ///
+ /// A unique identifier for the async search.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
///
///
/// Specifies how long the async search needs to be available.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
index 126481dc53a..6322c26864c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
@@ -18,14 +18,161 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
+internal sealed partial class AsyncSearchStatusResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropClusters = System.Text.Json.JsonEncodedText.Encode("_clusters");
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionStatus = System.Text.Json.JsonEncodedText.Encode("completion_status");
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionTime = System.Text.Json.JsonEncodedText.Encode("completion_time");
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionTimeInMillis = System.Text.Json.JsonEncodedText.Encode("completion_time_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropExpirationTime = System.Text.Json.JsonEncodedText.Encode("expiration_time");
+ private static readonly System.Text.Json.JsonEncodedText PropExpirationTimeInMillis = System.Text.Json.JsonEncodedText.Encode("expiration_time_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id");
+ private static readonly System.Text.Json.JsonEncodedText PropIsPartial = System.Text.Json.JsonEncodedText.Encode("is_partial");
+ private static readonly System.Text.Json.JsonEncodedText PropIsRunning = System.Text.Json.JsonEncodedText.Encode("is_running");
+ private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropStartTime = System.Text.Json.JsonEncodedText.Encode("start_time");
+ private static readonly System.Text.Json.JsonEncodedText PropStartTimeInMillis = System.Text.Json.JsonEncodedText.Encode("start_time_in_millis");
+
+ public override AsyncSearchStatusResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propClusters = default;
+ LocalJsonProperty propCompletionStatus = default;
+ LocalJsonProperty propCompletionTime = default;
+ LocalJsonProperty propCompletionTimeInMillis = default;
+ LocalJsonProperty propExpirationTime = default;
+ LocalJsonProperty propExpirationTimeInMillis = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIsPartial = default;
+ LocalJsonProperty propIsRunning = default;
+ LocalJsonProperty propShards = default;
+ LocalJsonProperty propStartTime = default;
+ LocalJsonProperty propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propClusters.TryRead(ref reader, options, PropClusters))
+ {
+ continue;
+ }
+
+ if (propCompletionStatus.TryRead(ref reader, options, PropCompletionStatus))
+ {
+ continue;
+ }
+
+ if (propCompletionTime.TryRead(ref reader, options, PropCompletionTime))
+ {
+ continue;
+ }
+
+ if (propCompletionTimeInMillis.TryRead(ref reader, options, PropCompletionTimeInMillis))
+ {
+ continue;
+ }
+
+ if (propExpirationTime.TryRead(ref reader, options, PropExpirationTime))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryRead(ref reader, options, PropExpirationTimeInMillis))
+ {
+ continue;
+ }
+
+ if (propId.TryRead(ref reader, options, PropId))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryRead(ref reader, options, PropIsPartial))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryRead(ref reader, options, PropIsRunning))
+ {
+ continue;
+ }
+
+ if (propShards.TryRead(ref reader, options, PropShards))
+ {
+ continue;
+ }
+
+ if (propStartTime.TryRead(ref reader, options, PropStartTime))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryRead(ref reader, options, PropStartTimeInMillis))
+ {
+ 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 AsyncSearchStatusResponse
+ {
+ Clusters = propClusters.Value
+,
+ CompletionStatus = propCompletionStatus.Value
+,
+ CompletionTime = propCompletionTime.Value
+,
+ CompletionTimeInMillis = propCompletionTimeInMillis.Value
+,
+ ExpirationTime = propExpirationTime.Value
+,
+ ExpirationTimeInMillis = propExpirationTimeInMillis.Value
+,
+ Id = propId.Value
+,
+ IsPartial = propIsPartial.Value
+,
+ IsRunning = propIsRunning.Value
+,
+ Shards = propShards.Value
+,
+ StartTime = propStartTime.Value
+,
+ StartTimeInMillis = propStartTimeInMillis.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, AsyncSearchStatusResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropClusters, value.Clusters);
+ writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus);
+ writer.WriteProperty(options, PropCompletionTime, value.CompletionTime);
+ writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis);
+ writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis);
+ writer.WriteProperty(options, PropId, value.Id);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning);
+ writer.WriteProperty(options, PropShards, value.Shards);
+ writer.WriteProperty(options, PropStartTime, value.StartTime);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(AsyncSearchStatusResponseConverter))]
public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
{
///
@@ -34,7 +181,6 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// Not shown for local-only searches.
///
///
- [JsonInclude, JsonPropertyName("_clusters")]
public Elastic.Clients.Elasticsearch.ClusterStatistics? Clusters { get; init; }
///
@@ -44,7 +190,6 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// 503 indicates that the async search was completed with an error.
///
///
- [JsonInclude, JsonPropertyName("completion_status")]
public int? CompletionStatus { get; init; }
///
@@ -53,9 +198,7 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// when the search has completed.
///
///
- [JsonInclude, JsonPropertyName("completion_time")]
public DateTimeOffset? CompletionTime { get; init; }
- [JsonInclude, JsonPropertyName("completion_time_in_millis")]
public long? CompletionTimeInMillis { get; init; }
///
@@ -63,11 +206,8 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// Indicates when the async search will expire.
///
///
- [JsonInclude, JsonPropertyName("expiration_time")]
public DateTimeOffset? ExpirationTime { get; init; }
- [JsonInclude, JsonPropertyName("expiration_time_in_millis")]
public long ExpirationTimeInMillis { get; init; }
- [JsonInclude, JsonPropertyName("id")]
public string? Id { get; init; }
///
@@ -76,7 +216,6 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// While the query is running, is_partial is always set to true.
///
///
- [JsonInclude, JsonPropertyName("is_partial")]
public bool IsPartial { get; init; }
///
@@ -85,7 +224,6 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false.
///
///
- [JsonInclude, JsonPropertyName("is_running")]
public bool IsRunning { get; init; }
///
@@ -93,10 +231,7 @@ public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
/// Indicates how many shards have run the query so far.
///
///
- [JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
- [JsonInclude, JsonPropertyName("start_time")]
public DateTimeOffset? StartTime { get; init; }
- [JsonInclude, JsonPropertyName("start_time_in_millis")]
public long StartTimeInMillis { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
index e59001fda74..a530d5fd198 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
@@ -57,6 +57,14 @@ public DeleteAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r =>
internal override bool SupportsBody => false;
internal override string OperationName => "async_search.delete";
+
+ ///
+ ///
+ /// A unique identifier for the async search.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
index ea208db9469..89e3520aaf5 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
+internal sealed partial class DeleteAsyncSearchResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override DeleteAsyncSearchResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 DeleteAsyncSearchResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteAsyncSearchResponseConverter))]
public sealed partial class DeleteAsyncSearchResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class DeleteAsyncSearchResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
index c2884fe1b43..c109e997696 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
@@ -83,6 +83,14 @@ public GetAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.
internal override string OperationName => "async_search.get";
+ ///
+ ///
+ /// A unique identifier for the async search.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
///
///
/// Specifies how long the async search should be available in the cluster.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
index 3dd949e280f..1fea174d7cd 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
@@ -18,14 +18,158 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
+internal sealed partial class GetAsyncSearchResponseConverter : System.Text.Json.Serialization.JsonConverter>
+{
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionTime = System.Text.Json.JsonEncodedText.Encode("completion_time");
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionTimeInMillis = System.Text.Json.JsonEncodedText.Encode("completion_time_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropExpirationTime = System.Text.Json.JsonEncodedText.Encode("expiration_time");
+ private static readonly System.Text.Json.JsonEncodedText PropExpirationTimeInMillis = System.Text.Json.JsonEncodedText.Encode("expiration_time_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id");
+ private static readonly System.Text.Json.JsonEncodedText PropIsPartial = System.Text.Json.JsonEncodedText.Encode("is_partial");
+ private static readonly System.Text.Json.JsonEncodedText PropIsRunning = System.Text.Json.JsonEncodedText.Encode("is_running");
+ private static readonly System.Text.Json.JsonEncodedText PropResponse = System.Text.Json.JsonEncodedText.Encode("response");
+ private static readonly System.Text.Json.JsonEncodedText PropStartTime = System.Text.Json.JsonEncodedText.Encode("start_time");
+ private static readonly System.Text.Json.JsonEncodedText PropStartTimeInMillis = System.Text.Json.JsonEncodedText.Encode("start_time_in_millis");
+
+ public override GetAsyncSearchResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propCompletionTime = default;
+ LocalJsonProperty propCompletionTimeInMillis = default;
+ LocalJsonProperty propExpirationTime = default;
+ LocalJsonProperty propExpirationTimeInMillis = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIsPartial = default;
+ LocalJsonProperty propIsRunning = default;
+ LocalJsonProperty> propResponse = default;
+ LocalJsonProperty propStartTime = default;
+ LocalJsonProperty propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCompletionTime.TryRead(ref reader, options, PropCompletionTime))
+ {
+ continue;
+ }
+
+ if (propCompletionTimeInMillis.TryRead(ref reader, options, PropCompletionTimeInMillis))
+ {
+ continue;
+ }
+
+ if (propExpirationTime.TryRead(ref reader, options, PropExpirationTime))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryRead(ref reader, options, PropExpirationTimeInMillis))
+ {
+ continue;
+ }
+
+ if (propId.TryRead(ref reader, options, PropId))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryRead(ref reader, options, PropIsPartial))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryRead(ref reader, options, PropIsRunning))
+ {
+ continue;
+ }
+
+ if (propResponse.TryRead(ref reader, options, PropResponse))
+ {
+ continue;
+ }
+
+ if (propStartTime.TryRead(ref reader, options, PropStartTime))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryRead(ref reader, options, PropStartTimeInMillis))
+ {
+ 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 GetAsyncSearchResponse
+ {
+ CompletionTime = propCompletionTime.Value
+,
+ CompletionTimeInMillis = propCompletionTimeInMillis.Value
+,
+ ExpirationTime = propExpirationTime.Value
+,
+ ExpirationTimeInMillis = propExpirationTimeInMillis.Value
+,
+ Id = propId.Value
+,
+ IsPartial = propIsPartial.Value
+,
+ IsRunning = propIsRunning.Value
+,
+ Response = propResponse.Value
+,
+ StartTime = propStartTime.Value
+,
+ StartTimeInMillis = propStartTimeInMillis.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, GetAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropCompletionTime, value.CompletionTime);
+ writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis);
+ writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis);
+ writer.WriteProperty(options, PropId, value.Id);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning);
+ writer.WriteProperty(options, PropResponse, value.Response);
+ writer.WriteProperty(options, PropStartTime, value.StartTime);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis);
+ writer.WriteEndObject();
+ }
+}
+
+internal sealed partial class GetAsyncSearchResponseConverterFactory : System.Text.Json.Serialization.JsonConverterFactory
+{
+ public override bool CanConvert(System.Type typeToConvert)
+ {
+ return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(GetAsyncSearchResponse<>);
+ }
+
+ public override System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ var args = typeToConvert.GetGenericArguments();
+#pragma warning disable IL3050
+ var converter = (System.Text.Json.Serialization.JsonConverter)System.Activator.CreateInstance(typeof(GetAsyncSearchResponseConverter<>).MakeGenericType(args[0]), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public, binder: null, args: null, culture: null)!;
+#pragma warning restore IL3050
+ return converter;
+ }
+}
+
+[JsonConverter(typeof(GetAsyncSearchResponseConverterFactory))]
public sealed partial class GetAsyncSearchResponse : ElasticsearchResponse
{
///
@@ -34,9 +178,7 @@ public sealed partial class GetAsyncSearchResponse : ElasticsearchRes
/// when the search has completed.
///
///
- [JsonInclude, JsonPropertyName("completion_time")]
public DateTimeOffset? CompletionTime { get; init; }
- [JsonInclude, JsonPropertyName("completion_time_in_millis")]
public long? CompletionTimeInMillis { get; init; }
///
@@ -44,11 +186,8 @@ public sealed partial class GetAsyncSearchResponse : ElasticsearchRes
/// Indicates when the async search will expire.
///
///
- [JsonInclude, JsonPropertyName("expiration_time")]
public DateTimeOffset? ExpirationTime { get; init; }
- [JsonInclude, JsonPropertyName("expiration_time_in_millis")]
public long ExpirationTimeInMillis { get; init; }
- [JsonInclude, JsonPropertyName("id")]
public string? Id { get; init; }
///
@@ -57,7 +196,6 @@ public sealed partial class GetAsyncSearchResponse : ElasticsearchRes
/// While the query is running, is_partial is always set to true.
///
///
- [JsonInclude, JsonPropertyName("is_partial")]
public bool IsPartial { get; init; }
///
@@ -66,12 +204,8 @@ public sealed partial class GetAsyncSearchResponse : ElasticsearchRes
/// NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false.
///
///
- [JsonInclude, JsonPropertyName("is_running")]
public bool IsRunning { get; init; }
- [JsonInclude, JsonPropertyName("response")]
public Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearch Response { get; init; }
- [JsonInclude, JsonPropertyName("start_time")]
public DateTimeOffset? StartTime { get; init; }
- [JsonInclude, JsonPropertyName("start_time_in_millis")]
public long StartTimeInMillis { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
index db47e9c2ee2..4bba0e7665e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
@@ -18,6 +18,7 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Requests;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport;
@@ -231,410 +232,346 @@ public sealed partial class SubmitAsyncSearchRequestParameters : RequestParamete
public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
}
-internal sealed partial class SubmitAsyncSearchRequestConverter : JsonConverter
+internal sealed partial class SubmitAsyncSearchRequestConverter : System.Text.Json.Serialization.JsonConverter
{
- public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
- {
- if (reader.TokenType != JsonTokenType.StartObject)
- throw new JsonException("Unexpected JSON detected.");
- var variant = new SubmitAsyncSearchRequest();
- while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
- {
- if (reader.TokenType == JsonTokenType.PropertyName)
+ private static readonly System.Text.Json.JsonEncodedText PropAggregations = System.Text.Json.JsonEncodedText.Encode("aggregations");
+ private static readonly System.Text.Json.JsonEncodedText PropAggregations1 = System.Text.Json.JsonEncodedText.Encode("aggs");
+ private static readonly System.Text.Json.JsonEncodedText PropCollapse = System.Text.Json.JsonEncodedText.Encode("collapse");
+ private static readonly System.Text.Json.JsonEncodedText PropDocvalueFields = System.Text.Json.JsonEncodedText.Encode("docvalue_fields");
+ private static readonly System.Text.Json.JsonEncodedText PropExplain = System.Text.Json.JsonEncodedText.Encode("explain");
+ private static readonly System.Text.Json.JsonEncodedText PropExt = System.Text.Json.JsonEncodedText.Encode("ext");
+ private static readonly System.Text.Json.JsonEncodedText PropFields = System.Text.Json.JsonEncodedText.Encode("fields");
+ private static readonly System.Text.Json.JsonEncodedText PropFrom = System.Text.Json.JsonEncodedText.Encode("from");
+ private static readonly System.Text.Json.JsonEncodedText PropHighlight = System.Text.Json.JsonEncodedText.Encode("highlight");
+ private static readonly System.Text.Json.JsonEncodedText PropIndicesBoost = System.Text.Json.JsonEncodedText.Encode("indices_boost");
+ private static readonly System.Text.Json.JsonEncodedText PropKnn = System.Text.Json.JsonEncodedText.Encode("knn");
+ private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score");
+ private static readonly System.Text.Json.JsonEncodedText PropPit = System.Text.Json.JsonEncodedText.Encode("pit");
+ private static readonly System.Text.Json.JsonEncodedText PropPostFilter = System.Text.Json.JsonEncodedText.Encode("post_filter");
+ private static readonly System.Text.Json.JsonEncodedText PropProfile = System.Text.Json.JsonEncodedText.Encode("profile");
+ private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query");
+ private static readonly System.Text.Json.JsonEncodedText PropRescore = System.Text.Json.JsonEncodedText.Encode("rescore");
+ private static readonly System.Text.Json.JsonEncodedText PropRuntimeMappings = System.Text.Json.JsonEncodedText.Encode("runtime_mappings");
+ private static readonly System.Text.Json.JsonEncodedText PropScriptFields = System.Text.Json.JsonEncodedText.Encode("script_fields");
+ private static readonly System.Text.Json.JsonEncodedText PropSearchAfter = System.Text.Json.JsonEncodedText.Encode("search_after");
+ private static readonly System.Text.Json.JsonEncodedText PropSeqNoPrimaryTerm = System.Text.Json.JsonEncodedText.Encode("seq_no_primary_term");
+ private static readonly System.Text.Json.JsonEncodedText PropSize = System.Text.Json.JsonEncodedText.Encode("size");
+ 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");
+ private static readonly System.Text.Json.JsonEncodedText PropSource = System.Text.Json.JsonEncodedText.Encode("_source");
+ private static readonly System.Text.Json.JsonEncodedText PropStats = System.Text.Json.JsonEncodedText.Encode("stats");
+ private static readonly System.Text.Json.JsonEncodedText PropStoredFields = System.Text.Json.JsonEncodedText.Encode("stored_fields");
+ private static readonly System.Text.Json.JsonEncodedText PropSuggest = System.Text.Json.JsonEncodedText.Encode("suggest");
+ private static readonly System.Text.Json.JsonEncodedText PropTerminateAfter = System.Text.Json.JsonEncodedText.Encode("terminate_after");
+ private static readonly System.Text.Json.JsonEncodedText PropTimeout = System.Text.Json.JsonEncodedText.Encode("timeout");
+ private static readonly System.Text.Json.JsonEncodedText PropTrackScores = System.Text.Json.JsonEncodedText.Encode("track_scores");
+ private static readonly System.Text.Json.JsonEncodedText PropTrackTotalHits = System.Text.Json.JsonEncodedText.Encode("track_total_hits");
+ private static readonly System.Text.Json.JsonEncodedText PropVersion = System.Text.Json.JsonEncodedText.Encode("version");
+
+ public override SubmitAsyncSearchRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty?> propAggregations = default;
+ LocalJsonProperty propCollapse = default;
+ LocalJsonProperty?> propDocvalueFields = default;
+ LocalJsonProperty propExplain = default;
+ LocalJsonProperty?> propExt = default;
+ LocalJsonProperty?> propFields = default;
+ LocalJsonProperty propFrom = default;
+ LocalJsonProperty propHighlight = default;
+ LocalJsonProperty>?> propIndicesBoost = default;
+ LocalJsonProperty?> propKnn = default;
+ LocalJsonProperty propMinScore = default;
+ LocalJsonProperty propPit = default;
+ LocalJsonProperty propPostFilter = default;
+ LocalJsonProperty propProfile = default;
+ LocalJsonProperty propQuery = default;
+ LocalJsonProperty?> propRescore = default;
+ LocalJsonProperty?> propRuntimeMappings = default;
+ LocalJsonProperty?> propScriptFields = default;
+ LocalJsonProperty?> propSearchAfter = default;
+ LocalJsonProperty propSeqNoPrimaryTerm = default;
+ LocalJsonProperty propSize = default;
+ LocalJsonProperty propSlice = default;
+ LocalJsonProperty?> propSort = default;
+ LocalJsonProperty propSource = default;
+ LocalJsonProperty?> propStats = default;
+ LocalJsonProperty propStoredFields = default;
+ LocalJsonProperty propSuggest = default;
+ LocalJsonProperty propTerminateAfter = default;
+ LocalJsonProperty propTimeout = default;
+ LocalJsonProperty propTrackScores = default;
+ LocalJsonProperty propTrackTotalHits = default;
+ LocalJsonProperty propVersion = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAggregations.TryRead(ref reader, options, PropAggregations) || propAggregations.TryRead(ref reader, options, PropAggregations1))
{
- var property = reader.GetString();
- if (property == "aggregations" || property == "aggs")
- {
- variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "collapse")
- {
- variant.Collapse = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "docvalue_fields")
- {
- variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "explain")
- {
- variant.Explain = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "ext")
- {
- variant.Ext = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "fields")
- {
- variant.Fields = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "from")
- {
- variant.From = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "highlight")
- {
- variant.Highlight = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "indices_boost")
- {
- variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options);
- continue;
- }
-
- if (property == "knn")
- {
- variant.Knn = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "min_score")
- {
- variant.MinScore = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "pit")
- {
- variant.Pit = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "post_filter")
- {
- variant.PostFilter = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "profile")
- {
- variant.Profile = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "query")
- {
- variant.Query = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "rescore")
- {
- variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "runtime_mappings")
- {
- variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "script_fields")
- {
- variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "search_after")
- {
- variant.SearchAfter = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "seq_no_primary_term")
- {
- variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "size")
- {
- variant.Size = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "slice")
- {
- variant.Slice = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "sort")
- {
- variant.Sort = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "_source")
- {
- variant.Source = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "stats")
- {
- variant.Stats = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
- if (property == "stored_fields")
- {
- variant.StoredFields = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "suggest")
- {
- variant.Suggest = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "terminate_after")
- {
- variant.TerminateAfter = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "timeout")
- {
- variant.Timeout = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "track_scores")
- {
- variant.TrackScores = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "track_total_hits")
- {
- variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "version")
- {
- variant.Version = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
+ continue;
}
- }
-
- return variant;
- }
-
- public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value, JsonSerializerOptions options)
- {
- writer.WriteStartObject();
- if (value.Aggregations is not null)
- {
- writer.WritePropertyName("aggregations");
- JsonSerializer.Serialize(writer, value.Aggregations, options);
- }
- if (value.Collapse is not null)
- {
- writer.WritePropertyName("collapse");
- JsonSerializer.Serialize(writer, value.Collapse, options);
- }
+ if (propCollapse.TryRead(ref reader, options, PropCollapse))
+ {
+ continue;
+ }
- if (value.DocvalueFields is not null)
- {
- writer.WritePropertyName("docvalue_fields");
- JsonSerializer.Serialize(writer, value.DocvalueFields, options);
- }
+ if (propDocvalueFields.TryRead(ref reader, options, PropDocvalueFields))
+ {
+ continue;
+ }
- if (value.Explain.HasValue)
- {
- writer.WritePropertyName("explain");
- writer.WriteBooleanValue(value.Explain.Value);
- }
+ if (propExplain.TryRead(ref reader, options, PropExplain))
+ {
+ continue;
+ }
- if (value.Ext is not null)
- {
- writer.WritePropertyName("ext");
- JsonSerializer.Serialize(writer, value.Ext, options);
- }
+ if (propExt.TryRead(ref reader, options, PropExt))
+ {
+ continue;
+ }
- if (value.Fields is not null)
- {
- writer.WritePropertyName("fields");
- JsonSerializer.Serialize(writer, value.Fields, options);
- }
+ if (propFields.TryRead(ref reader, options, PropFields))
+ {
+ continue;
+ }
- if (value.From.HasValue)
- {
- writer.WritePropertyName("from");
- writer.WriteNumberValue(value.From.Value);
- }
+ if (propFrom.TryRead(ref reader, options, PropFrom))
+ {
+ continue;
+ }
- if (value.Highlight is not null)
- {
- writer.WritePropertyName("highlight");
- JsonSerializer.Serialize(writer, value.Highlight, options);
- }
+ if (propHighlight.TryRead(ref reader, options, PropHighlight))
+ {
+ continue;
+ }
- if (value.IndicesBoost is not null)
- {
- writer.WritePropertyName("indices_boost");
- JsonSerializer.Serialize(writer, value.IndicesBoost, options);
- }
+ if (propIndicesBoost.TryRead(ref reader, options, PropIndicesBoost))
+ {
+ continue;
+ }
- if (value.Knn is not null)
- {
- writer.WritePropertyName("knn");
- JsonSerializer.Serialize(writer, value.Knn, options);
- }
+ if (propKnn.TryRead(ref reader, options, PropKnn, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.KnnSearch>)))
+ {
+ continue;
+ }
- if (value.MinScore.HasValue)
- {
- writer.WritePropertyName("min_score");
- writer.WriteNumberValue(value.MinScore.Value);
- }
+ if (propMinScore.TryRead(ref reader, options, PropMinScore))
+ {
+ continue;
+ }
- if (value.Pit is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, value.Pit, options);
- }
+ if (propPit.TryRead(ref reader, options, PropPit))
+ {
+ continue;
+ }
- if (value.PostFilter is not null)
- {
- writer.WritePropertyName("post_filter");
- JsonSerializer.Serialize(writer, value.PostFilter, options);
- }
+ if (propPostFilter.TryRead(ref reader, options, PropPostFilter))
+ {
+ continue;
+ }
- if (value.Profile.HasValue)
- {
- writer.WritePropertyName("profile");
- writer.WriteBooleanValue(value.Profile.Value);
- }
+ if (propProfile.TryRead(ref reader, options, PropProfile))
+ {
+ continue;
+ }
- if (value.Query is not null)
- {
- writer.WritePropertyName("query");
- JsonSerializer.Serialize(writer, value.Query, options);
- }
+ if (propQuery.TryRead(ref reader, options, PropQuery))
+ {
+ continue;
+ }
- if (value.Rescore is not null)
- {
- writer.WritePropertyName("rescore");
- JsonSerializer.Serialize(writer, value.Rescore, options);
- }
+ if (propRescore.TryRead(ref reader, options, PropRescore, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.Core.Search.Rescore>)))
+ {
+ continue;
+ }
- if (value.RuntimeMappings is not null)
- {
- writer.WritePropertyName("runtime_mappings");
- JsonSerializer.Serialize(writer, value.RuntimeMappings, options);
- }
+ if (propRuntimeMappings.TryRead(ref reader, options, PropRuntimeMappings))
+ {
+ continue;
+ }
- if (value.ScriptFields is not null)
- {
- writer.WritePropertyName("script_fields");
- JsonSerializer.Serialize(writer, value.ScriptFields, options);
- }
+ if (propScriptFields.TryRead(ref reader, options, PropScriptFields))
+ {
+ continue;
+ }
- if (value.SearchAfter is not null)
- {
- writer.WritePropertyName("search_after");
- JsonSerializer.Serialize(writer, value.SearchAfter, options);
- }
+ if (propSearchAfter.TryRead(ref reader, options, PropSearchAfter))
+ {
+ continue;
+ }
- if (value.SeqNoPrimaryTerm.HasValue)
- {
- writer.WritePropertyName("seq_no_primary_term");
- writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value);
- }
+ if (propSeqNoPrimaryTerm.TryRead(ref reader, options, PropSeqNoPrimaryTerm))
+ {
+ continue;
+ }
- if (value.Size.HasValue)
- {
- writer.WritePropertyName("size");
- writer.WriteNumberValue(value.Size.Value);
- }
+ if (propSize.TryRead(ref reader, options, PropSize))
+ {
+ continue;
+ }
- if (value.Slice is not null)
- {
- writer.WritePropertyName("slice");
- JsonSerializer.Serialize(writer, value.Slice, options);
- }
+ if (propSlice.TryRead(ref reader, options, PropSlice))
+ {
+ continue;
+ }
- if (value.Sort is not null)
- {
- writer.WritePropertyName("sort");
- JsonSerializer.Serialize(writer, value.Sort, options);
- }
+ if (propSort.TryRead(ref reader, options, PropSort, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.SortOptions>)))
+ {
+ continue;
+ }
- if (value.Source is not null)
- {
- writer.WritePropertyName("_source");
- JsonSerializer.Serialize(writer, value.Source, options);
- }
+ if (propSource.TryRead(ref reader, options, PropSource))
+ {
+ continue;
+ }
- if (value.Stats is not null)
- {
- writer.WritePropertyName("stats");
- JsonSerializer.Serialize(writer, value.Stats, options);
- }
+ if (propStats.TryRead(ref reader, options, PropStats))
+ {
+ continue;
+ }
- if (value.StoredFields is not null)
- {
- writer.WritePropertyName("stored_fields");
- new FieldsConverter().Write(writer, value.StoredFields, options);
- }
+ if (propStoredFields.TryRead(ref reader, options, PropStoredFields, typeof(SingleOrManyFieldsMarker)))
+ {
+ continue;
+ }
- if (value.Suggest is not null)
- {
- writer.WritePropertyName("suggest");
- JsonSerializer.Serialize(writer, value.Suggest, options);
- }
+ if (propSuggest.TryRead(ref reader, options, PropSuggest))
+ {
+ continue;
+ }
- if (value.TerminateAfter.HasValue)
- {
- writer.WritePropertyName("terminate_after");
- writer.WriteNumberValue(value.TerminateAfter.Value);
- }
+ if (propTerminateAfter.TryRead(ref reader, options, PropTerminateAfter))
+ {
+ continue;
+ }
- if (!string.IsNullOrEmpty(value.Timeout))
- {
- writer.WritePropertyName("timeout");
- writer.WriteStringValue(value.Timeout);
- }
+ if (propTimeout.TryRead(ref reader, options, PropTimeout))
+ {
+ continue;
+ }
- if (value.TrackScores.HasValue)
- {
- writer.WritePropertyName("track_scores");
- writer.WriteBooleanValue(value.TrackScores.Value);
- }
+ if (propTrackScores.TryRead(ref reader, options, PropTrackScores))
+ {
+ continue;
+ }
- if (value.TrackTotalHits is not null)
- {
- writer.WritePropertyName("track_total_hits");
- JsonSerializer.Serialize(writer, value.TrackTotalHits, options);
- }
+ if (propTrackTotalHits.TryRead(ref reader, options, PropTrackTotalHits))
+ {
+ continue;
+ }
- if (value.Version.HasValue)
- {
- writer.WritePropertyName("version");
- writer.WriteBooleanValue(value.Version.Value);
- }
+ if (propVersion.TryRead(ref reader, options, PropVersion))
+ {
+ 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 SubmitAsyncSearchRequest
+ {
+ Aggregations = propAggregations.Value
+ ,
+ Collapse = propCollapse.Value
+ ,
+ DocvalueFields = propDocvalueFields.Value
+ ,
+ Explain = propExplain.Value
+ ,
+ Ext = propExt.Value
+ ,
+ Fields = propFields.Value
+ ,
+ From = propFrom.Value
+ ,
+ Highlight = propHighlight.Value
+ ,
+ IndicesBoost = propIndicesBoost.Value
+ ,
+ Knn = propKnn.Value
+ ,
+ MinScore = propMinScore.Value
+ ,
+ Pit = propPit.Value
+ ,
+ PostFilter = propPostFilter.Value
+ ,
+ Profile = propProfile.Value
+ ,
+ Query = propQuery.Value
+ ,
+ Rescore = propRescore.Value
+ ,
+ RuntimeMappings = propRuntimeMappings.Value
+ ,
+ ScriptFields = propScriptFields.Value
+ ,
+ SearchAfter = propSearchAfter.Value
+ ,
+ SeqNoPrimaryTerm = propSeqNoPrimaryTerm.Value
+ ,
+ Size = propSize.Value
+ ,
+ Slice = propSlice.Value
+ ,
+ Sort = propSort.Value
+ ,
+ Source = propSource.Value
+ ,
+ Stats = propStats.Value
+ ,
+ StoredFields = propStoredFields.Value
+ ,
+ Suggest = propSuggest.Value
+ ,
+ TerminateAfter = propTerminateAfter.Value
+ ,
+ Timeout = propTimeout.Value
+ ,
+ TrackScores = propTrackScores.Value
+ ,
+ TrackTotalHits = propTrackTotalHits.Value
+ ,
+ Version = propVersion.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, SubmitAsyncSearchRequest value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAggregations, value.Aggregations);
+ writer.WriteProperty(options, PropCollapse, value.Collapse);
+ writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields);
+ writer.WriteProperty(options, PropExplain, value.Explain);
+ writer.WriteProperty(options, PropExt, value.Ext);
+ writer.WriteProperty(options, PropFields, value.Fields);
+ writer.WriteProperty(options, PropFrom, value.From);
+ writer.WriteProperty(options, PropHighlight, value.Highlight);
+ writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost);
+ writer.WriteProperty(options, PropKnn, value.Knn, null, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.KnnSearch>));
+ writer.WriteProperty(options, PropMinScore, value.MinScore);
+ writer.WriteProperty(options, PropPit, value.Pit);
+ writer.WriteProperty(options, PropPostFilter, value.PostFilter);
+ writer.WriteProperty(options, PropProfile, value.Profile);
+ writer.WriteProperty(options, PropQuery, value.Query);
+ writer.WriteProperty(options, PropRescore, value.Rescore, null, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.Core.Search.Rescore>));
+ writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings);
+ writer.WriteProperty(options, PropScriptFields, value.ScriptFields);
+ writer.WriteProperty(options, PropSearchAfter, value.SearchAfter);
+ writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm);
+ writer.WriteProperty(options, PropSize, value.Size);
+ writer.WriteProperty(options, PropSlice, value.Slice);
+ writer.WriteProperty(options, PropSort, value.Sort, null, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.SortOptions>));
+ writer.WriteProperty(options, PropSource, value.Source);
+ writer.WriteProperty(options, PropStats, value.Stats);
+ writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, typeof(SingleOrManyFieldsMarker));
+ writer.WriteProperty(options, PropSuggest, value.Suggest);
+ writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter);
+ writer.WriteProperty(options, PropTimeout, value.Timeout);
+ writer.WriteProperty(options, PropTrackScores, value.TrackScores);
+ writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits);
+ writer.WriteProperty(options, PropVersion, value.Version);
writer.WriteEndObject();
}
}
@@ -673,12 +610,18 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
internal override string OperationName => "async_search.submit";
+ ///
+ ///
+ /// A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Indices? Indices { get => P("index"); set => PO("index", value); }
+
///
///
/// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
///
///
- [JsonIgnore]
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
///
@@ -686,7 +629,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Indicate if an error should be returned if there is a partial search failure or timeout
///
///
- [JsonIgnore]
public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); }
///
@@ -694,7 +636,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// The analyzer to use for the query string
///
///
- [JsonIgnore]
public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); }
///
@@ -702,7 +643,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specify whether wildcard and prefix queries should be analyzed (default: false)
///
///
- [JsonIgnore]
public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); }
///
@@ -711,7 +651,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).
///
///
- [JsonIgnore]
public long? BatchedReduceSize { get => Q("batched_reduce_size"); set => Q("batched_reduce_size", value); }
///
@@ -719,7 +658,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// The default value is the only supported value.
///
///
- [JsonIgnore]
public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); }
///
@@ -727,7 +665,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// The default operator for query string query (AND or OR)
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); }
///
@@ -735,7 +672,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// The field to use as default where no field prefix is given in the query string
///
///
- [JsonIgnore]
public string? Df { get => Q("df"); set => Q("df", value); }
///
@@ -743,7 +679,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Whether to expand wildcard expression to concrete indices that are open, closed or both.
///
///
- [JsonIgnore]
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
///
@@ -751,7 +686,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Whether specified concrete, expanded or aliased indices should be ignored when throttled
///
///
- [JsonIgnore]
public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); }
///
@@ -759,7 +693,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Whether specified concrete indices should be ignored when unavailable (missing or closed)
///
///
- [JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
///
@@ -767,7 +700,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// If true, results are stored for later retrieval when the search completes within the wait_for_completion_timeout.
///
///
- [JsonIgnore]
public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
///
@@ -775,7 +707,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
///
///
- [JsonIgnore]
public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); }
///
@@ -783,7 +714,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
///
///
- [JsonIgnore]
public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); }
///
@@ -791,7 +721,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specify the node or shard the operation should be performed on (default: random)
///
///
- [JsonIgnore]
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
@@ -799,7 +728,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Query in the Lucene query string syntax
///
///
- [JsonIgnore]
public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
///
@@ -807,7 +735,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specify if request cache should be used for this request or not, defaults to true
///
///
- [JsonIgnore]
public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); }
///
@@ -815,7 +742,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Indicates whether hits.total should be rendered as an integer or an object in the rest search response
///
///
- [JsonIgnore]
public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }
///
@@ -823,7 +749,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// A comma-separated list of specific routing values
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
@@ -831,7 +756,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Search operation type
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); }
///
@@ -839,7 +763,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// A list of fields to exclude from the returned _source field
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
///
@@ -847,7 +770,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// A list of fields to extract and return from the _source field
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
///
@@ -855,7 +777,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specifies which field to use for suggestions.
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); }
///
@@ -863,7 +784,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specify suggest mode
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); }
///
@@ -871,7 +791,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// How many suggestions to return in response
///
///
- [JsonIgnore]
public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); }
///
@@ -879,7 +798,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// The source text for which the suggestions should be returned.
///
///
- [JsonIgnore]
public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); }
///
@@ -887,7 +805,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Specify whether aggregation and suggester names should be prefixed by their respective types in the response
///
///
- [JsonIgnore]
public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); }
///
@@ -896,11 +813,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
- [JsonInclude, JsonPropertyName("aggregations")]
public IDictionary? Aggregations { get; set; }
- [JsonInclude, JsonPropertyName("collapse")]
public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; }
///
@@ -909,7 +823,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// names matching these patterns in the hits.fields property of the response.
///
///
- [JsonInclude, JsonPropertyName("docvalue_fields")]
public ICollection? DocvalueFields { get; set; }
///
@@ -917,7 +830,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// If true, returns detailed information about score computation as part of a hit.
///
///
- [JsonInclude, JsonPropertyName("explain")]
public bool? Explain { get; set; }
///
@@ -925,7 +837,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Configuration of search extensions defined by Elasticsearch plugins.
///
///
- [JsonInclude, JsonPropertyName("ext")]
public IDictionary? Ext { get; set; }
///
@@ -934,7 +845,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// matching these patterns in the hits.fields property of the response.
///
///
- [JsonInclude, JsonPropertyName("fields")]
public ICollection? Fields { get; set; }
///
@@ -944,9 +854,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// search_after parameter.
///
///
- [JsonInclude, JsonPropertyName("from")]
public int? From { get; set; }
- [JsonInclude, JsonPropertyName("highlight")]
public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; }
///
@@ -954,7 +862,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Boosts the _score of documents from specified indices.
///
///
- [JsonInclude, JsonPropertyName("indices_boost")]
public ICollection>? IndicesBoost { get; set; }
///
@@ -962,8 +869,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Defines the approximate kNN search to run.
///
///
- [JsonInclude, JsonPropertyName("knn")]
- [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnSearch))]
public ICollection? Knn { get; set; }
///
@@ -972,7 +877,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// not included in the search results.
///
///
- [JsonInclude, JsonPropertyName("min_score")]
public double? MinScore { get; set; }
///
@@ -981,11 +885,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// cannot specify an <index> in the request path.
///
///
- [JsonInclude, JsonPropertyName("pit")]
public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; }
- [JsonInclude, JsonPropertyName("post_filter")]
public Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilter { get; set; }
- [JsonInclude, JsonPropertyName("profile")]
public bool? Profile { get; set; }
///
@@ -993,10 +894,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Defines the search definition using the Query DSL.
///
///
- [JsonInclude, JsonPropertyName("query")]
public Elastic.Clients.Elasticsearch.QueryDsl.Query? Query { get; set; }
- [JsonInclude, JsonPropertyName("rescore")]
- [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.Rescore))]
public ICollection? Rescore { get; set; }
///
@@ -1005,7 +903,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// precedence over mapped fields with the same name.
///
///
- [JsonInclude, JsonPropertyName("runtime_mappings")]
public IDictionary? RuntimeMappings { get; set; }
///
@@ -1013,9 +910,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Retrieve a script evaluation (based on different fields) for each hit.
///
///
- [JsonInclude, JsonPropertyName("script_fields")]
public IDictionary? ScriptFields { get; set; }
- [JsonInclude, JsonPropertyName("search_after")]
public ICollection? SearchAfter { get; set; }
///
@@ -1024,7 +919,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// of each hit. See Optimistic concurrency control.
///
///
- [JsonInclude, JsonPropertyName("seq_no_primary_term")]
public bool? SeqNoPrimaryTerm { get; set; }
///
@@ -1034,12 +928,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// hits, use the search_after parameter.
///
///
- [JsonInclude, JsonPropertyName("size")]
public int? Size { get; set; }
- [JsonInclude, JsonPropertyName("slice")]
public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; }
- [JsonInclude, JsonPropertyName("sort")]
- [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))]
public ICollection? Sort { get; set; }
///
@@ -1048,7 +938,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// fields are returned in the hits._source property of the search response.
///
///
- [JsonInclude, JsonPropertyName("_source")]
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; }
///
@@ -1058,7 +947,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// the indices stats API.
///
///
- [JsonInclude, JsonPropertyName("stats")]
public ICollection? Stats { get; set; }
///
@@ -1069,10 +957,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// and stored fields in the search response.
///
///
- [JsonInclude, JsonPropertyName("stored_fields")]
- [JsonConverter(typeof(SingleOrManyFieldsConverter))]
public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; }
- [JsonInclude, JsonPropertyName("suggest")]
public Elastic.Clients.Elasticsearch.Core.Search.Suggester? Suggest { get; set; }
///
@@ -1082,7 +967,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// before sorting. Defaults to 0, which does not terminate query execution early.
///
///
- [JsonInclude, JsonPropertyName("terminate_after")]
public long? TerminateAfter { get; set; }
///
@@ -1092,7 +976,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Defaults to no timeout.
///
///
- [JsonInclude, JsonPropertyName("timeout")]
public string? Timeout { get; set; }
///
@@ -1100,7 +983,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// If true, calculate and return document scores, even if the scores are not used for sorting.
///
///
- [JsonInclude, JsonPropertyName("track_scores")]
public bool? TrackScores { get; set; }
///
@@ -1111,7 +993,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Defaults to 10,000 hits.
///
///
- [JsonInclude, JsonPropertyName("track_total_hits")]
public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; }
///
@@ -1119,7 +1000,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// If true, returns document version as part of a hit.
///
///
- [JsonInclude, JsonPropertyName("version")]
public bool? Version { get; set; }
}
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
index 1eaf8d1c848..abc8216a1a7 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
@@ -18,14 +18,158 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
+internal sealed partial class SubmitAsyncSearchResponseConverter : System.Text.Json.Serialization.JsonConverter>
+{
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionTime = System.Text.Json.JsonEncodedText.Encode("completion_time");
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionTimeInMillis = System.Text.Json.JsonEncodedText.Encode("completion_time_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropExpirationTime = System.Text.Json.JsonEncodedText.Encode("expiration_time");
+ private static readonly System.Text.Json.JsonEncodedText PropExpirationTimeInMillis = System.Text.Json.JsonEncodedText.Encode("expiration_time_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id");
+ private static readonly System.Text.Json.JsonEncodedText PropIsPartial = System.Text.Json.JsonEncodedText.Encode("is_partial");
+ private static readonly System.Text.Json.JsonEncodedText PropIsRunning = System.Text.Json.JsonEncodedText.Encode("is_running");
+ private static readonly System.Text.Json.JsonEncodedText PropResponse = System.Text.Json.JsonEncodedText.Encode("response");
+ private static readonly System.Text.Json.JsonEncodedText PropStartTime = System.Text.Json.JsonEncodedText.Encode("start_time");
+ private static readonly System.Text.Json.JsonEncodedText PropStartTimeInMillis = System.Text.Json.JsonEncodedText.Encode("start_time_in_millis");
+
+ public override SubmitAsyncSearchResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propCompletionTime = default;
+ LocalJsonProperty propCompletionTimeInMillis = default;
+ LocalJsonProperty propExpirationTime = default;
+ LocalJsonProperty propExpirationTimeInMillis = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIsPartial = default;
+ LocalJsonProperty propIsRunning = default;
+ LocalJsonProperty> propResponse = default;
+ LocalJsonProperty propStartTime = default;
+ LocalJsonProperty propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCompletionTime.TryRead(ref reader, options, PropCompletionTime))
+ {
+ continue;
+ }
+
+ if (propCompletionTimeInMillis.TryRead(ref reader, options, PropCompletionTimeInMillis))
+ {
+ continue;
+ }
+
+ if (propExpirationTime.TryRead(ref reader, options, PropExpirationTime))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryRead(ref reader, options, PropExpirationTimeInMillis))
+ {
+ continue;
+ }
+
+ if (propId.TryRead(ref reader, options, PropId))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryRead(ref reader, options, PropIsPartial))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryRead(ref reader, options, PropIsRunning))
+ {
+ continue;
+ }
+
+ if (propResponse.TryRead(ref reader, options, PropResponse))
+ {
+ continue;
+ }
+
+ if (propStartTime.TryRead(ref reader, options, PropStartTime))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryRead(ref reader, options, PropStartTimeInMillis))
+ {
+ 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 SubmitAsyncSearchResponse
+ {
+ CompletionTime = propCompletionTime.Value
+,
+ CompletionTimeInMillis = propCompletionTimeInMillis.Value
+,
+ ExpirationTime = propExpirationTime.Value
+,
+ ExpirationTimeInMillis = propExpirationTimeInMillis.Value
+,
+ Id = propId.Value
+,
+ IsPartial = propIsPartial.Value
+,
+ IsRunning = propIsRunning.Value
+,
+ Response = propResponse.Value
+,
+ StartTime = propStartTime.Value
+,
+ StartTimeInMillis = propStartTimeInMillis.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, SubmitAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropCompletionTime, value.CompletionTime);
+ writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis);
+ writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis);
+ writer.WriteProperty(options, PropId, value.Id);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning);
+ writer.WriteProperty(options, PropResponse, value.Response);
+ writer.WriteProperty(options, PropStartTime, value.StartTime);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis);
+ writer.WriteEndObject();
+ }
+}
+
+internal sealed partial class SubmitAsyncSearchResponseConverterFactory : System.Text.Json.Serialization.JsonConverterFactory
+{
+ public override bool CanConvert(System.Type typeToConvert)
+ {
+ return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(SubmitAsyncSearchResponse<>);
+ }
+
+ public override System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ var args = typeToConvert.GetGenericArguments();
+#pragma warning disable IL3050
+ var converter = (System.Text.Json.Serialization.JsonConverter)System.Activator.CreateInstance(typeof(SubmitAsyncSearchResponseConverter<>).MakeGenericType(args[0]), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public, binder: null, args: null, culture: null)!;
+#pragma warning restore IL3050
+ return converter;
+ }
+}
+
+[JsonConverter(typeof(SubmitAsyncSearchResponseConverterFactory))]
public sealed partial class SubmitAsyncSearchResponse : ElasticsearchResponse
{
///
@@ -34,9 +178,7 @@ public sealed partial class SubmitAsyncSearchResponse : Elasticsearch
/// when the search has completed.
///
///
- [JsonInclude, JsonPropertyName("completion_time")]
public DateTimeOffset? CompletionTime { get; init; }
- [JsonInclude, JsonPropertyName("completion_time_in_millis")]
public long? CompletionTimeInMillis { get; init; }
///
@@ -44,11 +186,8 @@ public sealed partial class SubmitAsyncSearchResponse : Elasticsearch
/// Indicates when the async search will expire.
///
///
- [JsonInclude, JsonPropertyName("expiration_time")]
public DateTimeOffset? ExpirationTime { get; init; }
- [JsonInclude, JsonPropertyName("expiration_time_in_millis")]
public long ExpirationTimeInMillis { get; init; }
- [JsonInclude, JsonPropertyName("id")]
public string? Id { get; init; }
///
@@ -57,7 +196,6 @@ public sealed partial class SubmitAsyncSearchResponse : Elasticsearch
/// While the query is running, is_partial is always set to true.
///
///
- [JsonInclude, JsonPropertyName("is_partial")]
public bool IsPartial { get; init; }
///
@@ -66,12 +204,8 @@ public sealed partial class SubmitAsyncSearchResponse : Elasticsearch
/// NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false.
///
///
- [JsonInclude, JsonPropertyName("is_running")]
public bool IsRunning { get; init; }
- [JsonInclude, JsonPropertyName("response")]
public Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearch Response { get; init; }
- [JsonInclude, JsonPropertyName("start_time")]
public DateTimeOffset? StartTime { get; init; }
- [JsonInclude, JsonPropertyName("start_time_in_millis")]
public long StartTimeInMillis { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
index 6e2ebd29f2a..31dccb5f39c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
@@ -139,6 +139,14 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
internal override string OperationName => "bulk";
+ ///
+ ///
+ /// Name of the data stream, index, or index alias to perform bulk actions on.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName? Index { get => P("index"); set => PO("index", value); }
+
///
///
/// If true, the response will include the ingest pipelines that were executed for each index or create.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
index a2c342a8ee7..b378fd1241d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
@@ -18,20 +18,74 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class BulkResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropErrors = System.Text.Json.JsonEncodedText.Encode("errors");
+ private static readonly System.Text.Json.JsonEncodedText PropIngestTook = System.Text.Json.JsonEncodedText.Encode("ingest_took");
+ private static readonly System.Text.Json.JsonEncodedText PropTook = System.Text.Json.JsonEncodedText.Encode("took");
+
+ public override BulkResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propErrors = default;
+ LocalJsonProperty propIngestTook = default;
+ LocalJsonProperty propTook = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propErrors.TryRead(ref reader, options, PropErrors))
+ {
+ continue;
+ }
+
+ if (propIngestTook.TryRead(ref reader, options, PropIngestTook))
+ {
+ continue;
+ }
+
+ if (propTook.TryRead(ref reader, options, PropTook))
+ {
+ 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 BulkResponse
+ {
+ Errors = propErrors.Value
+,
+ IngestTook = propIngestTook.Value
+,
+ Took = propTook.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, BulkResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropErrors, value.Errors);
+ writer.WriteProperty(options, PropIngestTook, value.IngestTook);
+ writer.WriteProperty(options, PropTook, value.Took);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(BulkResponseConverter))]
public sealed partial class BulkResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("errors")]
public bool Errors { get; init; }
- [JsonInclude, JsonPropertyName("ingest_took")]
public long? IngestTook { get; init; }
- [JsonInclude, JsonPropertyName("took")]
public long Took { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
index 29bfde63e45..6d372ad203b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
@@ -18,18 +18,63 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class ClearScrollResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropNumFreed = System.Text.Json.JsonEncodedText.Encode("num_freed");
+ private static readonly System.Text.Json.JsonEncodedText PropSucceeded = System.Text.Json.JsonEncodedText.Encode("succeeded");
+
+ public override ClearScrollResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propNumFreed = default;
+ LocalJsonProperty propSucceeded = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propNumFreed.TryRead(ref reader, options, PropNumFreed))
+ {
+ continue;
+ }
+
+ if (propSucceeded.TryRead(ref reader, options, PropSucceeded))
+ {
+ 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 ClearScrollResponse
+ {
+ NumFreed = propNumFreed.Value
+,
+ Succeeded = propSucceeded.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ClearScrollResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropNumFreed, value.NumFreed);
+ writer.WriteProperty(options, PropSucceeded, value.Succeeded);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ClearScrollResponseConverter))]
public sealed partial class ClearScrollResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("num_freed")]
public int NumFreed { get; init; }
- [JsonInclude, JsonPropertyName("succeeded")]
public bool Succeeded { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
index 1fdf5b5b3ae..57c2634bb97 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
@@ -18,18 +18,63 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class ClosePointInTimeResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropNumFreed = System.Text.Json.JsonEncodedText.Encode("num_freed");
+ private static readonly System.Text.Json.JsonEncodedText PropSucceeded = System.Text.Json.JsonEncodedText.Encode("succeeded");
+
+ public override ClosePointInTimeResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propNumFreed = default;
+ LocalJsonProperty propSucceeded = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propNumFreed.TryRead(ref reader, options, PropNumFreed))
+ {
+ continue;
+ }
+
+ if (propSucceeded.TryRead(ref reader, options, PropSucceeded))
+ {
+ 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 ClosePointInTimeResponse
+ {
+ NumFreed = propNumFreed.Value
+,
+ Succeeded = propSucceeded.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ClosePointInTimeResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropNumFreed, value.NumFreed);
+ writer.WriteProperty(options, PropSucceeded, value.Succeeded);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ClosePointInTimeResponseConverter))]
public sealed partial class ClosePointInTimeResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("num_freed")]
public int NumFreed { get; init; }
- [JsonInclude, JsonPropertyName("succeeded")]
public bool Succeeded { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs
index a17abac6f3c..ddac5094da1 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs
@@ -18,64 +18,316 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class AllocationExplainResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAllocateExplanation = System.Text.Json.JsonEncodedText.Encode("allocate_explanation");
+ private static readonly System.Text.Json.JsonEncodedText PropAllocationDelay = System.Text.Json.JsonEncodedText.Encode("allocation_delay");
+ private static readonly System.Text.Json.JsonEncodedText PropAllocationDelayInMillis = System.Text.Json.JsonEncodedText.Encode("allocation_delay_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropCanAllocate = System.Text.Json.JsonEncodedText.Encode("can_allocate");
+ private static readonly System.Text.Json.JsonEncodedText PropCanMoveToOtherNode = System.Text.Json.JsonEncodedText.Encode("can_move_to_other_node");
+ private static readonly System.Text.Json.JsonEncodedText PropCanRebalanceCluster = System.Text.Json.JsonEncodedText.Encode("can_rebalance_cluster");
+ private static readonly System.Text.Json.JsonEncodedText PropCanRebalanceClusterDecisions = System.Text.Json.JsonEncodedText.Encode("can_rebalance_cluster_decisions");
+ private static readonly System.Text.Json.JsonEncodedText PropCanRebalanceToOtherNode = System.Text.Json.JsonEncodedText.Encode("can_rebalance_to_other_node");
+ private static readonly System.Text.Json.JsonEncodedText PropCanRemainDecisions = System.Text.Json.JsonEncodedText.Encode("can_remain_decisions");
+ private static readonly System.Text.Json.JsonEncodedText PropCanRemainOnCurrentNode = System.Text.Json.JsonEncodedText.Encode("can_remain_on_current_node");
+ private static readonly System.Text.Json.JsonEncodedText PropClusterInfo = System.Text.Json.JsonEncodedText.Encode("cluster_info");
+ private static readonly System.Text.Json.JsonEncodedText PropConfiguredDelay = System.Text.Json.JsonEncodedText.Encode("configured_delay");
+ private static readonly System.Text.Json.JsonEncodedText PropConfiguredDelayInMillis = System.Text.Json.JsonEncodedText.Encode("configured_delay_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropCurrentNode = System.Text.Json.JsonEncodedText.Encode("current_node");
+ private static readonly System.Text.Json.JsonEncodedText PropCurrentState = System.Text.Json.JsonEncodedText.Encode("current_state");
+ private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("index");
+ private static readonly System.Text.Json.JsonEncodedText PropMoveExplanation = System.Text.Json.JsonEncodedText.Encode("move_explanation");
+ private static readonly System.Text.Json.JsonEncodedText PropNodeAllocationDecisions = System.Text.Json.JsonEncodedText.Encode("node_allocation_decisions");
+ private static readonly System.Text.Json.JsonEncodedText PropNote = System.Text.Json.JsonEncodedText.Encode("note");
+ private static readonly System.Text.Json.JsonEncodedText PropPrimary = System.Text.Json.JsonEncodedText.Encode("primary");
+ private static readonly System.Text.Json.JsonEncodedText PropRebalanceExplanation = System.Text.Json.JsonEncodedText.Encode("rebalance_explanation");
+ private static readonly System.Text.Json.JsonEncodedText PropRemainingDelay = System.Text.Json.JsonEncodedText.Encode("remaining_delay");
+ private static readonly System.Text.Json.JsonEncodedText PropRemainingDelayInMillis = System.Text.Json.JsonEncodedText.Encode("remaining_delay_in_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropShard = System.Text.Json.JsonEncodedText.Encode("shard");
+ private static readonly System.Text.Json.JsonEncodedText PropUnassignedInfo = System.Text.Json.JsonEncodedText.Encode("unassigned_info");
+
+ public override AllocationExplainResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAllocateExplanation = default;
+ LocalJsonProperty propAllocationDelay = default;
+ LocalJsonProperty propAllocationDelayInMillis = default;
+ LocalJsonProperty propCanAllocate = default;
+ LocalJsonProperty propCanMoveToOtherNode = default;
+ LocalJsonProperty propCanRebalanceCluster = default;
+ LocalJsonProperty?> propCanRebalanceClusterDecisions = default;
+ LocalJsonProperty propCanRebalanceToOtherNode = default;
+ LocalJsonProperty?> propCanRemainDecisions = default;
+ LocalJsonProperty propCanRemainOnCurrentNode = default;
+ LocalJsonProperty propClusterInfo = default;
+ LocalJsonProperty propConfiguredDelay = default;
+ LocalJsonProperty propConfiguredDelayInMillis = default;
+ LocalJsonProperty propCurrentNode = default;
+ LocalJsonProperty propCurrentState = default;
+ LocalJsonProperty propIndex = default;
+ LocalJsonProperty propMoveExplanation = default;
+ LocalJsonProperty?> propNodeAllocationDecisions = default;
+ LocalJsonProperty propNote = default;
+ LocalJsonProperty propPrimary = default;
+ LocalJsonProperty propRebalanceExplanation = default;
+ LocalJsonProperty propRemainingDelay = default;
+ LocalJsonProperty propRemainingDelayInMillis = default;
+ LocalJsonProperty propShard = default;
+ LocalJsonProperty propUnassignedInfo = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAllocateExplanation.TryRead(ref reader, options, PropAllocateExplanation))
+ {
+ continue;
+ }
+
+ if (propAllocationDelay.TryRead(ref reader, options, PropAllocationDelay))
+ {
+ continue;
+ }
+
+ if (propAllocationDelayInMillis.TryRead(ref reader, options, PropAllocationDelayInMillis))
+ {
+ continue;
+ }
+
+ if (propCanAllocate.TryRead(ref reader, options, PropCanAllocate))
+ {
+ continue;
+ }
+
+ if (propCanMoveToOtherNode.TryRead(ref reader, options, PropCanMoveToOtherNode))
+ {
+ continue;
+ }
+
+ if (propCanRebalanceCluster.TryRead(ref reader, options, PropCanRebalanceCluster))
+ {
+ continue;
+ }
+
+ if (propCanRebalanceClusterDecisions.TryRead(ref reader, options, PropCanRebalanceClusterDecisions))
+ {
+ continue;
+ }
+
+ if (propCanRebalanceToOtherNode.TryRead(ref reader, options, PropCanRebalanceToOtherNode))
+ {
+ continue;
+ }
+
+ if (propCanRemainDecisions.TryRead(ref reader, options, PropCanRemainDecisions))
+ {
+ continue;
+ }
+
+ if (propCanRemainOnCurrentNode.TryRead(ref reader, options, PropCanRemainOnCurrentNode))
+ {
+ continue;
+ }
+
+ if (propClusterInfo.TryRead(ref reader, options, PropClusterInfo))
+ {
+ continue;
+ }
+
+ if (propConfiguredDelay.TryRead(ref reader, options, PropConfiguredDelay))
+ {
+ continue;
+ }
+
+ if (propConfiguredDelayInMillis.TryRead(ref reader, options, PropConfiguredDelayInMillis))
+ {
+ continue;
+ }
+
+ if (propCurrentNode.TryRead(ref reader, options, PropCurrentNode))
+ {
+ continue;
+ }
+
+ if (propCurrentState.TryRead(ref reader, options, PropCurrentState))
+ {
+ continue;
+ }
+
+ if (propIndex.TryRead(ref reader, options, PropIndex))
+ {
+ continue;
+ }
+
+ if (propMoveExplanation.TryRead(ref reader, options, PropMoveExplanation))
+ {
+ continue;
+ }
+
+ if (propNodeAllocationDecisions.TryRead(ref reader, options, PropNodeAllocationDecisions))
+ {
+ continue;
+ }
+
+ if (propNote.TryRead(ref reader, options, PropNote))
+ {
+ continue;
+ }
+
+ if (propPrimary.TryRead(ref reader, options, PropPrimary))
+ {
+ continue;
+ }
+
+ if (propRebalanceExplanation.TryRead(ref reader, options, PropRebalanceExplanation))
+ {
+ continue;
+ }
+
+ if (propRemainingDelay.TryRead(ref reader, options, PropRemainingDelay))
+ {
+ continue;
+ }
+
+ if (propRemainingDelayInMillis.TryRead(ref reader, options, PropRemainingDelayInMillis))
+ {
+ continue;
+ }
+
+ if (propShard.TryRead(ref reader, options, PropShard))
+ {
+ continue;
+ }
+
+ if (propUnassignedInfo.TryRead(ref reader, options, PropUnassignedInfo))
+ {
+ 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 AllocationExplainResponse
+ {
+ AllocateExplanation = propAllocateExplanation.Value
+,
+ AllocationDelay = propAllocationDelay.Value
+,
+ AllocationDelayInMillis = propAllocationDelayInMillis.Value
+,
+ CanAllocate = propCanAllocate.Value
+,
+ CanMoveToOtherNode = propCanMoveToOtherNode.Value
+,
+ CanRebalanceCluster = propCanRebalanceCluster.Value
+,
+ CanRebalanceClusterDecisions = propCanRebalanceClusterDecisions.Value
+,
+ CanRebalanceToOtherNode = propCanRebalanceToOtherNode.Value
+,
+ CanRemainDecisions = propCanRemainDecisions.Value
+,
+ CanRemainOnCurrentNode = propCanRemainOnCurrentNode.Value
+,
+ ClusterInfo = propClusterInfo.Value
+,
+ ConfiguredDelay = propConfiguredDelay.Value
+,
+ ConfiguredDelayInMillis = propConfiguredDelayInMillis.Value
+,
+ CurrentNode = propCurrentNode.Value
+,
+ CurrentState = propCurrentState.Value
+,
+ Index = propIndex.Value
+,
+ MoveExplanation = propMoveExplanation.Value
+,
+ NodeAllocationDecisions = propNodeAllocationDecisions.Value
+,
+ Note = propNote.Value
+,
+ Primary = propPrimary.Value
+,
+ RebalanceExplanation = propRebalanceExplanation.Value
+,
+ RemainingDelay = propRemainingDelay.Value
+,
+ RemainingDelayInMillis = propRemainingDelayInMillis.Value
+,
+ Shard = propShard.Value
+,
+ UnassignedInfo = propUnassignedInfo.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, AllocationExplainResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAllocateExplanation, value.AllocateExplanation);
+ writer.WriteProperty(options, PropAllocationDelay, value.AllocationDelay);
+ writer.WriteProperty(options, PropAllocationDelayInMillis, value.AllocationDelayInMillis);
+ writer.WriteProperty(options, PropCanAllocate, value.CanAllocate);
+ writer.WriteProperty(options, PropCanMoveToOtherNode, value.CanMoveToOtherNode);
+ writer.WriteProperty(options, PropCanRebalanceCluster, value.CanRebalanceCluster);
+ writer.WriteProperty(options, PropCanRebalanceClusterDecisions, value.CanRebalanceClusterDecisions);
+ writer.WriteProperty(options, PropCanRebalanceToOtherNode, value.CanRebalanceToOtherNode);
+ writer.WriteProperty(options, PropCanRemainDecisions, value.CanRemainDecisions);
+ writer.WriteProperty(options, PropCanRemainOnCurrentNode, value.CanRemainOnCurrentNode);
+ writer.WriteProperty(options, PropClusterInfo, value.ClusterInfo);
+ writer.WriteProperty(options, PropConfiguredDelay, value.ConfiguredDelay);
+ writer.WriteProperty(options, PropConfiguredDelayInMillis, value.ConfiguredDelayInMillis);
+ writer.WriteProperty(options, PropCurrentNode, value.CurrentNode);
+ writer.WriteProperty(options, PropCurrentState, value.CurrentState);
+ writer.WriteProperty(options, PropIndex, value.Index);
+ writer.WriteProperty(options, PropMoveExplanation, value.MoveExplanation);
+ writer.WriteProperty(options, PropNodeAllocationDecisions, value.NodeAllocationDecisions);
+ writer.WriteProperty(options, PropNote, value.Note);
+ writer.WriteProperty(options, PropPrimary, value.Primary);
+ writer.WriteProperty(options, PropRebalanceExplanation, value.RebalanceExplanation);
+ writer.WriteProperty(options, PropRemainingDelay, value.RemainingDelay);
+ writer.WriteProperty(options, PropRemainingDelayInMillis, value.RemainingDelayInMillis);
+ writer.WriteProperty(options, PropShard, value.Shard);
+ writer.WriteProperty(options, PropUnassignedInfo, value.UnassignedInfo);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(AllocationExplainResponseConverter))]
public sealed partial class AllocationExplainResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("allocate_explanation")]
public string? AllocateExplanation { get; init; }
- [JsonInclude, JsonPropertyName("allocation_delay")]
public Elastic.Clients.Elasticsearch.Duration? AllocationDelay { get; init; }
- [JsonInclude, JsonPropertyName("allocation_delay_in_millis")]
public long? AllocationDelayInMillis { get; init; }
- [JsonInclude, JsonPropertyName("can_allocate")]
public Elastic.Clients.Elasticsearch.Cluster.Decision? CanAllocate { get; init; }
- [JsonInclude, JsonPropertyName("can_move_to_other_node")]
public Elastic.Clients.Elasticsearch.Cluster.Decision? CanMoveToOtherNode { get; init; }
- [JsonInclude, JsonPropertyName("can_rebalance_cluster")]
public Elastic.Clients.Elasticsearch.Cluster.Decision? CanRebalanceCluster { get; init; }
- [JsonInclude, JsonPropertyName("can_rebalance_cluster_decisions")]
public IReadOnlyCollection? CanRebalanceClusterDecisions { get; init; }
- [JsonInclude, JsonPropertyName("can_rebalance_to_other_node")]
public Elastic.Clients.Elasticsearch.Cluster.Decision? CanRebalanceToOtherNode { get; init; }
- [JsonInclude, JsonPropertyName("can_remain_decisions")]
public IReadOnlyCollection? CanRemainDecisions { get; init; }
- [JsonInclude, JsonPropertyName("can_remain_on_current_node")]
public Elastic.Clients.Elasticsearch.Cluster.Decision? CanRemainOnCurrentNode { get; init; }
- [JsonInclude, JsonPropertyName("cluster_info")]
public Elastic.Clients.Elasticsearch.Cluster.ClusterInfo? ClusterInfo { get; init; }
- [JsonInclude, JsonPropertyName("configured_delay")]
public Elastic.Clients.Elasticsearch.Duration? ConfiguredDelay { get; init; }
- [JsonInclude, JsonPropertyName("configured_delay_in_millis")]
public long? ConfiguredDelayInMillis { get; init; }
- [JsonInclude, JsonPropertyName("current_node")]
public Elastic.Clients.Elasticsearch.Cluster.CurrentNode? CurrentNode { get; init; }
- [JsonInclude, JsonPropertyName("current_state")]
public string CurrentState { get; init; }
- [JsonInclude, JsonPropertyName("index")]
public string Index { get; init; }
- [JsonInclude, JsonPropertyName("move_explanation")]
public string? MoveExplanation { get; init; }
- [JsonInclude, JsonPropertyName("node_allocation_decisions")]
public IReadOnlyCollection? NodeAllocationDecisions { get; init; }
- [JsonInclude, JsonPropertyName("note")]
public string? Note { get; init; }
- [JsonInclude, JsonPropertyName("primary")]
public bool Primary { get; init; }
- [JsonInclude, JsonPropertyName("rebalance_explanation")]
public string? RebalanceExplanation { get; init; }
- [JsonInclude, JsonPropertyName("remaining_delay")]
public Elastic.Clients.Elasticsearch.Duration? RemainingDelay { get; init; }
- [JsonInclude, JsonPropertyName("remaining_delay_in_millis")]
public long? RemainingDelayInMillis { get; init; }
- [JsonInclude, JsonPropertyName("shard")]
public int Shard { get; init; }
- [JsonInclude, JsonPropertyName("unassigned_info")]
public Elastic.Clients.Elasticsearch.Cluster.UnassignedInformation? UnassignedInfo { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoRequest.g.cs
index 64573f02d86..aa62823518e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoRequest.g.cs
@@ -53,6 +53,14 @@ public ClusterInfoRequest(IReadOnlyCollection false;
internal override string OperationName => "cluster.info";
+
+ ///
+ ///
+ /// Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest.
+ ///
+ ///
+ [JsonIgnore]
+ public ICollection Target { get => P>("target"); set => PR("target", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoResponse.g.cs
index 3a0c28fa600..2b3593eb381 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoResponse.g.cs
@@ -18,24 +18,96 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class ClusterInfoResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropClusterName = System.Text.Json.JsonEncodedText.Encode("cluster_name");
+ private static readonly System.Text.Json.JsonEncodedText PropHttp = System.Text.Json.JsonEncodedText.Encode("http");
+ private static readonly System.Text.Json.JsonEncodedText PropIngest = System.Text.Json.JsonEncodedText.Encode("ingest");
+ private static readonly System.Text.Json.JsonEncodedText PropScript = System.Text.Json.JsonEncodedText.Encode("script");
+ private static readonly System.Text.Json.JsonEncodedText PropThreadPool = System.Text.Json.JsonEncodedText.Encode("thread_pool");
+
+ public override ClusterInfoResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propClusterName = default;
+ LocalJsonProperty propHttp = default;
+ LocalJsonProperty propIngest = default;
+ LocalJsonProperty propScript = default;
+ LocalJsonProperty?> propThreadPool = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propClusterName.TryRead(ref reader, options, PropClusterName))
+ {
+ continue;
+ }
+
+ if (propHttp.TryRead(ref reader, options, PropHttp))
+ {
+ continue;
+ }
+
+ if (propIngest.TryRead(ref reader, options, PropIngest))
+ {
+ continue;
+ }
+
+ if (propScript.TryRead(ref reader, options, PropScript))
+ {
+ continue;
+ }
+
+ if (propThreadPool.TryRead(ref reader, options, PropThreadPool))
+ {
+ 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 ClusterInfoResponse
+ {
+ ClusterName = propClusterName.Value
+,
+ Http = propHttp.Value
+,
+ Ingest = propIngest.Value
+,
+ Script = propScript.Value
+,
+ ThreadPool = propThreadPool.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ClusterInfoResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropClusterName, value.ClusterName);
+ writer.WriteProperty(options, PropHttp, value.Http);
+ writer.WriteProperty(options, PropIngest, value.Ingest);
+ writer.WriteProperty(options, PropScript, value.Script);
+ writer.WriteProperty(options, PropThreadPool, value.ThreadPool);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ClusterInfoResponseConverter))]
public sealed partial class ClusterInfoResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("cluster_name")]
public string ClusterName { get; init; }
- [JsonInclude, JsonPropertyName("http")]
public Elastic.Clients.Elasticsearch.Nodes.Http? Http { get; init; }
- [JsonInclude, JsonPropertyName("ingest")]
public Elastic.Clients.Elasticsearch.Nodes.Ingest? Ingest { get; init; }
- [JsonInclude, JsonPropertyName("script")]
public Elastic.Clients.Elasticsearch.Nodes.Scripting? Script { get; init; }
- [JsonInclude, JsonPropertyName("thread_pool")]
public IReadOnlyDictionary? ThreadPool { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
index f9395e795b6..8f7fe43cd02 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
@@ -73,6 +73,14 @@ public ClusterStatsRequest(Elastic.Clients.Elasticsearch.NodeIds? nodeId) : base
internal override string OperationName => "cluster.stats";
+ ///
+ ///
+ /// Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.NodeIds? NodeId { get => P("node_id"); set => PO("node_id", value); }
+
///
///
/// Include remote cluster data into the response
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs
index 75d8dfb2977..0be23cc8c06 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs
@@ -18,14 +18,111 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class ClusterStatsResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropClusterName = System.Text.Json.JsonEncodedText.Encode("cluster_name");
+ private static readonly System.Text.Json.JsonEncodedText PropClusterUuid = System.Text.Json.JsonEncodedText.Encode("cluster_uuid");
+ private static readonly System.Text.Json.JsonEncodedText PropIndices = System.Text.Json.JsonEncodedText.Encode("indices");
+ private static readonly System.Text.Json.JsonEncodedText PropNodes = System.Text.Json.JsonEncodedText.Encode("nodes");
+ private static readonly System.Text.Json.JsonEncodedText PropNodeStats = System.Text.Json.JsonEncodedText.Encode("_nodes");
+ private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status");
+ private static readonly System.Text.Json.JsonEncodedText PropTimestamp = System.Text.Json.JsonEncodedText.Encode("timestamp");
+
+ public override ClusterStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propClusterName = default;
+ LocalJsonProperty propClusterUuid = default;
+ LocalJsonProperty propIndices = default;
+ LocalJsonProperty propNodes = default;
+ LocalJsonProperty propNodeStats = default;
+ LocalJsonProperty propStatus = default;
+ LocalJsonProperty propTimestamp = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propClusterName.TryRead(ref reader, options, PropClusterName))
+ {
+ continue;
+ }
+
+ if (propClusterUuid.TryRead(ref reader, options, PropClusterUuid))
+ {
+ continue;
+ }
+
+ if (propIndices.TryRead(ref reader, options, PropIndices))
+ {
+ continue;
+ }
+
+ if (propNodes.TryRead(ref reader, options, PropNodes))
+ {
+ continue;
+ }
+
+ if (propNodeStats.TryRead(ref reader, options, PropNodeStats))
+ {
+ continue;
+ }
+
+ if (propStatus.TryRead(ref reader, options, PropStatus))
+ {
+ continue;
+ }
+
+ if (propTimestamp.TryRead(ref reader, options, PropTimestamp))
+ {
+ 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 ClusterStatsResponse
+ {
+ ClusterName = propClusterName.Value
+,
+ ClusterUuid = propClusterUuid.Value
+,
+ Indices = propIndices.Value
+,
+ Nodes = propNodes.Value
+,
+ NodeStats = propNodeStats.Value
+,
+ Status = propStatus.Value
+,
+ Timestamp = propTimestamp.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ClusterStatsResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropClusterName, value.ClusterName);
+ writer.WriteProperty(options, PropClusterUuid, value.ClusterUuid);
+ writer.WriteProperty(options, PropIndices, value.Indices);
+ writer.WriteProperty(options, PropNodes, value.Nodes);
+ writer.WriteProperty(options, PropNodeStats, value.NodeStats);
+ writer.WriteProperty(options, PropStatus, value.Status);
+ writer.WriteProperty(options, PropTimestamp, value.Timestamp);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ClusterStatsResponseConverter))]
public sealed partial class ClusterStatsResponse : ElasticsearchResponse
{
///
@@ -33,7 +130,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Name of the cluster, based on the cluster name setting.
///
///
- [JsonInclude, JsonPropertyName("cluster_name")]
public string ClusterName { get; init; }
///
@@ -41,7 +137,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Unique identifier for the cluster.
///
///
- [JsonInclude, JsonPropertyName("cluster_uuid")]
public string ClusterUuid { get; init; }
///
@@ -49,7 +144,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Contains statistics about indices with shards assigned to selected nodes.
///
///
- [JsonInclude, JsonPropertyName("indices")]
public Elastic.Clients.Elasticsearch.Cluster.ClusterIndices Indices { get; init; }
///
@@ -57,7 +151,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Contains statistics about nodes selected by the request’s node filters.
///
///
- [JsonInclude, JsonPropertyName("nodes")]
public Elastic.Clients.Elasticsearch.Cluster.ClusterNodes Nodes { get; init; }
///
@@ -65,7 +158,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Contains statistics about the number of nodes selected by the request’s node filters.
///
///
- [JsonInclude, JsonPropertyName("_nodes")]
public Elastic.Clients.Elasticsearch.NodeStatistics? NodeStats { get; init; }
///
@@ -73,7 +165,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Health status of the cluster, based on the state of its primary and replica shards.
///
///
- [JsonInclude, JsonPropertyName("status")]
public Elastic.Clients.Elasticsearch.HealthStatus Status { get; init; }
///
@@ -81,6 +172,5 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.
///
///
- [JsonInclude, JsonPropertyName("timestamp")]
public long Timestamp { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
index b0db2cd21b4..5c94f9cdd92 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
@@ -70,6 +70,14 @@ public DeleteComponentTemplateRequest(Elastic.Clients.Elasticsearch.Names name)
internal override string OperationName => "cluster.delete_component_template";
+ ///
+ ///
+ /// Comma-separated list or wildcard expression of component template names used to limit the request.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Names Name { get => P("name"); set => PR("name", value); }
+
///
///
/// Period to wait for a connection to the master node.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs
index 7f8b65c9cbe..12e9e603212 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class DeleteComponentTemplateResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override DeleteComponentTemplateResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 DeleteComponentTemplateResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteComponentTemplateResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteComponentTemplateResponseConverter))]
public sealed partial class DeleteComponentTemplateResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class DeleteComponentTemplateResponse : ElasticsearchRespo
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs
index 8f2da988a43..cbbe6ac6c5e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs
@@ -70,6 +70,15 @@ public ExistsComponentTemplateRequest(Elastic.Clients.Elasticsearch.Names name)
internal override string OperationName => "cluster.exists_component_template";
+ ///
+ ///
+ /// Comma-separated list of component template names used to limit the request.
+ /// Wildcard (*) expressions are supported.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Names Name { get => P("name"); set => PR("name", value); }
+
///
///
/// If true, the request retrieves information from the local node only.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs
index febb734d698..e25f5c9b3f1 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs
@@ -18,20 +18,74 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class GetClusterSettingsResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropDefaults = System.Text.Json.JsonEncodedText.Encode("defaults");
+ private static readonly System.Text.Json.JsonEncodedText PropPersistent = System.Text.Json.JsonEncodedText.Encode("persistent");
+ private static readonly System.Text.Json.JsonEncodedText PropTransient = System.Text.Json.JsonEncodedText.Encode("transient");
+
+ public override GetClusterSettingsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty?> propDefaults = default;
+ LocalJsonProperty> propPersistent = default;
+ LocalJsonProperty> propTransient = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propDefaults.TryRead(ref reader, options, PropDefaults))
+ {
+ continue;
+ }
+
+ if (propPersistent.TryRead(ref reader, options, PropPersistent))
+ {
+ continue;
+ }
+
+ if (propTransient.TryRead(ref reader, options, PropTransient))
+ {
+ 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 GetClusterSettingsResponse
+ {
+ Defaults = propDefaults.Value
+,
+ Persistent = propPersistent.Value
+,
+ Transient = propTransient.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, GetClusterSettingsResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropDefaults, value.Defaults);
+ writer.WriteProperty(options, PropPersistent, value.Persistent);
+ writer.WriteProperty(options, PropTransient, value.Transient);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(GetClusterSettingsResponseConverter))]
public sealed partial class GetClusterSettingsResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("defaults")]
public IReadOnlyDictionary? Defaults { get; init; }
- [JsonInclude, JsonPropertyName("persistent")]
public IReadOnlyDictionary Persistent { get; init; }
- [JsonInclude, JsonPropertyName("transient")]
public IReadOnlyDictionary Transient { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
index a344e42d854..fe17010c00a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
@@ -87,6 +87,15 @@ public GetComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : b
internal override string OperationName => "cluster.get_component_template";
+ ///
+ ///
+ /// Comma-separated list of component template names used to limit the request.
+ /// Wildcard (*) expressions are supported.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name? Name { get => P("name"); set => PO("name", value); }
+
///
///
/// If true, returns settings in flat format.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs
index 629ad116f00..5421e6c2779 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class GetComponentTemplateResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropComponentTemplates = System.Text.Json.JsonEncodedText.Encode("component_templates");
+
+ public override GetComponentTemplateResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propComponentTemplates = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propComponentTemplates.TryRead(ref reader, options, PropComponentTemplates))
+ {
+ 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 GetComponentTemplateResponse
+ {
+ ComponentTemplates = propComponentTemplates.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, GetComponentTemplateResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropComponentTemplates, value.ComponentTemplates);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(GetComponentTemplateResponseConverter))]
public sealed partial class GetComponentTemplateResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("component_templates")]
public IReadOnlyCollection ComponentTemplates { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs
index 07c6a721bf8..5c4f29cd710 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs
@@ -144,6 +144,14 @@ public HealthRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
internal override string OperationName => "cluster.health";
+ ///
+ ///
+ /// Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Indices? Indices { get => P("index"); set => PO("index", value); }
+
///
///
/// Whether to expand wildcard expression to concrete indices that are open, closed or both.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs
index e3fca0ec657..14a0fd21c98 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs
@@ -18,14 +18,221 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class HealthResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropActivePrimaryShards = System.Text.Json.JsonEncodedText.Encode("active_primary_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropActiveShards = System.Text.Json.JsonEncodedText.Encode("active_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropActiveShardsPercentAsNumber = System.Text.Json.JsonEncodedText.Encode("active_shards_percent_as_number");
+ private static readonly System.Text.Json.JsonEncodedText PropClusterName = System.Text.Json.JsonEncodedText.Encode("cluster_name");
+ private static readonly System.Text.Json.JsonEncodedText PropDelayedUnassignedShards = System.Text.Json.JsonEncodedText.Encode("delayed_unassigned_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropIndices = System.Text.Json.JsonEncodedText.Encode("indices");
+ private static readonly System.Text.Json.JsonEncodedText PropInitializingShards = System.Text.Json.JsonEncodedText.Encode("initializing_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropNumberOfDataNodes = System.Text.Json.JsonEncodedText.Encode("number_of_data_nodes");
+ private static readonly System.Text.Json.JsonEncodedText PropNumberOfInFlightFetch = System.Text.Json.JsonEncodedText.Encode("number_of_in_flight_fetch");
+ private static readonly System.Text.Json.JsonEncodedText PropNumberOfNodes = System.Text.Json.JsonEncodedText.Encode("number_of_nodes");
+ private static readonly System.Text.Json.JsonEncodedText PropNumberOfPendingTasks = System.Text.Json.JsonEncodedText.Encode("number_of_pending_tasks");
+ private static readonly System.Text.Json.JsonEncodedText PropRelocatingShards = System.Text.Json.JsonEncodedText.Encode("relocating_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status");
+ private static readonly System.Text.Json.JsonEncodedText PropTaskMaxWaitingInQueue = System.Text.Json.JsonEncodedText.Encode("task_max_waiting_in_queue");
+ private static readonly System.Text.Json.JsonEncodedText PropTaskMaxWaitingInQueueMillis = System.Text.Json.JsonEncodedText.Encode("task_max_waiting_in_queue_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropTimedOut = System.Text.Json.JsonEncodedText.Encode("timed_out");
+ private static readonly System.Text.Json.JsonEncodedText PropUnassignedPrimaryShards = System.Text.Json.JsonEncodedText.Encode("unassigned_primary_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropUnassignedShards = System.Text.Json.JsonEncodedText.Encode("unassigned_shards");
+
+ public override HealthResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propActivePrimaryShards = default;
+ LocalJsonProperty propActiveShards = default;
+ LocalJsonProperty propActiveShardsPercentAsNumber = default;
+ LocalJsonProperty propClusterName = default;
+ LocalJsonProperty propDelayedUnassignedShards = default;
+ LocalJsonProperty?> propIndices = default;
+ LocalJsonProperty propInitializingShards = default;
+ LocalJsonProperty propNumberOfDataNodes = default;
+ LocalJsonProperty propNumberOfInFlightFetch = default;
+ LocalJsonProperty propNumberOfNodes = default;
+ LocalJsonProperty propNumberOfPendingTasks = default;
+ LocalJsonProperty propRelocatingShards = default;
+ LocalJsonProperty propStatus = default;
+ LocalJsonProperty propTaskMaxWaitingInQueue = default;
+ LocalJsonProperty propTaskMaxWaitingInQueueMillis = default;
+ LocalJsonProperty propTimedOut = default;
+ LocalJsonProperty propUnassignedPrimaryShards = default;
+ LocalJsonProperty propUnassignedShards = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propActivePrimaryShards.TryRead(ref reader, options, PropActivePrimaryShards))
+ {
+ continue;
+ }
+
+ if (propActiveShards.TryRead(ref reader, options, PropActiveShards))
+ {
+ continue;
+ }
+
+ if (propActiveShardsPercentAsNumber.TryRead(ref reader, options, PropActiveShardsPercentAsNumber))
+ {
+ continue;
+ }
+
+ if (propClusterName.TryRead(ref reader, options, PropClusterName))
+ {
+ continue;
+ }
+
+ if (propDelayedUnassignedShards.TryRead(ref reader, options, PropDelayedUnassignedShards))
+ {
+ continue;
+ }
+
+ if (propIndices.TryRead(ref reader, options, PropIndices))
+ {
+ continue;
+ }
+
+ if (propInitializingShards.TryRead(ref reader, options, PropInitializingShards))
+ {
+ continue;
+ }
+
+ if (propNumberOfDataNodes.TryRead(ref reader, options, PropNumberOfDataNodes))
+ {
+ continue;
+ }
+
+ if (propNumberOfInFlightFetch.TryRead(ref reader, options, PropNumberOfInFlightFetch))
+ {
+ continue;
+ }
+
+ if (propNumberOfNodes.TryRead(ref reader, options, PropNumberOfNodes))
+ {
+ continue;
+ }
+
+ if (propNumberOfPendingTasks.TryRead(ref reader, options, PropNumberOfPendingTasks))
+ {
+ continue;
+ }
+
+ if (propRelocatingShards.TryRead(ref reader, options, PropRelocatingShards))
+ {
+ continue;
+ }
+
+ if (propStatus.TryRead(ref reader, options, PropStatus))
+ {
+ continue;
+ }
+
+ if (propTaskMaxWaitingInQueue.TryRead(ref reader, options, PropTaskMaxWaitingInQueue))
+ {
+ continue;
+ }
+
+ if (propTaskMaxWaitingInQueueMillis.TryRead(ref reader, options, PropTaskMaxWaitingInQueueMillis))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryRead(ref reader, options, PropTimedOut))
+ {
+ continue;
+ }
+
+ if (propUnassignedPrimaryShards.TryRead(ref reader, options, PropUnassignedPrimaryShards))
+ {
+ continue;
+ }
+
+ if (propUnassignedShards.TryRead(ref reader, options, PropUnassignedShards))
+ {
+ 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 HealthResponse
+ {
+ ActivePrimaryShards = propActivePrimaryShards.Value
+,
+ ActiveShards = propActiveShards.Value
+,
+ ActiveShardsPercentAsNumber = propActiveShardsPercentAsNumber.Value
+,
+ ClusterName = propClusterName.Value
+,
+ DelayedUnassignedShards = propDelayedUnassignedShards.Value
+,
+ Indices = propIndices.Value
+,
+ InitializingShards = propInitializingShards.Value
+,
+ NumberOfDataNodes = propNumberOfDataNodes.Value
+,
+ NumberOfInFlightFetch = propNumberOfInFlightFetch.Value
+,
+ NumberOfNodes = propNumberOfNodes.Value
+,
+ NumberOfPendingTasks = propNumberOfPendingTasks.Value
+,
+ RelocatingShards = propRelocatingShards.Value
+,
+ Status = propStatus.Value
+,
+ TaskMaxWaitingInQueue = propTaskMaxWaitingInQueue.Value
+,
+ TaskMaxWaitingInQueueMillis = propTaskMaxWaitingInQueueMillis.Value
+,
+ TimedOut = propTimedOut.Value
+,
+ UnassignedPrimaryShards = propUnassignedPrimaryShards.Value
+,
+ UnassignedShards = propUnassignedShards.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, HealthResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropActivePrimaryShards, value.ActivePrimaryShards);
+ writer.WriteProperty(options, PropActiveShards, value.ActiveShards);
+ writer.WriteProperty(options, PropActiveShardsPercentAsNumber, value.ActiveShardsPercentAsNumber);
+ writer.WriteProperty(options, PropClusterName, value.ClusterName);
+ writer.WriteProperty(options, PropDelayedUnassignedShards, value.DelayedUnassignedShards);
+ writer.WriteProperty(options, PropIndices, value.Indices);
+ writer.WriteProperty(options, PropInitializingShards, value.InitializingShards);
+ writer.WriteProperty(options, PropNumberOfDataNodes, value.NumberOfDataNodes);
+ writer.WriteProperty(options, PropNumberOfInFlightFetch, value.NumberOfInFlightFetch);
+ writer.WriteProperty(options, PropNumberOfNodes, value.NumberOfNodes);
+ writer.WriteProperty(options, PropNumberOfPendingTasks, value.NumberOfPendingTasks);
+ writer.WriteProperty(options, PropRelocatingShards, value.RelocatingShards);
+ writer.WriteProperty(options, PropStatus, value.Status);
+ writer.WriteProperty(options, PropTaskMaxWaitingInQueue, value.TaskMaxWaitingInQueue);
+ writer.WriteProperty(options, PropTaskMaxWaitingInQueueMillis, value.TaskMaxWaitingInQueueMillis);
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut);
+ writer.WriteProperty(options, PropUnassignedPrimaryShards, value.UnassignedPrimaryShards);
+ writer.WriteProperty(options, PropUnassignedShards, value.UnassignedShards);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(HealthResponseConverter))]
public sealed partial class HealthResponse : ElasticsearchResponse
{
///
@@ -33,7 +240,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of active primary shards.
///
///
- [JsonInclude, JsonPropertyName("active_primary_shards")]
public int ActivePrimaryShards { get; init; }
///
@@ -41,7 +247,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The total number of active primary and replica shards.
///
///
- [JsonInclude, JsonPropertyName("active_shards")]
public int ActiveShards { get; init; }
///
@@ -49,7 +254,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The ratio of active shards in the cluster expressed as a percentage.
///
///
- [JsonInclude, JsonPropertyName("active_shards_percent_as_number")]
public double ActiveShardsPercentAsNumber { get; init; }
///
@@ -57,7 +261,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The name of the cluster.
///
///
- [JsonInclude, JsonPropertyName("cluster_name")]
public string ClusterName { get; init; }
///
@@ -65,10 +268,7 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of shards whose allocation has been delayed by the timeout settings.
///
///
- [JsonInclude, JsonPropertyName("delayed_unassigned_shards")]
public int DelayedUnassignedShards { get; init; }
- [JsonInclude, JsonPropertyName("indices")]
- [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Cluster.IndexHealthStats))]
public IReadOnlyDictionary? Indices { get; init; }
///
@@ -76,7 +276,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of shards that are under initialization.
///
///
- [JsonInclude, JsonPropertyName("initializing_shards")]
public int InitializingShards { get; init; }
///
@@ -84,7 +283,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of nodes that are dedicated data nodes.
///
///
- [JsonInclude, JsonPropertyName("number_of_data_nodes")]
public int NumberOfDataNodes { get; init; }
///
@@ -92,7 +290,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of unfinished fetches.
///
///
- [JsonInclude, JsonPropertyName("number_of_in_flight_fetch")]
public int NumberOfInFlightFetch { get; init; }
///
@@ -100,7 +297,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of nodes within the cluster.
///
///
- [JsonInclude, JsonPropertyName("number_of_nodes")]
public int NumberOfNodes { get; init; }
///
@@ -108,7 +304,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of cluster-level changes that have not yet been executed.
///
///
- [JsonInclude, JsonPropertyName("number_of_pending_tasks")]
public int NumberOfPendingTasks { get; init; }
///
@@ -116,9 +311,7 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of shards that are under relocation.
///
///
- [JsonInclude, JsonPropertyName("relocating_shards")]
public int RelocatingShards { get; init; }
- [JsonInclude, JsonPropertyName("status")]
public Elastic.Clients.Elasticsearch.HealthStatus Status { get; init; }
///
@@ -126,7 +319,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The time since the earliest initiated task is waiting for being performed.
///
///
- [JsonInclude, JsonPropertyName("task_max_waiting_in_queue")]
public Elastic.Clients.Elasticsearch.Duration? TaskMaxWaitingInQueue { get; init; }
///
@@ -134,7 +326,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The time expressed in milliseconds since the earliest initiated task is waiting for being performed.
///
///
- [JsonInclude, JsonPropertyName("task_max_waiting_in_queue_millis")]
public long TaskMaxWaitingInQueueMillis { get; init; }
///
@@ -142,7 +333,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// If false the response returned within the period of time that is specified by the timeout parameter (30s by default)
///
///
- [JsonInclude, JsonPropertyName("timed_out")]
public bool TimedOut { get; init; }
///
@@ -150,7 +340,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of primary shards that are not allocated.
///
///
- [JsonInclude, JsonPropertyName("unassigned_primary_shards")]
public int UnassignedPrimaryShards { get; init; }
///
@@ -158,6 +347,5 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The number of shards that are not allocated.
///
///
- [JsonInclude, JsonPropertyName("unassigned_shards")]
public int UnassignedShards { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksResponse.g.cs
index 024b4bad879..54a70c4b170 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class PendingTasksResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropTasks = System.Text.Json.JsonEncodedText.Encode("tasks");
+
+ public override PendingTasksResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propTasks = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propTasks.TryRead(ref reader, options, PropTasks))
+ {
+ 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 PendingTasksResponse
+ {
+ Tasks = propTasks.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, PendingTasksResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropTasks, value.Tasks);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PendingTasksResponseConverter))]
public sealed partial class PendingTasksResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("tasks")]
public IReadOnlyCollection Tasks { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
index 2670838909f..0256f090778 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
@@ -86,6 +86,18 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba
internal override string OperationName => "cluster.put_component_template";
+ ///
+ ///
+ /// Name of the component template to create.
+ /// Elasticsearch includes the following built-in component templates: logs-mappings; logs-settings; metrics-mappings; metrics-settings;synthetics-mapping; synthetics-settings.
+ /// Elastic Agent uses these templates to configure backing indices for its data streams.
+ /// If you use Elastic Agent and want to overwrite one of these templates, set the version for your replacement template higher than the current version.
+ /// If you don’t use Elastic Agent and want to disable all built-in component and index templates, set stack.templates.enabled to false using the cluster update settings API.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
+
///
///
/// If true, this request cannot replace or update existing component templates.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs
index 5b48a459f7a..8a389a51c7c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Cluster;
+internal sealed partial class PutComponentTemplateResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override PutComponentTemplateResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 PutComponentTemplateResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, PutComponentTemplateResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PutComponentTemplateResponseConverter))]
public sealed partial class PutComponentTemplateResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class PutComponentTemplateResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
index a6dcb0989ca..603793447c2 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
@@ -165,6 +165,16 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
internal override string OperationName => "count";
+ ///
+ ///
+ /// Comma-separated list of data streams, indices, and aliases to search.
+ /// Supports wildcards (*).
+ /// To search all data streams and indices, omit this parameter or use * or _all.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Indices? Indices { get => P("index"); set => PO("index", value); }
+
///
///
/// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
index e225c0dee65..a4e19c0b018 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
@@ -18,18 +18,63 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class CountResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropCount = System.Text.Json.JsonEncodedText.Encode("count");
+ private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("_shards");
+
+ public override CountResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propCount = default;
+ LocalJsonProperty propShards = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCount.TryRead(ref reader, options, PropCount))
+ {
+ continue;
+ }
+
+ if (propShards.TryRead(ref reader, options, PropShards))
+ {
+ 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 CountResponse
+ {
+ Count = propCount.Value
+,
+ Shards = propShards.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, CountResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropCount, value.Count);
+ writer.WriteProperty(options, PropShards, value.Shards);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(CountResponseConverter))]
public sealed partial class CountResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("count")]
public long Count { get; init; }
- [JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
index e9cf25961c7..9fb04cc736d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
@@ -94,7 +94,7 @@ public sealed partial class CreateRequestParameters : RequestParameters
/// If the target is an index and the document already exists, the request updates the document and increments its version.
///
///
-public sealed partial class CreateRequest : PlainRequest, ISelfSerializable
+public sealed partial class CreateRequest : PlainRequest, ISelfTwoWaySerializable
{
public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id))
{
@@ -108,6 +108,24 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
internal override string OperationName => "create";
+ ///
+ ///
+ /// Unique identifier for the document.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
+ ///
+ ///
+ /// Name of the data stream or index to target.
+ /// If the target doesn’t exist and matches the name or wildcard (*) pattern of an index template with a data_stream definition, this request creates the data stream.
+ /// If the target doesn’t exist and doesn’t match a data stream template, this request creates the index.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// ID of the pipeline to use to preprocess incoming documents.
@@ -168,13 +186,17 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
- [JsonIgnore]
public TDocument Document { get; set; }
- void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ void ISelfTwoWaySerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
settings.SourceSerializer.Serialize(Document, writer);
}
+
+ void ISelfTwoWaySerializable.Deserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ Document = settings.SourceSerializer.Deserialize(ref reader);
+ }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
index edeaeb613d2..c5ab10483e6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
@@ -18,30 +18,129 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class CreateResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropForcedRefresh = System.Text.Json.JsonEncodedText.Encode("forced_refresh");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("_id");
+ private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("_index");
+ private static readonly System.Text.Json.JsonEncodedText PropPrimaryTerm = System.Text.Json.JsonEncodedText.Encode("_primary_term");
+ private static readonly System.Text.Json.JsonEncodedText PropResult = System.Text.Json.JsonEncodedText.Encode("result");
+ private static readonly System.Text.Json.JsonEncodedText PropSeqNo = System.Text.Json.JsonEncodedText.Encode("_seq_no");
+ private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropVersion = System.Text.Json.JsonEncodedText.Encode("_version");
+
+ public override CreateResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propForcedRefresh = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIndex = default;
+ LocalJsonProperty propPrimaryTerm = default;
+ LocalJsonProperty propResult = default;
+ LocalJsonProperty propSeqNo = default;
+ LocalJsonProperty propShards = default;
+ LocalJsonProperty propVersion = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propForcedRefresh.TryRead(ref reader, options, PropForcedRefresh))
+ {
+ continue;
+ }
+
+ if (propId.TryRead(ref reader, options, PropId))
+ {
+ continue;
+ }
+
+ if (propIndex.TryRead(ref reader, options, PropIndex))
+ {
+ continue;
+ }
+
+ if (propPrimaryTerm.TryRead(ref reader, options, PropPrimaryTerm))
+ {
+ continue;
+ }
+
+ if (propResult.TryRead(ref reader, options, PropResult))
+ {
+ continue;
+ }
+
+ if (propSeqNo.TryRead(ref reader, options, PropSeqNo))
+ {
+ continue;
+ }
+
+ if (propShards.TryRead(ref reader, options, PropShards))
+ {
+ continue;
+ }
+
+ if (propVersion.TryRead(ref reader, options, PropVersion))
+ {
+ 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 CreateResponse
+ {
+ ForcedRefresh = propForcedRefresh.Value
+,
+ Id = propId.Value
+,
+ Index = propIndex.Value
+,
+ PrimaryTerm = propPrimaryTerm.Value
+,
+ Result = propResult.Value
+,
+ SeqNo = propSeqNo.Value
+,
+ Shards = propShards.Value
+,
+ Version = propVersion.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, CreateResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh);
+ writer.WriteProperty(options, PropId, value.Id);
+ writer.WriteProperty(options, PropIndex, value.Index);
+ writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm);
+ writer.WriteProperty(options, PropResult, value.Result);
+ writer.WriteProperty(options, PropSeqNo, value.SeqNo);
+ writer.WriteProperty(options, PropShards, value.Shards);
+ writer.WriteProperty(options, PropVersion, value.Version);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(CreateResponseConverter))]
public sealed partial class CreateResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("forced_refresh")]
public bool? ForcedRefresh { get; init; }
- [JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
- [JsonInclude, JsonPropertyName("_index")]
public string Index { get; init; }
- [JsonInclude, JsonPropertyName("_primary_term")]
public long? PrimaryTerm { get; init; }
- [JsonInclude, JsonPropertyName("result")]
public Elastic.Clients.Elasticsearch.Result Result { get; init; }
- [JsonInclude, JsonPropertyName("_seq_no")]
public long? SeqNo { get; init; }
- [JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
- [JsonInclude, JsonPropertyName("_version")]
public long Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsResponse.g.cs
index 774d051bff4..9e13d236083 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsResponse.g.cs
@@ -18,18 +18,63 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class CcrStatsResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAutoFollowStats = System.Text.Json.JsonEncodedText.Encode("auto_follow_stats");
+ private static readonly System.Text.Json.JsonEncodedText PropFollowStats = System.Text.Json.JsonEncodedText.Encode("follow_stats");
+
+ public override CcrStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAutoFollowStats = default;
+ LocalJsonProperty propFollowStats = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAutoFollowStats.TryRead(ref reader, options, PropAutoFollowStats))
+ {
+ continue;
+ }
+
+ if (propFollowStats.TryRead(ref reader, options, PropFollowStats))
+ {
+ 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 CcrStatsResponse
+ {
+ AutoFollowStats = propAutoFollowStats.Value
+,
+ FollowStats = propFollowStats.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, CcrStatsResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAutoFollowStats, value.AutoFollowStats);
+ writer.WriteProperty(options, PropFollowStats, value.FollowStats);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(CcrStatsResponseConverter))]
public sealed partial class CcrStatsResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("auto_follow_stats")]
public Elastic.Clients.Elasticsearch.CrossClusterReplication.AutoFollowStats AutoFollowStats { get; init; }
- [JsonInclude, JsonPropertyName("follow_stats")]
public Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowStats FollowStats { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternRequest.g.cs
index 838922632ca..7887a0f4343 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternRequest.g.cs
@@ -53,6 +53,14 @@ public DeleteAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) :
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.delete_auto_follow_pattern";
+
+ ///
+ ///
+ /// The name of the auto follow pattern.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternResponse.g.cs
index 99617d5ed3d..cd3b3704c66 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class DeleteAutoFollowPatternResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override DeleteAutoFollowPatternResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 DeleteAutoFollowPatternResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteAutoFollowPatternResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteAutoFollowPatternResponseConverter))]
public sealed partial class DeleteAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class DeleteAutoFollowPatternResponse : ElasticsearchRespo
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoRequest.g.cs
index 75a456deb2a..67666762a8f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoRequest.g.cs
@@ -54,6 +54,14 @@ public FollowInfoRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.follow_info";
+
+ ///
+ ///
+ /// A comma-separated list of index patterns; use _all to perform the operation on all indices
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Indices Indices { get => P("index"); set => PR("index", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoResponse.g.cs
index 54fcd7202df..3384cd72bb6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class FollowInfoResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropFollowerIndices = System.Text.Json.JsonEncodedText.Encode("follower_indices");
+
+ public override FollowInfoResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propFollowerIndices = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propFollowerIndices.TryRead(ref reader, options, PropFollowerIndices))
+ {
+ 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 FollowInfoResponse
+ {
+ FollowerIndices = propFollowerIndices.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, FollowInfoResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropFollowerIndices, value.FollowerIndices);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(FollowInfoResponseConverter))]
public sealed partial class FollowInfoResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("follower_indices")]
public IReadOnlyCollection FollowerIndices { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
index 713e143d421..5c3390e4a97 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
@@ -64,6 +64,14 @@ public FollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r =>
internal override string OperationName => "ccr.follow";
+ ///
+ ///
+ /// The name of the follower index.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowResponse.g.cs
index c30f351af3c..c487f8dd7ce 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowResponse.g.cs
@@ -18,20 +18,74 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class FollowResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropFollowIndexCreated = System.Text.Json.JsonEncodedText.Encode("follow_index_created");
+ private static readonly System.Text.Json.JsonEncodedText PropFollowIndexShardsAcked = System.Text.Json.JsonEncodedText.Encode("follow_index_shards_acked");
+ private static readonly System.Text.Json.JsonEncodedText PropIndexFollowingStarted = System.Text.Json.JsonEncodedText.Encode("index_following_started");
+
+ public override FollowResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propFollowIndexCreated = default;
+ LocalJsonProperty propFollowIndexShardsAcked = default;
+ LocalJsonProperty propIndexFollowingStarted = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propFollowIndexCreated.TryRead(ref reader, options, PropFollowIndexCreated))
+ {
+ continue;
+ }
+
+ if (propFollowIndexShardsAcked.TryRead(ref reader, options, PropFollowIndexShardsAcked))
+ {
+ continue;
+ }
+
+ if (propIndexFollowingStarted.TryRead(ref reader, options, PropIndexFollowingStarted))
+ {
+ 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 FollowResponse
+ {
+ FollowIndexCreated = propFollowIndexCreated.Value
+,
+ FollowIndexShardsAcked = propFollowIndexShardsAcked.Value
+,
+ IndexFollowingStarted = propIndexFollowingStarted.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, FollowResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropFollowIndexCreated, value.FollowIndexCreated);
+ writer.WriteProperty(options, PropFollowIndexShardsAcked, value.FollowIndexShardsAcked);
+ writer.WriteProperty(options, PropIndexFollowingStarted, value.IndexFollowingStarted);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(FollowResponseConverter))]
public sealed partial class FollowResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("follow_index_created")]
public bool FollowIndexCreated { get; init; }
- [JsonInclude, JsonPropertyName("follow_index_shards_acked")]
public bool FollowIndexShardsAcked { get; init; }
- [JsonInclude, JsonPropertyName("index_following_started")]
public bool IndexFollowingStarted { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsRequest.g.cs
index a08fd5c57f4..c252015f405 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsRequest.g.cs
@@ -54,6 +54,14 @@ public FollowStatsRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.follow_stats";
+
+ ///
+ ///
+ /// A comma-separated list of index patterns; use _all to perform the operation on all indices
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Indices Indices { get => P("index"); set => PR("index", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsResponse.g.cs
index 46fc142371f..496f9ff5ead 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class FollowStatsResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropIndices = System.Text.Json.JsonEncodedText.Encode("indices");
+
+ public override FollowStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propIndices = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propIndices.TryRead(ref reader, options, PropIndices))
+ {
+ 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 FollowStatsResponse
+ {
+ Indices = propIndices.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, FollowStatsResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropIndices, value.Indices);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(FollowStatsResponseConverter))]
public sealed partial class FollowStatsResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("indices")]
public IReadOnlyCollection Indices { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerRequest.g.cs
index 83afef716e7..2162b0c217c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerRequest.g.cs
@@ -66,6 +66,13 @@ public ForgetFollowerRequest(Elastic.Clients.Elasticsearch.IndexName index) : ba
internal override string OperationName => "ccr.forget_follower";
+ ///
+ ///
+ /// the name of the leader index for which specified follower retention leases should be removed
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
[JsonInclude, JsonPropertyName("follower_cluster")]
public string? FollowerCluster { get; set; }
[JsonInclude, JsonPropertyName("follower_index")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerResponse.g.cs
index cb86186b4b9..76bd8328f2b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class ForgetFollowerResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("_shards");
+
+ public override ForgetFollowerResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propShards = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propShards.TryRead(ref reader, options, PropShards))
+ {
+ 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 ForgetFollowerResponse
+ {
+ Shards = propShards.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ForgetFollowerResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropShards, value.Shards);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ForgetFollowerResponseConverter))]
public sealed partial class ForgetFollowerResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternRequest.g.cs
index 0d67104509e..e08e058e18a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternRequest.g.cs
@@ -57,6 +57,14 @@ public GetAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name? name) : b
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.get_auto_follow_pattern";
+
+ ///
+ ///
+ /// Specifies the auto-follow pattern collection that you want to retrieve. If you do not specify a name, the API returns information for all collections.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name? Name { get => P("name"); set => PO("name", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternResponse.g.cs
index 7e0562b9122..c10c0437340 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class GetAutoFollowPatternResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropPatterns = System.Text.Json.JsonEncodedText.Encode("patterns");
+
+ public override GetAutoFollowPatternResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propPatterns = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propPatterns.TryRead(ref reader, options, PropPatterns))
+ {
+ 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 GetAutoFollowPatternResponse
+ {
+ Patterns = propPatterns.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, GetAutoFollowPatternResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropPatterns, value.Patterns);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(GetAutoFollowPatternResponseConverter))]
public sealed partial class GetAutoFollowPatternResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("patterns")]
public IReadOnlyCollection Patterns { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternRequest.g.cs
index 6d1d06ba408..58e612bc84f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternRequest.g.cs
@@ -60,6 +60,14 @@ public PauseAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) :
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.pause_auto_follow_pattern";
+
+ ///
+ ///
+ /// The name of the auto follow pattern that should pause discovering new indices to follow.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternResponse.g.cs
index bb6d5fb3a2e..2cbb15341ee 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class PauseAutoFollowPatternResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override PauseAutoFollowPatternResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 PauseAutoFollowPatternResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, PauseAutoFollowPatternResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PauseAutoFollowPatternResponseConverter))]
public sealed partial class PauseAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class PauseAutoFollowPatternResponse : ElasticsearchRespon
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowRequest.g.cs
index ba974a7ce62..83f1ea7dbf6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowRequest.g.cs
@@ -56,6 +56,14 @@ public PauseFollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.pause_follow";
+
+ ///
+ ///
+ /// The name of the follower index that should pause following its leader index.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowResponse.g.cs
index 1d2496b5ce9..8c7e36af661 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class PauseFollowResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override PauseFollowResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 PauseFollowResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, PauseFollowResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PauseFollowResponseConverter))]
public sealed partial class PauseFollowResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class PauseFollowResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs
index 0d2b49c3377..e268b7ba838 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs
@@ -60,6 +60,14 @@ public PutAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) : ba
internal override string OperationName => "ccr.put_auto_follow_pattern";
+ ///
+ ///
+ /// The name of the collection of auto-follow patterns.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
+
///
///
/// The name of follower index. The template {{leader_index}} can be used to derive the name of the follower index from the name of the leader index. When following a data stream, use {{leader_index}}; CCR does not support changes to the names of a follower data stream’s backing indices.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternResponse.g.cs
index 12a5140d0b3..0ab86b6f622 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class PutAutoFollowPatternResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override PutAutoFollowPatternResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 PutAutoFollowPatternResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, PutAutoFollowPatternResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PutAutoFollowPatternResponseConverter))]
public sealed partial class PutAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class PutAutoFollowPatternResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternRequest.g.cs
index 33dd4afe9a4..cd26c055f97 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternRequest.g.cs
@@ -55,6 +55,14 @@ public ResumeAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) :
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.resume_auto_follow_pattern";
+
+ ///
+ ///
+ /// The name of the auto follow pattern to resume discovering new indices to follow.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternResponse.g.cs
index c7cab6b189b..dff908edc44 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class ResumeAutoFollowPatternResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override ResumeAutoFollowPatternResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 ResumeAutoFollowPatternResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ResumeAutoFollowPatternResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ResumeAutoFollowPatternResponseConverter))]
public sealed partial class ResumeAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class ResumeAutoFollowPatternResponse : ElasticsearchRespo
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs
index ab0686ccb90..91ac423bf3b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs
@@ -57,6 +57,13 @@ public ResumeFollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base
internal override string OperationName => "ccr.resume_follow";
+ ///
+ ///
+ /// The name of the follow index to resume following.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
[JsonInclude, JsonPropertyName("max_outstanding_read_requests")]
public long? MaxOutstandingReadRequests { get; set; }
[JsonInclude, JsonPropertyName("max_outstanding_write_requests")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowResponse.g.cs
index 0a11009556d..06fc5d45265 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class ResumeFollowResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override ResumeFollowResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 ResumeFollowResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ResumeFollowResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ResumeFollowResponseConverter))]
public sealed partial class ResumeFollowResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class ResumeFollowResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowRequest.g.cs
index ab1fab0076b..b7eae253cba 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowRequest.g.cs
@@ -58,6 +58,14 @@ public UnfollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r =
internal override bool SupportsBody => false;
internal override string OperationName => "ccr.unfollow";
+
+ ///
+ ///
+ /// The name of the follower index that should be turned into a regular index.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowResponse.g.cs
index ee58b3bcbb8..0866793a9e4 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.CrossClusterReplication;
+internal sealed partial class UnfollowResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override UnfollowResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 UnfollowResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, UnfollowResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(UnfollowResponseConverter))]
public sealed partial class UnfollowResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class UnfollowResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesResponse.g.cs
index b84dd6c6f7f..78bb3dc4347 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.DanglingIndices;
+internal sealed partial class ListDanglingIndicesResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropDanglingIndices = System.Text.Json.JsonEncodedText.Encode("dangling_indices");
+
+ public override ListDanglingIndicesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propDanglingIndices = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propDanglingIndices.TryRead(ref reader, options, PropDanglingIndices))
+ {
+ 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 ListDanglingIndicesResponse
+ {
+ DanglingIndices = propDanglingIndices.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ListDanglingIndicesResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropDanglingIndices, value.DanglingIndices);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ListDanglingIndicesResponseConverter))]
public sealed partial class ListDanglingIndicesResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("dangling_indices")]
public IReadOnlyCollection DanglingIndices { get; init; }
}
\ 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 34541aa28c1..bcea9109462 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
@@ -264,6 +264,16 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
internal override string OperationName => "delete_by_query";
+ ///
+ ///
+ /// Comma-separated list of data streams, indices, and aliases to search.
+ /// Supports wildcards (*).
+ /// To search all data streams or indices, omit this parameter or use * or _all.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Indices Indices { get => P("index"); set => PR("index", value); }
+
///
///
/// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
index 04d1a451f0d..77923b03873 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
@@ -18,46 +18,217 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class DeleteByQueryResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropBatches = System.Text.Json.JsonEncodedText.Encode("batches");
+ private static readonly System.Text.Json.JsonEncodedText PropDeleted = System.Text.Json.JsonEncodedText.Encode("deleted");
+ private static readonly System.Text.Json.JsonEncodedText PropFailures = System.Text.Json.JsonEncodedText.Encode("failures");
+ private static readonly System.Text.Json.JsonEncodedText PropNoops = System.Text.Json.JsonEncodedText.Encode("noops");
+ private static readonly System.Text.Json.JsonEncodedText PropRequestsPerSecond = System.Text.Json.JsonEncodedText.Encode("requests_per_second");
+ private static readonly System.Text.Json.JsonEncodedText PropRetries = System.Text.Json.JsonEncodedText.Encode("retries");
+ private static readonly System.Text.Json.JsonEncodedText PropSliceId = System.Text.Json.JsonEncodedText.Encode("slice_id");
+ private static readonly System.Text.Json.JsonEncodedText PropTask = System.Text.Json.JsonEncodedText.Encode("task");
+ private static readonly System.Text.Json.JsonEncodedText PropThrottled = System.Text.Json.JsonEncodedText.Encode("throttled");
+ private static readonly System.Text.Json.JsonEncodedText PropThrottledMillis = System.Text.Json.JsonEncodedText.Encode("throttled_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropThrottledUntil = System.Text.Json.JsonEncodedText.Encode("throttled_until");
+ private static readonly System.Text.Json.JsonEncodedText PropThrottledUntilMillis = System.Text.Json.JsonEncodedText.Encode("throttled_until_millis");
+ private static readonly System.Text.Json.JsonEncodedText PropTimedOut = System.Text.Json.JsonEncodedText.Encode("timed_out");
+ private static readonly System.Text.Json.JsonEncodedText PropTook = System.Text.Json.JsonEncodedText.Encode("took");
+ private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total");
+ private static readonly System.Text.Json.JsonEncodedText PropVersionConflicts = System.Text.Json.JsonEncodedText.Encode("version_conflicts");
+
+ public override DeleteByQueryResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propBatches = default;
+ LocalJsonProperty propDeleted = default;
+ LocalJsonProperty?> propFailures = default;
+ LocalJsonProperty propNoops = default;
+ LocalJsonProperty propRequestsPerSecond = default;
+ LocalJsonProperty propRetries = default;
+ LocalJsonProperty propSliceId = default;
+ LocalJsonProperty propTask = default;
+ LocalJsonProperty propThrottled = default;
+ LocalJsonProperty propThrottledMillis = default;
+ LocalJsonProperty propThrottledUntil = default;
+ LocalJsonProperty propThrottledUntilMillis = default;
+ LocalJsonProperty propTimedOut = default;
+ LocalJsonProperty propTook = default;
+ LocalJsonProperty propTotal = default;
+ LocalJsonProperty propVersionConflicts = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propBatches.TryRead(ref reader, options, PropBatches))
+ {
+ continue;
+ }
+
+ if (propDeleted.TryRead(ref reader, options, PropDeleted))
+ {
+ continue;
+ }
+
+ if (propFailures.TryRead(ref reader, options, PropFailures))
+ {
+ continue;
+ }
+
+ if (propNoops.TryRead(ref reader, options, PropNoops))
+ {
+ continue;
+ }
+
+ if (propRequestsPerSecond.TryRead(ref reader, options, PropRequestsPerSecond))
+ {
+ continue;
+ }
+
+ if (propRetries.TryRead(ref reader, options, PropRetries))
+ {
+ continue;
+ }
+
+ if (propSliceId.TryRead(ref reader, options, PropSliceId))
+ {
+ continue;
+ }
+
+ if (propTask.TryRead(ref reader, options, PropTask))
+ {
+ continue;
+ }
+
+ if (propThrottled.TryRead(ref reader, options, PropThrottled))
+ {
+ continue;
+ }
+
+ if (propThrottledMillis.TryRead(ref reader, options, PropThrottledMillis))
+ {
+ continue;
+ }
+
+ if (propThrottledUntil.TryRead(ref reader, options, PropThrottledUntil))
+ {
+ continue;
+ }
+
+ if (propThrottledUntilMillis.TryRead(ref reader, options, PropThrottledUntilMillis))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryRead(ref reader, options, PropTimedOut))
+ {
+ continue;
+ }
+
+ if (propTook.TryRead(ref reader, options, PropTook))
+ {
+ continue;
+ }
+
+ if (propTotal.TryRead(ref reader, options, PropTotal))
+ {
+ continue;
+ }
+
+ if (propVersionConflicts.TryRead(ref reader, options, PropVersionConflicts))
+ {
+ 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 DeleteByQueryResponse
+ {
+ Batches = propBatches.Value
+,
+ Deleted = propDeleted.Value
+,
+ Failures = propFailures.Value
+,
+ Noops = propNoops.Value
+,
+ RequestsPerSecond = propRequestsPerSecond.Value
+,
+ Retries = propRetries.Value
+,
+ SliceId = propSliceId.Value
+,
+ Task = propTask.Value
+,
+ Throttled = propThrottled.Value
+,
+ ThrottledMillis = propThrottledMillis.Value
+,
+ ThrottledUntil = propThrottledUntil.Value
+,
+ ThrottledUntilMillis = propThrottledUntilMillis.Value
+,
+ TimedOut = propTimedOut.Value
+,
+ Took = propTook.Value
+,
+ Total = propTotal.Value
+,
+ VersionConflicts = propVersionConflicts.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteByQueryResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropBatches, value.Batches);
+ writer.WriteProperty(options, PropDeleted, value.Deleted);
+ writer.WriteProperty(options, PropFailures, value.Failures);
+ writer.WriteProperty(options, PropNoops, value.Noops);
+ writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond);
+ writer.WriteProperty(options, PropRetries, value.Retries);
+ writer.WriteProperty(options, PropSliceId, value.SliceId);
+ writer.WriteProperty(options, PropTask, value.Task);
+ writer.WriteProperty(options, PropThrottled, value.Throttled);
+ writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis);
+ writer.WriteProperty(options, PropThrottledUntil, value.ThrottledUntil);
+ writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis);
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut);
+ writer.WriteProperty(options, PropTook, value.Took);
+ writer.WriteProperty(options, PropTotal, value.Total);
+ writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteByQueryResponseConverter))]
public sealed partial class DeleteByQueryResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("batches")]
public long? Batches { get; init; }
- [JsonInclude, JsonPropertyName("deleted")]
public long? Deleted { get; init; }
- [JsonInclude, JsonPropertyName("failures")]
public IReadOnlyCollection? Failures { get; init; }
- [JsonInclude, JsonPropertyName("noops")]
public long? Noops { get; init; }
- [JsonInclude, JsonPropertyName("requests_per_second")]
public float? RequestsPerSecond { get; init; }
- [JsonInclude, JsonPropertyName("retries")]
public Elastic.Clients.Elasticsearch.Retries? Retries { get; init; }
- [JsonInclude, JsonPropertyName("slice_id")]
public int? SliceId { get; init; }
- [JsonInclude, JsonPropertyName("task")]
public Elastic.Clients.Elasticsearch.TaskId? Task { get; init; }
- [JsonInclude, JsonPropertyName("throttled")]
public Elastic.Clients.Elasticsearch.Duration? Throttled { get; init; }
- [JsonInclude, JsonPropertyName("throttled_millis")]
public long? ThrottledMillis { get; init; }
- [JsonInclude, JsonPropertyName("throttled_until")]
public Elastic.Clients.Elasticsearch.Duration? ThrottledUntil { get; init; }
- [JsonInclude, JsonPropertyName("throttled_until_millis")]
public long? ThrottledUntilMillis { get; init; }
- [JsonInclude, JsonPropertyName("timed_out")]
public bool? TimedOut { get; init; }
- [JsonInclude, JsonPropertyName("took")]
public long? Took { get; init; }
- [JsonInclude, JsonPropertyName("total")]
public long? Total { get; init; }
- [JsonInclude, JsonPropertyName("version_conflicts")]
public long? VersionConflicts { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
index 2b09f0d917c..bdc65725a1a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
@@ -63,6 +63,14 @@ public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.TaskId taskI
internal override string OperationName => "delete_by_query_rethrottle";
+ ///
+ ///
+ /// The ID for the task.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.TaskId TaskId { get => P("task_id"); set => PR("task_id", value); }
+
///
///
/// The throttle for this request in sub-requests per second.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
index 1835de4dc4b..a7517e3b9b5 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
@@ -18,17 +18,83 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class DeleteByQueryRethrottleResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropNodeFailures = System.Text.Json.JsonEncodedText.Encode("node_failures");
+ private static readonly System.Text.Json.JsonEncodedText PropNodes = System.Text.Json.JsonEncodedText.Encode("nodes");
+ private static readonly System.Text.Json.JsonEncodedText PropTaskFailures = System.Text.Json.JsonEncodedText.Encode("task_failures");
+ private static readonly System.Text.Json.JsonEncodedText PropTasks = System.Text.Json.JsonEncodedText.Encode("tasks");
+
+ public override DeleteByQueryRethrottleResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty?> propNodeFailures = default;
+ LocalJsonProperty?> propNodes = default;
+ LocalJsonProperty?> propTaskFailures = default;
+ LocalJsonProperty propTasks = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propNodeFailures.TryRead(ref reader, options, PropNodeFailures))
+ {
+ continue;
+ }
+
+ if (propNodes.TryRead(ref reader, options, PropNodes))
+ {
+ continue;
+ }
+
+ if (propTaskFailures.TryRead(ref reader, options, PropTaskFailures))
+ {
+ continue;
+ }
+
+ if (propTasks.TryRead(ref reader, options, PropTasks))
+ {
+ 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 DeleteByQueryRethrottleResponse
+ {
+ NodeFailures = propNodeFailures.Value
+,
+ Nodes = propNodes.Value
+,
+ TaskFailures = propTaskFailures.Value
+,
+ Tasks = propTasks.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteByQueryRethrottleResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropNodeFailures, value.NodeFailures);
+ writer.WriteProperty(options, PropNodes, value.Nodes);
+ writer.WriteProperty(options, PropTaskFailures, value.TaskFailures);
+ writer.WriteProperty(options, PropTasks, value.Tasks);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteByQueryRethrottleResponseConverter))]
public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("node_failures")]
public IReadOnlyCollection? NodeFailures { get; init; }
///
@@ -36,9 +102,7 @@ public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchRespo
/// Task information grouped by node, if group_by was set to node (the default).
///
///
- [JsonInclude, JsonPropertyName("nodes")]
public IReadOnlyDictionary? Nodes { get; init; }
- [JsonInclude, JsonPropertyName("task_failures")]
public IReadOnlyCollection? TaskFailures { get; init; }
///
@@ -47,6 +111,5 @@ public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchRespo
/// group_by was set to parents.
///
///
- [JsonInclude, JsonPropertyName("tasks")]
public Elastic.Clients.Elasticsearch.Tasks.TaskInfos? Tasks { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
index 479d7e6c9a3..88789d897fa 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
@@ -112,6 +112,22 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
internal override string OperationName => "delete";
+ ///
+ ///
+ /// Unique identifier for the document.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
+ ///
+ ///
+ /// Name of the target index.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// Only perform the operation if the document has this primary term.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
index 035076c71fd..1fd2ae210f4 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
@@ -18,30 +18,129 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class DeleteResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropForcedRefresh = System.Text.Json.JsonEncodedText.Encode("forced_refresh");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("_id");
+ private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("_index");
+ private static readonly System.Text.Json.JsonEncodedText PropPrimaryTerm = System.Text.Json.JsonEncodedText.Encode("_primary_term");
+ private static readonly System.Text.Json.JsonEncodedText PropResult = System.Text.Json.JsonEncodedText.Encode("result");
+ private static readonly System.Text.Json.JsonEncodedText PropSeqNo = System.Text.Json.JsonEncodedText.Encode("_seq_no");
+ private static readonly System.Text.Json.JsonEncodedText PropShards = System.Text.Json.JsonEncodedText.Encode("_shards");
+ private static readonly System.Text.Json.JsonEncodedText PropVersion = System.Text.Json.JsonEncodedText.Encode("_version");
+
+ public override DeleteResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propForcedRefresh = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIndex = default;
+ LocalJsonProperty propPrimaryTerm = default;
+ LocalJsonProperty propResult = default;
+ LocalJsonProperty propSeqNo = default;
+ LocalJsonProperty propShards = default;
+ LocalJsonProperty propVersion = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propForcedRefresh.TryRead(ref reader, options, PropForcedRefresh))
+ {
+ continue;
+ }
+
+ if (propId.TryRead(ref reader, options, PropId))
+ {
+ continue;
+ }
+
+ if (propIndex.TryRead(ref reader, options, PropIndex))
+ {
+ continue;
+ }
+
+ if (propPrimaryTerm.TryRead(ref reader, options, PropPrimaryTerm))
+ {
+ continue;
+ }
+
+ if (propResult.TryRead(ref reader, options, PropResult))
+ {
+ continue;
+ }
+
+ if (propSeqNo.TryRead(ref reader, options, PropSeqNo))
+ {
+ continue;
+ }
+
+ if (propShards.TryRead(ref reader, options, PropShards))
+ {
+ continue;
+ }
+
+ if (propVersion.TryRead(ref reader, options, PropVersion))
+ {
+ 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 DeleteResponse
+ {
+ ForcedRefresh = propForcedRefresh.Value
+,
+ Id = propId.Value
+,
+ Index = propIndex.Value
+,
+ PrimaryTerm = propPrimaryTerm.Value
+,
+ Result = propResult.Value
+,
+ SeqNo = propSeqNo.Value
+,
+ Shards = propShards.Value
+,
+ Version = propVersion.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh);
+ writer.WriteProperty(options, PropId, value.Id);
+ writer.WriteProperty(options, PropIndex, value.Index);
+ writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm);
+ writer.WriteProperty(options, PropResult, value.Result);
+ writer.WriteProperty(options, PropSeqNo, value.SeqNo);
+ writer.WriteProperty(options, PropShards, value.Shards);
+ writer.WriteProperty(options, PropVersion, value.Version);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteResponseConverter))]
public sealed partial class DeleteResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("forced_refresh")]
public bool? ForcedRefresh { get; init; }
- [JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
- [JsonInclude, JsonPropertyName("_index")]
public string Index { get; init; }
- [JsonInclude, JsonPropertyName("_primary_term")]
public long? PrimaryTerm { get; init; }
- [JsonInclude, JsonPropertyName("result")]
public Elastic.Clients.Elasticsearch.Result Result { get; init; }
- [JsonInclude, JsonPropertyName("_seq_no")]
public long? SeqNo { get; init; }
- [JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
- [JsonInclude, JsonPropertyName("_version")]
public long Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
index 42659a1f2b2..76e455ee1b2 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
@@ -69,6 +69,14 @@ public DeleteScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re
internal override string OperationName => "delete_script";
+ ///
+ ///
+ /// Identifier for the stored script or search template.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
///
///
/// Period to wait for a connection to the master node.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptResponse.g.cs
index 660b7f3a641..42692b542a7 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch;
+internal sealed partial class DeleteScriptResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override DeleteScriptResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 DeleteScriptResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteScriptResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteScriptResponseConverter))]
public sealed partial class DeleteScriptResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class DeleteScriptResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs
index 6e2547bbd3c..cab6bb4a935 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs
@@ -53,6 +53,14 @@ public DeletePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r =>
internal override bool SupportsBody => false;
internal override string OperationName => "enrich.delete_policy";
+
+ ///
+ ///
+ /// Enrich policy to delete.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyResponse.g.cs
index ce4f5649cb9..0eb6e476b95 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Enrich;
+internal sealed partial class DeletePolicyResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override DeletePolicyResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 DeletePolicyResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, DeletePolicyResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeletePolicyResponseConverter))]
public sealed partial class DeletePolicyResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class DeletePolicyResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsResponse.g.cs
index 9e9551fdeb4..9856e93fcdc 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsResponse.g.cs
@@ -18,14 +18,71 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Enrich;
+internal sealed partial class EnrichStatsResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropCacheStats = System.Text.Json.JsonEncodedText.Encode("cache_stats");
+ private static readonly System.Text.Json.JsonEncodedText PropCoordinatorStats = System.Text.Json.JsonEncodedText.Encode("coordinator_stats");
+ private static readonly System.Text.Json.JsonEncodedText PropExecutingPolicies = System.Text.Json.JsonEncodedText.Encode("executing_policies");
+
+ public override EnrichStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty?> propCacheStats = default;
+ LocalJsonProperty> propCoordinatorStats = default;
+ LocalJsonProperty> propExecutingPolicies = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCacheStats.TryRead(ref reader, options, PropCacheStats))
+ {
+ continue;
+ }
+
+ if (propCoordinatorStats.TryRead(ref reader, options, PropCoordinatorStats))
+ {
+ continue;
+ }
+
+ if (propExecutingPolicies.TryRead(ref reader, options, PropExecutingPolicies))
+ {
+ 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 EnrichStatsResponse
+ {
+ CacheStats = propCacheStats.Value
+,
+ CoordinatorStats = propCoordinatorStats.Value
+,
+ ExecutingPolicies = propExecutingPolicies.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, EnrichStatsResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropCacheStats, value.CacheStats);
+ writer.WriteProperty(options, PropCoordinatorStats, value.CoordinatorStats);
+ writer.WriteProperty(options, PropExecutingPolicies, value.ExecutingPolicies);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(EnrichStatsResponseConverter))]
public sealed partial class EnrichStatsResponse : ElasticsearchResponse
{
///
@@ -33,7 +90,6 @@ public sealed partial class EnrichStatsResponse : ElasticsearchResponse
/// Objects containing information about the enrich cache stats on each ingest node.
///
///
- [JsonInclude, JsonPropertyName("cache_stats")]
public IReadOnlyCollection? CacheStats { get; init; }
///
@@ -41,7 +97,6 @@ public sealed partial class EnrichStatsResponse : ElasticsearchResponse
/// Objects containing information about each coordinating ingest node for configured enrich processors.
///
///
- [JsonInclude, JsonPropertyName("coordinator_stats")]
public IReadOnlyCollection CoordinatorStats { get; init; }
///
@@ -49,6 +104,5 @@ public sealed partial class EnrichStatsResponse : ElasticsearchResponse
/// Objects containing information about each enrich policy that is currently executing.
///
///
- [JsonInclude, JsonPropertyName("executing_policies")]
public IReadOnlyCollection ExecutingPolicies { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs
index daa404fd68f..4552246a332 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs
@@ -60,6 +60,14 @@ public ExecutePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r =>
internal override string OperationName => "enrich.execute_policy";
+ ///
+ ///
+ /// Enrich policy to execute.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
+
///
///
/// If true, the request blocks other enrich policy execution requests until complete.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs
index 16db521cad5..91946795c11 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs
@@ -18,18 +18,63 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Enrich;
+internal sealed partial class ExecutePolicyResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status");
+ private static readonly System.Text.Json.JsonEncodedText PropTaskId = System.Text.Json.JsonEncodedText.Encode("task_id");
+
+ public override ExecutePolicyResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propStatus = default;
+ LocalJsonProperty propTaskId = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propStatus.TryRead(ref reader, options, PropStatus))
+ {
+ continue;
+ }
+
+ if (propTaskId.TryRead(ref reader, options, PropTaskId))
+ {
+ 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 ExecutePolicyResponse
+ {
+ Status = propStatus.Value
+,
+ TaskId = propTaskId.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ExecutePolicyResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropStatus, value.Status);
+ writer.WriteProperty(options, PropTaskId, value.TaskId);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ExecutePolicyResponseConverter))]
public sealed partial class ExecutePolicyResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("status")]
public Elastic.Clients.Elasticsearch.Enrich.ExecuteEnrichPolicyStatus? Status { get; init; }
- [JsonInclude, JsonPropertyName("task_id")]
public Elastic.Clients.Elasticsearch.TaskId? TaskId { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs
index 48e5c1b5181..06aeccf2723 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs
@@ -57,6 +57,15 @@ public GetPolicyRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r => r
internal override bool SupportsBody => false;
internal override string OperationName => "enrich.get_policy";
+
+ ///
+ ///
+ /// Comma-separated list of enrich policy names used to limit the request.
+ /// To return information for all enrich policies, omit this parameter.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Names? Name { get => P("name"); set => PO("name", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyResponse.g.cs
index cadd77f15f8..b36f634de16 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyResponse.g.cs
@@ -18,16 +18,52 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Enrich;
+internal sealed partial class GetPolicyResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropPolicies = System.Text.Json.JsonEncodedText.Encode("policies");
+
+ public override GetPolicyResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propPolicies = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propPolicies.TryRead(ref reader, options, PropPolicies))
+ {
+ 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 GetPolicyResponse
+ {
+ Policies = propPolicies.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, GetPolicyResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropPolicies, value.Policies);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(GetPolicyResponseConverter))]
public sealed partial class GetPolicyResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("policies")]
public IReadOnlyCollection Policies { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs
index 7431d4cedbb..eb3ce9ff847 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs
@@ -54,6 +54,14 @@ public PutPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.R
internal override string OperationName => "enrich.put_policy";
+ ///
+ ///
+ /// Name of the enrich policy to create or update.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Name Name { get => P("name"); set => PR("name", value); }
+
///
///
/// Matches enrich data to incoming documents based on a geo_shape query.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyResponse.g.cs
index b1c1eb5625c..0374a1fd710 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Enrich;
+internal sealed partial class PutPolicyResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override PutPolicyResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 PutPolicyResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, PutPolicyResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PutPolicyResponseConverter))]
public sealed partial class PutPolicyResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class PutPolicyResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs
index ab270a990cd..f4dcf53db5f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs
@@ -54,6 +54,16 @@ public EqlDeleteRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requi
internal override bool SupportsBody => false;
internal override string OperationName => "eql.delete";
+
+ ///
+ ///
+ /// Identifier for the search to delete.
+ /// A search ID is provided in the EQL search API's response for an async search.
+ /// A search ID is also provided if the request’s keep_on_completion parameter is true.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteResponse.g.cs
index 2ab88cfe2cc..6802670cf42 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteResponse.g.cs
@@ -18,14 +18,51 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Eql;
+internal sealed partial class EqlDeleteResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
+
+ public override EqlDeleteResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
+ {
+ 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 EqlDeleteResponse
+ {
+ Acknowledged = propAcknowledged.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, EqlDeleteResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(EqlDeleteResponseConverter))]
public sealed partial class EqlDeleteResponse : ElasticsearchResponse
{
///
@@ -33,6 +70,5 @@ public sealed partial class EqlDeleteResponse : ElasticsearchResponse
/// For a successful response, this value is always true. On failure, an exception is returned instead.
///
///
- [JsonInclude, JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs
index bb6b31ce705..ca1bd023624 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs
@@ -69,6 +69,14 @@ public EqlGetRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required
internal override string OperationName => "eql.get";
+ ///
+ ///
+ /// Identifier for the search.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
///
///
/// Period for which the search and its results are stored on the cluster.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
index ccdd1f5ef9d..182f04efe2d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
@@ -18,14 +18,128 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Eql;
+internal sealed partial class EqlGetResponseConverter : System.Text.Json.Serialization.JsonConverter>
+{
+ private static readonly System.Text.Json.JsonEncodedText PropHits = System.Text.Json.JsonEncodedText.Encode("hits");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id");
+ private static readonly System.Text.Json.JsonEncodedText PropIsPartial = System.Text.Json.JsonEncodedText.Encode("is_partial");
+ private static readonly System.Text.Json.JsonEncodedText PropIsRunning = System.Text.Json.JsonEncodedText.Encode("is_running");
+ private static readonly System.Text.Json.JsonEncodedText PropShardFailures = System.Text.Json.JsonEncodedText.Encode("shard_failures");
+ private static readonly System.Text.Json.JsonEncodedText PropTimedOut = System.Text.Json.JsonEncodedText.Encode("timed_out");
+ private static readonly System.Text.Json.JsonEncodedText PropTook = System.Text.Json.JsonEncodedText.Encode("took");
+
+ public override EqlGetResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propHits = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIsPartial = default;
+ LocalJsonProperty propIsRunning = default;
+ LocalJsonProperty?> propShardFailures = default;
+ LocalJsonProperty propTimedOut = default;
+ LocalJsonProperty propTook = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propHits.TryRead(ref reader, options, PropHits))
+ {
+ continue;
+ }
+
+ if (propId.TryRead(ref reader, options, PropId))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryRead(ref reader, options, PropIsPartial))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryRead(ref reader, options, PropIsRunning))
+ {
+ continue;
+ }
+
+ if (propShardFailures.TryRead(ref reader, options, PropShardFailures))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryRead(ref reader, options, PropTimedOut))
+ {
+ continue;
+ }
+
+ if (propTook.TryRead(ref reader, options, PropTook))
+ {
+ 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 EqlGetResponse
+ {
+ Hits = propHits.Value
+,
+ Id = propId.Value
+,
+ IsPartial = propIsPartial.Value
+,
+ IsRunning = propIsRunning.Value
+,
+ ShardFailures = propShardFailures.Value
+,
+ TimedOut = propTimedOut.Value
+,
+ Took = propTook.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, EqlGetResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropHits, value.Hits);
+ writer.WriteProperty(options, PropId, value.Id);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning);
+ writer.WriteProperty(options, PropShardFailures, value.ShardFailures);
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut);
+ writer.WriteProperty(options, PropTook, value.Took);
+ writer.WriteEndObject();
+ }
+}
+
+internal sealed partial class EqlGetResponseConverterFactory : System.Text.Json.Serialization.JsonConverterFactory
+{
+ public override bool CanConvert(System.Type typeToConvert)
+ {
+ return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(EqlGetResponse<>);
+ }
+
+ public override System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ var args = typeToConvert.GetGenericArguments();
+#pragma warning disable IL3050
+ var converter = (System.Text.Json.Serialization.JsonConverter)System.Activator.CreateInstance(typeof(EqlGetResponseConverter<>).MakeGenericType(args[0]), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public, binder: null, args: null, culture: null)!;
+#pragma warning restore IL3050
+ return converter;
+ }
+}
+
+[JsonConverter(typeof(EqlGetResponseConverterFactory))]
public sealed partial class EqlGetResponse : ElasticsearchResponse
{
///
@@ -33,7 +147,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// Contains matching events and sequences. Also contains related metadata.
///
///
- [JsonInclude, JsonPropertyName("hits")]
public Elastic.Clients.Elasticsearch.Eql.EqlHits Hits { get; init; }
///
@@ -41,7 +154,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// Identifier for the search.
///
///
- [JsonInclude, JsonPropertyName("id")]
public string? Id { get; init; }
///
@@ -49,7 +161,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// If true, the response does not contain complete search results.
///
///
- [JsonInclude, JsonPropertyName("is_partial")]
public bool? IsPartial { get; init; }
///
@@ -57,7 +168,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// If true, the search request is still executing.
///
///
- [JsonInclude, JsonPropertyName("is_running")]
public bool? IsRunning { get; init; }
///
@@ -65,7 +175,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// Contains information about shard failures (if any), in case allow_partial_search_results=true
///
///
- [JsonInclude, JsonPropertyName("shard_failures")]
public IReadOnlyCollection? ShardFailures { get; init; }
///
@@ -73,7 +182,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// If true, the request timed out before completion.
///
///
- [JsonInclude, JsonPropertyName("timed_out")]
public bool? TimedOut { get; init; }
///
@@ -81,6 +189,5 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// Milliseconds it took Elasticsearch to execute the request.
///
///
- [JsonInclude, JsonPropertyName("took")]
public long? Took { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
index 5f88564f66a..bc21ccf6266 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
@@ -18,6 +18,7 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Requests;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport;
@@ -43,6 +44,199 @@ public sealed partial class EqlSearchRequestParameters : RequestParameters
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
}
+internal sealed partial class EqlSearchRequestConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropAllowPartialSearchResults = System.Text.Json.JsonEncodedText.Encode("allow_partial_search_results");
+ private static readonly System.Text.Json.JsonEncodedText PropAllowPartialSequenceResults = System.Text.Json.JsonEncodedText.Encode("allow_partial_sequence_results");
+ private static readonly System.Text.Json.JsonEncodedText PropCaseSensitive = System.Text.Json.JsonEncodedText.Encode("case_sensitive");
+ private static readonly System.Text.Json.JsonEncodedText PropEventCategoryField = System.Text.Json.JsonEncodedText.Encode("event_category_field");
+ private static readonly System.Text.Json.JsonEncodedText PropFetchSize = System.Text.Json.JsonEncodedText.Encode("fetch_size");
+ private static readonly System.Text.Json.JsonEncodedText PropFields = System.Text.Json.JsonEncodedText.Encode("fields");
+ private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter");
+ private static readonly System.Text.Json.JsonEncodedText PropKeepAlive = System.Text.Json.JsonEncodedText.Encode("keep_alive");
+ private static readonly System.Text.Json.JsonEncodedText PropKeepOnCompletion = System.Text.Json.JsonEncodedText.Encode("keep_on_completion");
+ private static readonly System.Text.Json.JsonEncodedText PropMaxSamplesPerKey = System.Text.Json.JsonEncodedText.Encode("max_samples_per_key");
+ private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query");
+ private static readonly System.Text.Json.JsonEncodedText PropResultPosition = System.Text.Json.JsonEncodedText.Encode("result_position");
+ private static readonly System.Text.Json.JsonEncodedText PropRuntimeMappings = System.Text.Json.JsonEncodedText.Encode("runtime_mappings");
+ private static readonly System.Text.Json.JsonEncodedText PropSize = System.Text.Json.JsonEncodedText.Encode("size");
+ private static readonly System.Text.Json.JsonEncodedText PropTiebreakerField = System.Text.Json.JsonEncodedText.Encode("tiebreaker_field");
+ private static readonly System.Text.Json.JsonEncodedText PropTimestampField = System.Text.Json.JsonEncodedText.Encode("timestamp_field");
+ private static readonly System.Text.Json.JsonEncodedText PropWaitForCompletionTimeout = System.Text.Json.JsonEncodedText.Encode("wait_for_completion_timeout");
+
+ public override EqlSearchRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty propAllowPartialSearchResults = default;
+ LocalJsonProperty propAllowPartialSequenceResults = default;
+ LocalJsonProperty propCaseSensitive = default;
+ LocalJsonProperty propEventCategoryField = default;
+ LocalJsonProperty propFetchSize = default;
+ LocalJsonProperty?> propFields = default;
+ LocalJsonProperty?> propFilter = default;
+ LocalJsonProperty propKeepAlive = default;
+ LocalJsonProperty propKeepOnCompletion = default;
+ LocalJsonProperty propMaxSamplesPerKey = default;
+ LocalJsonProperty propQuery = default;
+ LocalJsonProperty propResultPosition = default;
+ LocalJsonProperty?> propRuntimeMappings = default;
+ LocalJsonProperty propSize = default;
+ LocalJsonProperty propTiebreakerField = default;
+ LocalJsonProperty propTimestampField = default;
+ LocalJsonProperty propWaitForCompletionTimeout = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAllowPartialSearchResults.TryRead(ref reader, options, PropAllowPartialSearchResults))
+ {
+ continue;
+ }
+
+ if (propAllowPartialSequenceResults.TryRead(ref reader, options, PropAllowPartialSequenceResults))
+ {
+ continue;
+ }
+
+ if (propCaseSensitive.TryRead(ref reader, options, PropCaseSensitive))
+ {
+ continue;
+ }
+
+ if (propEventCategoryField.TryRead(ref reader, options, PropEventCategoryField))
+ {
+ continue;
+ }
+
+ if (propFetchSize.TryRead(ref reader, options, PropFetchSize))
+ {
+ continue;
+ }
+
+ if (propFields.TryRead(ref reader, options, PropFields, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat>)))
+ {
+ continue;
+ }
+
+ if (propFilter.TryRead(ref reader, options, PropFilter, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.QueryDsl.Query>)))
+ {
+ continue;
+ }
+
+ if (propKeepAlive.TryRead(ref reader, options, PropKeepAlive))
+ {
+ continue;
+ }
+
+ if (propKeepOnCompletion.TryRead(ref reader, options, PropKeepOnCompletion))
+ {
+ continue;
+ }
+
+ if (propMaxSamplesPerKey.TryRead(ref reader, options, PropMaxSamplesPerKey))
+ {
+ continue;
+ }
+
+ if (propQuery.TryRead(ref reader, options, PropQuery))
+ {
+ continue;
+ }
+
+ if (propResultPosition.TryRead(ref reader, options, PropResultPosition))
+ {
+ continue;
+ }
+
+ if (propRuntimeMappings.TryRead(ref reader, options, PropRuntimeMappings))
+ {
+ continue;
+ }
+
+ if (propSize.TryRead(ref reader, options, PropSize))
+ {
+ continue;
+ }
+
+ if (propTiebreakerField.TryRead(ref reader, options, PropTiebreakerField))
+ {
+ continue;
+ }
+
+ if (propTimestampField.TryRead(ref reader, options, PropTimestampField))
+ {
+ continue;
+ }
+
+ if (propWaitForCompletionTimeout.TryRead(ref reader, options, PropWaitForCompletionTimeout))
+ {
+ 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 EqlSearchRequest
+ {
+ AllowPartialSearchResults = propAllowPartialSearchResults.Value
+ ,
+ AllowPartialSequenceResults = propAllowPartialSequenceResults.Value
+ ,
+ CaseSensitive = propCaseSensitive.Value
+ ,
+ EventCategoryField = propEventCategoryField.Value
+ ,
+ FetchSize = propFetchSize.Value
+ ,
+ Fields = propFields.Value
+ ,
+ Filter = propFilter.Value
+ ,
+ KeepAlive = propKeepAlive.Value
+ ,
+ KeepOnCompletion = propKeepOnCompletion.Value
+ ,
+ MaxSamplesPerKey = propMaxSamplesPerKey.Value
+ ,
+ Query = propQuery.Value
+ ,
+ ResultPosition = propResultPosition.Value
+ ,
+ RuntimeMappings = propRuntimeMappings.Value
+ ,
+ Size = propSize.Value
+ ,
+ TiebreakerField = propTiebreakerField.Value
+ ,
+ TimestampField = propTimestampField.Value
+ ,
+ WaitForCompletionTimeout = propWaitForCompletionTimeout.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, EqlSearchRequest value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults);
+ writer.WriteProperty(options, PropAllowPartialSequenceResults, value.AllowPartialSequenceResults);
+ writer.WriteProperty(options, PropCaseSensitive, value.CaseSensitive);
+ writer.WriteProperty(options, PropEventCategoryField, value.EventCategoryField);
+ writer.WriteProperty(options, PropFetchSize, value.FetchSize);
+ writer.WriteProperty(options, PropFields, value.Fields, null, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat>));
+ writer.WriteProperty(options, PropFilter, value.Filter, null, typeof(SingleOrManyMarker?, Elastic.Clients.Elasticsearch.QueryDsl.Query>));
+ writer.WriteProperty(options, PropKeepAlive, value.KeepAlive);
+ writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion);
+ writer.WriteProperty(options, PropMaxSamplesPerKey, value.MaxSamplesPerKey);
+ writer.WriteProperty(options, PropQuery, value.Query);
+ writer.WriteProperty(options, PropResultPosition, value.ResultPosition);
+ writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings);
+ writer.WriteProperty(options, PropSize, value.Size);
+ writer.WriteProperty(options, PropTiebreakerField, value.TiebreakerField);
+ writer.WriteProperty(options, PropTimestampField, value.TimestampField);
+ writer.WriteProperty(options, PropWaitForCompletionTimeout, value.WaitForCompletionTimeout);
+ writer.WriteEndObject();
+ }
+}
+
///
///
/// Get EQL search results.
@@ -50,6 +244,7 @@ public sealed partial class EqlSearchRequestParameters : RequestParameters
/// EQL assumes each document in a data stream or index corresponds to an event.
///
///
+[JsonConverter(typeof(EqlSearchRequestConverter))]
public sealed partial class EqlSearchRequest : PlainRequest
{
public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices))
@@ -64,9 +259,13 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
internal override string OperationName => "eql.search";
- [JsonIgnore]
+ ///
+ ///
+ /// The name of the index to scope the operation
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Indices Indices { get => P("index"); set => PR("index", value); }
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
- [JsonIgnore]
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
///
@@ -74,13 +273,9 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// If true, missing or closed indices are not included in the response.
///
///
- [JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
- [JsonInclude, JsonPropertyName("allow_partial_search_results")]
public bool? AllowPartialSearchResults { get; set; }
- [JsonInclude, JsonPropertyName("allow_partial_sequence_results")]
public bool? AllowPartialSequenceResults { get; set; }
- [JsonInclude, JsonPropertyName("case_sensitive")]
public bool? CaseSensitive { get; set; }
///
@@ -88,7 +283,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// Field containing the event classification, such as process, file, or network.
///
///
- [JsonInclude, JsonPropertyName("event_category_field")]
public Elastic.Clients.Elasticsearch.Field? EventCategoryField { get; set; }
///
@@ -96,7 +290,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// Maximum number of events to search at a time for sequence queries.
///
///
- [JsonInclude, JsonPropertyName("fetch_size")]
public int? FetchSize { get; set; }
///
@@ -104,8 +297,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.
///
///
- [JsonInclude, JsonPropertyName("fields")]
- [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat))]
public ICollection? Fields { get; set; }
///
@@ -113,12 +304,8 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// Query, written in Query DSL, used to filter the events on which the EQL query runs.
///
///
- [JsonInclude, JsonPropertyName("filter")]
- [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))]
public ICollection? Filter { get; set; }
- [JsonInclude, JsonPropertyName("keep_alive")]
public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get; set; }
- [JsonInclude, JsonPropertyName("keep_on_completion")]
public bool? KeepOnCompletion { get; set; }
///
@@ -128,7 +315,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// max_samples_per_key parameter. Pipes are not supported for sample queries.
///
///
- [JsonInclude, JsonPropertyName("max_samples_per_key")]
public int? MaxSamplesPerKey { get; set; }
///
@@ -136,11 +322,8 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// EQL query you wish to run.
///
///
- [JsonInclude, JsonPropertyName("query")]
public string Query { get; set; }
- [JsonInclude, JsonPropertyName("result_position")]
public Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPosition { get; set; }
- [JsonInclude, JsonPropertyName("runtime_mappings")]
public IDictionary? RuntimeMappings { get; set; }
///
@@ -148,7 +331,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// For basic queries, the maximum number of matching events to return. Defaults to 10
///
///
- [JsonInclude, JsonPropertyName("size")]
public int? Size { get; set; }
///
@@ -156,7 +338,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// Field used to sort hits with the same timestamp in ascending order
///
///
- [JsonInclude, JsonPropertyName("tiebreaker_field")]
public Elastic.Clients.Elasticsearch.Field? TiebreakerField { get; set; }
///
@@ -164,9 +345,7 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// Field containing event timestamp. Default "@timestamp"
///
///
- [JsonInclude, JsonPropertyName("timestamp_field")]
public Elastic.Clients.Elasticsearch.Field? TimestampField { get; set; }
- [JsonInclude, JsonPropertyName("wait_for_completion_timeout")]
public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get; set; }
}
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
index 720dbc35012..4d721f96ccf 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
@@ -18,14 +18,128 @@
#nullable restore
using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Next;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Eql;
+internal sealed partial class EqlSearchResponseConverter : System.Text.Json.Serialization.JsonConverter>
+{
+ private static readonly System.Text.Json.JsonEncodedText PropHits = System.Text.Json.JsonEncodedText.Encode("hits");
+ private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id");
+ private static readonly System.Text.Json.JsonEncodedText PropIsPartial = System.Text.Json.JsonEncodedText.Encode("is_partial");
+ private static readonly System.Text.Json.JsonEncodedText PropIsRunning = System.Text.Json.JsonEncodedText.Encode("is_running");
+ private static readonly System.Text.Json.JsonEncodedText PropShardFailures = System.Text.Json.JsonEncodedText.Encode("shard_failures");
+ private static readonly System.Text.Json.JsonEncodedText PropTimedOut = System.Text.Json.JsonEncodedText.Encode("timed_out");
+ private static readonly System.Text.Json.JsonEncodedText PropTook = System.Text.Json.JsonEncodedText.Encode("took");
+
+ public override EqlSearchResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonProperty> propHits = default;
+ LocalJsonProperty propId = default;
+ LocalJsonProperty propIsPartial = default;
+ LocalJsonProperty propIsRunning = default;
+ LocalJsonProperty?> propShardFailures = default;
+ LocalJsonProperty propTimedOut = default;
+ LocalJsonProperty