diff --git a/.buildkite/DockerFile b/.buildkite/DockerFile
index 227524274d2..9ccd51b4944 100644
--- a/.buildkite/DockerFile
+++ b/.buildkite/DockerFile
@@ -1,4 +1,4 @@
-ARG DOTNET_VERSION=8.0.400
+ARG DOTNET_VERSION=9.0.100
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
ENV NUGET_SCRATCH="/tmp/NuGetScratch"
diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml
index 87f461176da..b702d1737b2 100644
--- a/.buildkite/pipeline.yml
+++ b/.buildkite/pipeline.yml
@@ -5,7 +5,7 @@ steps:
env:
TEST_SUITE: "{{ matrix.suite }}"
STACK_VERSION: master-SNAPSHOT
- DOTNET_VERSION: 8.0.400
+ DOTNET_VERSION: 9.0.100
matrix:
setup:
suite:
diff --git a/.buildkite/run-repository.ps1 b/.buildkite/run-repository.ps1
index 4a290f1c625..774f3684ccd 100644
--- a/.buildkite/run-repository.ps1
+++ b/.buildkite/run-repository.ps1
@@ -14,7 +14,7 @@ param(
$NODE_NAME,
[string]
- $DOTNET_VERSION = "8.0.400"
+ $DOTNET_VERSION = "9.0.100"
)
$ESC = [char]27
diff --git a/.buildkite/run-repository.sh b/.buildkite/run-repository.sh
index 9c212f484c1..d0b1ba84870 100755
--- a/.buildkite/run-repository.sh
+++ b/.buildkite/run-repository.sh
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail
-DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
+DOTNET_VERSION=${DOTNET_VERSION-9.0.100}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}
diff --git a/.buildkite/run-tests.ps1 b/.buildkite/run-tests.ps1
index 503edd8df06..3113065ce2d 100644
--- a/.buildkite/run-tests.ps1
+++ b/.buildkite/run-tests.ps1
@@ -8,7 +8,7 @@ param (
$TEST_SUITE = "free",
[string]
- $DOTNET_VERSION = "8.0.400"
+ $DOTNET_VERSION = "9.0.100"
)
$ESC = [char]27
diff --git a/.ci/DockerFile b/.ci/DockerFile
index 8c642b99967..5ba098c2552 100644
--- a/.ci/DockerFile
+++ b/.ci/DockerFile
@@ -1,4 +1,4 @@
-ARG DOTNET_VERSION=8.0.400
+ARG DOTNET_VERSION=9.0.100
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
ENV NUGET_SCRATCH="/tmp/NuGetScratch"
diff --git a/.ci/make.sh b/.ci/make.sh
index 672ad78bd7d..ad1dd59e455 100755
--- a/.ci/make.sh
+++ b/.ci/make.sh
@@ -42,7 +42,7 @@ OUTPUT_DIR="$repo/${output_folder}"
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
mkdir -p "$OUTPUT_DIR"
-DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
+DOTNET_VERSION=${DOTNET_VERSION-9.0.100}
echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
diff --git a/.ci/readme.md b/.ci/readme.md
index fe87c60afd4..95bd4f20fc9 100644
--- a/.ci/readme.md
+++ b/.ci/readme.md
@@ -30,7 +30,7 @@ $ STACK_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests
|-------------------------|-------------|-------------|
| `STACK_VERSION` | `N/A` | The elasticsearch version to target
| `TEST_SUITE` | `basic` | `free` or `platinum` sets which test suite to run and which container to run against. |
-| `DOTNET_VERSION` | `8.0.400` | The .NET sdk version used to grab the proper container |
+| `DOTNET_VERSION` | `9.0.100` | The .NET sdk version used to grab the proper container |
If you want to manually spin up elasticsearch for these tests and call the runner afterwards you can use
diff --git a/.ci/run-repository.ps1 b/.ci/run-repository.ps1
index e842f7fe215..877995e542f 100644
--- a/.ci/run-repository.ps1
+++ b/.ci/run-repository.ps1
@@ -14,7 +14,7 @@ param(
$NODE_NAME,
[string]
- $DOTNET_VERSION = "8.0.400"
+ $DOTNET_VERSION = "9.0.100"
)
$ESC = [char]27
diff --git a/.ci/run-repository.sh b/.ci/run-repository.sh
index 0e49cdaf1bf..2191e872ea9 100755
--- a/.ci/run-repository.sh
+++ b/.ci/run-repository.sh
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail
-DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
+DOTNET_VERSION=${DOTNET_VERSION-9.0.100}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}
diff --git a/.ci/run-tests.ps1 b/.ci/run-tests.ps1
index 481ad155dbd..89b91ebaadf 100644
--- a/.ci/run-tests.ps1
+++ b/.ci/run-tests.ps1
@@ -8,7 +8,7 @@ param (
$TEST_SUITE = "free",
[string]
- $DOTNET_VERSION = "8.0.400"
+ $DOTNET_VERSION = "9.0.100"
)
$ESC = [char]27
diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml
index 421f57f8973..0c4a5a2b9ba 100755
--- a/.ci/test-matrix.yml
+++ b/.ci/test-matrix.yml
@@ -8,6 +8,6 @@ TEST_SUITE:
- platinum
DOTNET_VERSION:
- - 8.0.400
+ - 9.0.100
exclude: ~
diff --git a/Directory.Build.props b/Directory.Build.props
index 91ddb2e93ec..cdc634db8d7 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -50,4 +50,8 @@
+
+
+ NU1901;NU1902;NU1903;NU1904
+
\ No newline at end of file
diff --git a/build/scripts/Versioning.fs b/build/scripts/Versioning.fs
index 4b27be22871..a3b9d7f2c07 100644
--- a/build/scripts/Versioning.fs
+++ b/build/scripts/Versioning.fs
@@ -17,7 +17,7 @@ module Versioning =
// Since that file is now generated by the dotnet tooling and GitVersion and similar tooling all still have
// active issues related to dotnet core, we now just burn this info in global.json
- let parse (v:string) = SemVer.parse(v)
+ let parse (v: string) = SemVer.parse(if String.IsNullOrEmpty(v) then "1.0.0" else v)
//Versions in form of e.g 6.1.0 is inferred as datetime so we bake the json shape into the provider like this
type SdkVersion = { version:string; rollForward:string; allowPrerelease:bool }
diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj
index 29ab285f8f5..94f4e3194ff 100644
--- a/build/scripts/scripts.fsproj
+++ b/build/scripts/scripts.fsproj
@@ -1,6 +1,6 @@
- net8.0
+ net9.0
Exe
$(NoWarn);NU1701
diff --git a/global.json b/global.json
index c1ae6f120d3..00b67caef9e 100644
--- a/global.json
+++ b/global.json
@@ -1,10 +1,7 @@
{
"sdk": {
- "version": "8.0.400",
+ "version": "9.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
- },
- "version": "8.8.0-alpha.1",
- "doc_current": "main",
- "doc_branch": "main"
+ }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
index d21f64b5921..38e63bfc6b6 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..7cde62d9124 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
@@ -56,6 +56,11 @@ public AsyncSearchStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r =>
{
}
+ [JsonConstructor]
+ internal AsyncSearchStatusRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchStatus;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -64,6 +69,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..1353e492ef6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
@@ -22,10 +22,161 @@
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);
+ LocalJsonValue propClusters = default;
+ LocalJsonValue propCompletionStatus = default;
+ LocalJsonValue propCompletionTime = default;
+ LocalJsonValue propCompletionTimeInMillis = default;
+ LocalJsonValue propExpirationTime = default;
+ LocalJsonValue propExpirationTimeInMillis = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIsPartial = default;
+ LocalJsonValue propIsRunning = default;
+ LocalJsonValue propShards = default;
+ LocalJsonValue propStartTime = default;
+ LocalJsonValue propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propClusters.TryReadProperty(ref reader, options, PropClusters, null))
+ {
+ continue;
+ }
+
+ if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null))
+ {
+ continue;
+ }
+
+ if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, null))
+ {
+ continue;
+ }
+
+ if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
+ {
+ continue;
+ }
+
+ if (propShards.TryReadProperty(ref reader, options, PropShards, null))
+ {
+ continue;
+ }
+
+ if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, null))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null);
+ writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, null);
+ writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, null);
+ writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, null);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
+ writer.WriteProperty(options, PropShards, value.Shards, null, null);
+ writer.WriteProperty(options, PropStartTime, value.StartTime, null, null);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(AsyncSearchStatusResponseConverter))]
public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
{
///
@@ -34,7 +185,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 +194,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 +202,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 +210,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 +220,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 +228,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 +235,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..eef26368123 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
@@ -50,6 +50,11 @@ public DeleteAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r =>
{
}
+ [JsonConstructor]
+ internal DeleteAsyncSearchRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchDelete;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -57,6 +62,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..caf3ecfc88b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteAsyncSearchResponseConverter))]
public sealed partial class DeleteAsyncSearchResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..5bdfb455c49 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
@@ -75,6 +75,11 @@ public GetAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.
{
}
+ [JsonConstructor]
+ internal GetAsyncSearchRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchGet;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -83,6 +88,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..e7360f3539d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
@@ -22,10 +22,158 @@
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);
+ LocalJsonValue propCompletionTime = default;
+ LocalJsonValue propCompletionTimeInMillis = default;
+ LocalJsonValue propExpirationTime = default;
+ LocalJsonValue propExpirationTimeInMillis = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIsPartial = default;
+ LocalJsonValue propIsRunning = default;
+ LocalJsonValue> propResponse = default;
+ LocalJsonValue propStartTime = default;
+ LocalJsonValue propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, null))
+ {
+ continue;
+ }
+
+ if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
+ {
+ continue;
+ }
+
+ if (propResponse.TryReadProperty(ref reader, options, PropResponse, null))
+ {
+ continue;
+ }
+
+ if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, null))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, null);
+ writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, null);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
+ writer.WriteProperty(options, PropResponse, value.Response, null, null);
+ writer.WriteProperty(options, PropStartTime, value.StartTime, null, null);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, null);
+ 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 +182,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 +190,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 +200,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 +208,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..fd891e1d7ce 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
@@ -231,410 +231,351 @@ 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);
+ LocalJsonValue?> propAggregations = default;
+ LocalJsonValue propCollapse = default;
+ LocalJsonValue?> propDocvalueFields = default;
+ LocalJsonValue propExplain = default;
+ LocalJsonValue?> propExt = default;
+ LocalJsonValue?> propFields = default;
+ LocalJsonValue propFrom = default;
+ LocalJsonValue propHighlight = default;
+ LocalJsonValue>?> propIndicesBoost = default;
+ LocalJsonValue?> propKnn = default;
+ LocalJsonValue propMinScore = default;
+ LocalJsonValue propPit = default;
+ LocalJsonValue propPostFilter = default;
+ LocalJsonValue propProfile = default;
+ LocalJsonValue propQuery = default;
+ LocalJsonValue?> propRescore = default;
+ LocalJsonValue?> propRuntimeMappings = default;
+ LocalJsonValue?> propScriptFields = default;
+ LocalJsonValue?> propSearchAfter = default;
+ LocalJsonValue propSeqNoPrimaryTerm = default;
+ LocalJsonValue propSize = default;
+ LocalJsonValue propSlice = default;
+ LocalJsonValue?> propSort = default;
+ LocalJsonValue propSource = default;
+ LocalJsonValue?> propStats = default;
+ LocalJsonValue propStoredFields = default;
+ LocalJsonValue propSuggest = default;
+ LocalJsonValue propTerminateAfter = default;
+ LocalJsonValue propTimeout = default;
+ LocalJsonValue propTrackScores = default;
+ LocalJsonValue propTrackTotalHits = default;
+ LocalJsonValue propVersion = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAggregations.TryReadProperty(ref reader, options, PropAggregations, static IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)) || propAggregations.TryReadProperty(ref reader, options, PropAggregations1, static IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
{
- 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 (propCollapse.TryReadProperty(ref reader, options, PropCollapse, null))
+ {
+ continue;
+ }
- if (value.Collapse is not null)
- {
- writer.WritePropertyName("collapse");
- JsonSerializer.Serialize(writer, value.Collapse, options);
- }
+ if (propDocvalueFields.TryReadProperty(ref reader, options, PropDocvalueFields, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.DocvalueFields is not null)
- {
- writer.WritePropertyName("docvalue_fields");
- JsonSerializer.Serialize(writer, value.DocvalueFields, options);
- }
+ if (propExplain.TryReadProperty(ref reader, options, PropExplain, null))
+ {
+ continue;
+ }
- if (value.Explain.HasValue)
- {
- writer.WritePropertyName("explain");
- writer.WriteBooleanValue(value.Explain.Value);
- }
+ if (propExt.TryReadProperty(ref reader, options, PropExt, static IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
- if (value.Ext is not null)
- {
- writer.WritePropertyName("ext");
- JsonSerializer.Serialize(writer, value.Ext, options);
- }
+ if (propFields.TryReadProperty(ref reader, options, PropFields, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.Fields is not null)
- {
- writer.WritePropertyName("fields");
- JsonSerializer.Serialize(writer, value.Fields, options);
- }
+ if (propFrom.TryReadProperty(ref reader, options, PropFrom, null))
+ {
+ continue;
+ }
- if (value.From.HasValue)
- {
- writer.WritePropertyName("from");
- writer.WriteNumberValue(value.From.Value);
- }
+ if (propHighlight.TryReadProperty(ref reader, options, PropHighlight, null))
+ {
+ continue;
+ }
- if (value.Highlight is not null)
- {
- writer.WritePropertyName("highlight");
- JsonSerializer.Serialize(writer, value.Highlight, options);
- }
+ if (propIndicesBoost.TryReadProperty(ref reader, options, PropIndicesBoost, static ICollection>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue>(o, static IDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)))
+ {
+ continue;
+ }
- if (value.IndicesBoost is not null)
- {
- writer.WritePropertyName("indices_boost");
- JsonSerializer.Serialize(writer, value.IndicesBoost, options);
- }
+ if (propKnn.TryReadProperty(ref reader, options, PropKnn, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.Knn is not null)
- {
- writer.WritePropertyName("knn");
- JsonSerializer.Serialize(writer, value.Knn, options);
- }
+ if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null))
+ {
+ continue;
+ }
- if (value.MinScore.HasValue)
- {
- writer.WritePropertyName("min_score");
- writer.WriteNumberValue(value.MinScore.Value);
- }
+ if (propPit.TryReadProperty(ref reader, options, PropPit, null))
+ {
+ continue;
+ }
- if (value.Pit is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, value.Pit, options);
- }
+ if (propPostFilter.TryReadProperty(ref reader, options, PropPostFilter, null))
+ {
+ continue;
+ }
- if (value.PostFilter is not null)
- {
- writer.WritePropertyName("post_filter");
- JsonSerializer.Serialize(writer, value.PostFilter, options);
- }
+ if (propProfile.TryReadProperty(ref reader, options, PropProfile, null))
+ {
+ continue;
+ }
- if (value.Profile.HasValue)
- {
- writer.WritePropertyName("profile");
- writer.WriteBooleanValue(value.Profile.Value);
- }
+ if (propQuery.TryReadProperty(ref reader, options, PropQuery, null))
+ {
+ continue;
+ }
- if (value.Query is not null)
- {
- writer.WritePropertyName("query");
- JsonSerializer.Serialize(writer, value.Query, options);
- }
+ if (propRescore.TryReadProperty(ref reader, options, PropRescore, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.Rescore is not null)
- {
- writer.WritePropertyName("rescore");
- JsonSerializer.Serialize(writer, value.Rescore, options);
- }
+ if (propRuntimeMappings.TryReadProperty(ref reader, options, PropRuntimeMappings, static IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
- if (value.RuntimeMappings is not null)
- {
- writer.WritePropertyName("runtime_mappings");
- JsonSerializer.Serialize(writer, value.RuntimeMappings, options);
- }
+ if (propScriptFields.TryReadProperty(ref reader, options, PropScriptFields, static IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
- if (value.ScriptFields is not null)
- {
- writer.WritePropertyName("script_fields");
- JsonSerializer.Serialize(writer, value.ScriptFields, options);
- }
+ if (propSearchAfter.TryReadProperty(ref reader, options, PropSearchAfter, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.SearchAfter is not null)
- {
- writer.WritePropertyName("search_after");
- JsonSerializer.Serialize(writer, value.SearchAfter, options);
- }
+ if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null))
+ {
+ continue;
+ }
- if (value.SeqNoPrimaryTerm.HasValue)
- {
- writer.WritePropertyName("seq_no_primary_term");
- writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value);
- }
+ if (propSize.TryReadProperty(ref reader, options, PropSize, null))
+ {
+ continue;
+ }
- if (value.Size.HasValue)
- {
- writer.WritePropertyName("size");
- writer.WriteNumberValue(value.Size.Value);
- }
+ if (propSlice.TryReadProperty(ref reader, options, PropSlice, null))
+ {
+ continue;
+ }
- if (value.Slice is not null)
- {
- writer.WritePropertyName("slice");
- JsonSerializer.Serialize(writer, value.Slice, options);
- }
+ if (propSort.TryReadProperty(ref reader, options, PropSort, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.Sort is not null)
- {
- writer.WritePropertyName("sort");
- JsonSerializer.Serialize(writer, value.Sort, options);
- }
+ if (propSource.TryReadProperty(ref reader, options, PropSource, null))
+ {
+ continue;
+ }
- if (value.Source is not null)
- {
- writer.WritePropertyName("_source");
- JsonSerializer.Serialize(writer, value.Source, options);
- }
+ if (propStats.TryReadProperty(ref reader, options, PropStats, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
- if (value.Stats is not null)
- {
- writer.WritePropertyName("stats");
- JsonSerializer.Serialize(writer, value.Stats, options);
- }
+ if (propStoredFields.TryReadProperty(ref reader, options, PropStoredFields, static Elastic.Clients.Elasticsearch.Fields? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(SingleOrManyFieldsMarker))))
+ {
+ continue;
+ }
- if (value.StoredFields is not null)
- {
- writer.WritePropertyName("stored_fields");
- new FieldsConverter().Write(writer, value.StoredFields, options);
- }
+ if (propSuggest.TryReadProperty(ref reader, options, PropSuggest, null))
+ {
+ continue;
+ }
- if (value.Suggest is not null)
- {
- writer.WritePropertyName("suggest");
- JsonSerializer.Serialize(writer, value.Suggest, options);
- }
+ if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null))
+ {
+ continue;
+ }
- if (value.TerminateAfter.HasValue)
- {
- writer.WritePropertyName("terminate_after");
- writer.WriteNumberValue(value.TerminateAfter.Value);
- }
+ if (propTimeout.TryReadProperty(ref reader, options, PropTimeout, null))
+ {
+ continue;
+ }
- if (!string.IsNullOrEmpty(value.Timeout))
- {
- writer.WritePropertyName("timeout");
- writer.WriteStringValue(value.Timeout);
- }
+ if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null))
+ {
+ continue;
+ }
- if (value.TrackScores.HasValue)
- {
- writer.WritePropertyName("track_scores");
- writer.WriteBooleanValue(value.TrackScores.Value);
- }
+ if (propTrackTotalHits.TryReadProperty(ref reader, options, PropTrackTotalHits, null))
+ {
+ continue;
+ }
- if (value.TrackTotalHits is not null)
- {
- writer.WritePropertyName("track_total_hits");
- JsonSerializer.Serialize(writer, value.TrackTotalHits, options);
- }
+ if (propVersion.TryReadProperty(ref reader, options, PropVersion, null))
+ {
+ continue;
+ }
- if (value.Version.HasValue)
- {
- writer.WritePropertyName("version");
- writer.WriteBooleanValue(value.Version.Value);
- }
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropCollapse, value.Collapse, null, null);
+ writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropExplain, value.Explain, null, null);
+ writer.WriteProperty(options, PropExt, value.Ext, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropFrom, value.From, null, null);
+ writer.WriteProperty(options, PropHighlight, value.Highlight, null, null);
+ writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IDictionary v) => w.WriteDictionaryValue(o, v, null, null)));
+ writer.WriteProperty(options, PropKnn, value.Knn, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropMinScore, value.MinScore, null, null);
+ writer.WriteProperty(options, PropPit, value.Pit, null, null);
+ writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null);
+ writer.WriteProperty(options, PropProfile, value.Profile, null, null);
+ writer.WriteProperty(options, PropQuery, value.Query, null, null);
+ writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null);
+ writer.WriteProperty(options, PropSize, value.Size, null, null);
+ writer.WriteProperty(options, PropSlice, value.Slice, null, null);
+ writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropSource, value.Source, null, null);
+ writer.WriteProperty(options, PropStats, value.Stats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(SingleOrManyFieldsMarker)));
+ writer.WriteProperty(options, PropSuggest, value.Suggest, null, null);
+ writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null);
+ writer.WriteProperty(options, PropTimeout, value.Timeout, null, null);
+ writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null);
+ writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null);
+ writer.WriteProperty(options, PropVersion, value.Version, null, null);
writer.WriteEndObject();
}
}
@@ -657,6 +598,7 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
[JsonConverter(typeof(SubmitAsyncSearchRequestConverter))]
public sealed partial class SubmitAsyncSearchRequest : PlainRequest
{
+ [JsonConstructor]
public SubmitAsyncSearchRequest()
{
}
@@ -673,12 +615,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 +634,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 +641,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 +648,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 +656,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 +663,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 +670,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 +677,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 +684,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 +691,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 +698,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 +705,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 +712,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 +719,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 +726,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 +733,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 +740,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 +747,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 +754,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 +761,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 +768,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 +775,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 +782,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 +789,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 +796,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 +803,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 +810,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 +818,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 +828,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 +835,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 +842,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 +850,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 +859,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 +867,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 +874,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 +882,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 +890,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 +899,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 +908,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 +915,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 +924,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 +933,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 +943,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 +952,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// the indices stats API.
///
///
- [JsonInclude, JsonPropertyName("stats")]
public ICollection? Stats { get; set; }
///
@@ -1069,10 +962,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 +972,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 +981,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
/// Defaults to no timeout.
///
///
- [JsonInclude, JsonPropertyName("timeout")]
public string? Timeout { get; set; }
///
@@ -1100,7 +988,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 +998,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 +1005,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..abaa0c421a3 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
@@ -22,10 +22,158 @@
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);
+ LocalJsonValue propCompletionTime = default;
+ LocalJsonValue propCompletionTimeInMillis = default;
+ LocalJsonValue propExpirationTime = default;
+ LocalJsonValue propExpirationTimeInMillis = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIsPartial = default;
+ LocalJsonValue propIsRunning = default;
+ LocalJsonValue> propResponse = default;
+ LocalJsonValue propStartTime = default;
+ LocalJsonValue propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, null))
+ {
+ continue;
+ }
+
+ if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
+ {
+ continue;
+ }
+
+ if (propResponse.TryReadProperty(ref reader, options, PropResponse, null))
+ {
+ continue;
+ }
+
+ if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, null))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, null);
+ writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, null);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
+ writer.WriteProperty(options, PropResponse, value.Response, null, null);
+ writer.WriteProperty(options, PropStartTime, value.StartTime, null, null);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, null);
+ 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 +182,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 +190,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 +200,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 +208,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..530a690a28d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
@@ -123,6 +123,7 @@ public sealed partial class BulkRequestParameters : RequestParameters
///
public sealed partial class BulkRequest : PlainRequest
{
+ [JsonConstructor]
public BulkRequest()
{
}
@@ -139,6 +140,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..04bce92b8ab 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
@@ -22,16 +22,85 @@
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 PropItems = System.Text.Json.JsonEncodedText.Encode("items");
+ 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);
+ LocalJsonValue propErrors = default;
+ LocalJsonValue propIngestTook = default;
+ LocalJsonValue> propItems = default;
+ LocalJsonValue propTook = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propErrors.TryReadProperty(ref reader, options, PropErrors, null))
+ {
+ continue;
+ }
+
+ if (propIngestTook.TryReadProperty(ref reader, options, PropIngestTook, null))
+ {
+ continue;
+ }
+
+ if (propItems.TryReadProperty(ref reader, options, PropItems, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (propTook.TryReadProperty(ref reader, options, PropTook, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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
+,
+ Items = propItems.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, null, null);
+ writer.WriteProperty(options, PropIngestTook, value.IngestTook, null, null);
+ writer.WriteProperty(options, PropItems, value.Items, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropTook, value.Took, null, null);
+ 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 IReadOnlyCollection Items { get; init; }
public long Took { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
index 156d7b50847..710d8874650 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
@@ -44,6 +44,11 @@ public sealed partial class ClearScrollRequestParameters : RequestParameters
///
public sealed partial class ClearScrollRequest : PlainRequest
{
+ [JsonConstructor]
+ internal ClearScrollRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceClearScroll;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
index 29bfde63e45..fbd8eddac09 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
@@ -22,14 +22,63 @@
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);
+ LocalJsonValue propNumFreed = default;
+ LocalJsonValue propSucceeded = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propNumFreed.TryReadProperty(ref reader, options, PropNumFreed, null))
+ {
+ continue;
+ }
+
+ if (propSucceeded.TryReadProperty(ref reader, options, PropSucceeded, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropSucceeded, value.Succeeded, null, null);
+ 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/ClosePointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
index 4bc64124f7a..c6eefce27bf 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
@@ -47,6 +47,11 @@ public sealed partial class ClosePointInTimeRequestParameters : RequestParameter
///
public sealed partial class ClosePointInTimeRequest : PlainRequest
{
+ [JsonConstructor]
+ internal ClosePointInTimeRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceClosePointInTime;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
index 1fdf5b5b3ae..a92d50a5aaa 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
@@ -22,14 +22,63 @@
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);
+ LocalJsonValue propNumFreed = default;
+ LocalJsonValue propSucceeded = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propNumFreed.TryReadProperty(ref reader, options, PropNumFreed, null))
+ {
+ continue;
+ }
+
+ if (propSucceeded.TryReadProperty(ref reader, options, PropSucceeded, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropSucceeded, value.Succeeded, null, null);
+ 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/AllocationExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs
index 23e668b1bcd..89f9b64d515 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs
@@ -58,6 +58,11 @@ public sealed partial class AllocationExplainRequestParameters : RequestParamete
///
public sealed partial class AllocationExplainRequest : PlainRequest
{
+ [JsonConstructor]
+ internal AllocationExplainRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterAllocationExplain;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
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..221408803a8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs
@@ -22,60 +22,316 @@
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);
+ LocalJsonValue propAllocateExplanation = default;
+ LocalJsonValue propAllocationDelay = default;
+ LocalJsonValue propAllocationDelayInMillis = default;
+ LocalJsonValue propCanAllocate = default;
+ LocalJsonValue propCanMoveToOtherNode = default;
+ LocalJsonValue propCanRebalanceCluster = default;
+ LocalJsonValue?> propCanRebalanceClusterDecisions = default;
+ LocalJsonValue propCanRebalanceToOtherNode = default;
+ LocalJsonValue?> propCanRemainDecisions = default;
+ LocalJsonValue propCanRemainOnCurrentNode = default;
+ LocalJsonValue propClusterInfo = default;
+ LocalJsonValue propConfiguredDelay = default;
+ LocalJsonValue propConfiguredDelayInMillis = default;
+ LocalJsonValue propCurrentNode = default;
+ LocalJsonValue propCurrentState = default;
+ LocalJsonValue propIndex = default;
+ LocalJsonValue propMoveExplanation = default;
+ LocalJsonValue?> propNodeAllocationDecisions = default;
+ LocalJsonValue propNote = default;
+ LocalJsonValue propPrimary = default;
+ LocalJsonValue propRebalanceExplanation = default;
+ LocalJsonValue propRemainingDelay = default;
+ LocalJsonValue propRemainingDelayInMillis = default;
+ LocalJsonValue propShard = default;
+ LocalJsonValue propUnassignedInfo = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAllocateExplanation.TryReadProperty(ref reader, options, PropAllocateExplanation, null))
+ {
+ continue;
+ }
+
+ if (propAllocationDelay.TryReadProperty(ref reader, options, PropAllocationDelay, null))
+ {
+ continue;
+ }
+
+ if (propAllocationDelayInMillis.TryReadProperty(ref reader, options, PropAllocationDelayInMillis, null))
+ {
+ continue;
+ }
+
+ if (propCanAllocate.TryReadProperty(ref reader, options, PropCanAllocate, null))
+ {
+ continue;
+ }
+
+ if (propCanMoveToOtherNode.TryReadProperty(ref reader, options, PropCanMoveToOtherNode, null))
+ {
+ continue;
+ }
+
+ if (propCanRebalanceCluster.TryReadProperty(ref reader, options, PropCanRebalanceCluster, null))
+ {
+ continue;
+ }
+
+ if (propCanRebalanceClusterDecisions.TryReadProperty(ref reader, options, PropCanRebalanceClusterDecisions, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propCanRebalanceToOtherNode.TryReadProperty(ref reader, options, PropCanRebalanceToOtherNode, null))
+ {
+ continue;
+ }
+
+ if (propCanRemainDecisions.TryReadProperty(ref reader, options, PropCanRemainDecisions, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propCanRemainOnCurrentNode.TryReadProperty(ref reader, options, PropCanRemainOnCurrentNode, null))
+ {
+ continue;
+ }
+
+ if (propClusterInfo.TryReadProperty(ref reader, options, PropClusterInfo, null))
+ {
+ continue;
+ }
+
+ if (propConfiguredDelay.TryReadProperty(ref reader, options, PropConfiguredDelay, null))
+ {
+ continue;
+ }
+
+ if (propConfiguredDelayInMillis.TryReadProperty(ref reader, options, PropConfiguredDelayInMillis, null))
+ {
+ continue;
+ }
+
+ if (propCurrentNode.TryReadProperty(ref reader, options, PropCurrentNode, null))
+ {
+ continue;
+ }
+
+ if (propCurrentState.TryReadProperty(ref reader, options, PropCurrentState, null))
+ {
+ continue;
+ }
+
+ if (propIndex.TryReadProperty(ref reader, options, PropIndex, null))
+ {
+ continue;
+ }
+
+ if (propMoveExplanation.TryReadProperty(ref reader, options, PropMoveExplanation, null))
+ {
+ continue;
+ }
+
+ if (propNodeAllocationDecisions.TryReadProperty(ref reader, options, PropNodeAllocationDecisions, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propNote.TryReadProperty(ref reader, options, PropNote, null))
+ {
+ continue;
+ }
+
+ if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, null))
+ {
+ continue;
+ }
+
+ if (propRebalanceExplanation.TryReadProperty(ref reader, options, PropRebalanceExplanation, null))
+ {
+ continue;
+ }
+
+ if (propRemainingDelay.TryReadProperty(ref reader, options, PropRemainingDelay, null))
+ {
+ continue;
+ }
+
+ if (propRemainingDelayInMillis.TryReadProperty(ref reader, options, PropRemainingDelayInMillis, null))
+ {
+ continue;
+ }
+
+ if (propShard.TryReadProperty(ref reader, options, PropShard, null))
+ {
+ continue;
+ }
+
+ if (propUnassignedInfo.TryReadProperty(ref reader, options, PropUnassignedInfo, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropAllocationDelay, value.AllocationDelay, null, null);
+ writer.WriteProperty(options, PropAllocationDelayInMillis, value.AllocationDelayInMillis, null, null);
+ writer.WriteProperty(options, PropCanAllocate, value.CanAllocate, null, null);
+ writer.WriteProperty(options, PropCanMoveToOtherNode, value.CanMoveToOtherNode, null, null);
+ writer.WriteProperty(options, PropCanRebalanceCluster, value.CanRebalanceCluster, null, null);
+ writer.WriteProperty(options, PropCanRebalanceClusterDecisions, value.CanRebalanceClusterDecisions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropCanRebalanceToOtherNode, value.CanRebalanceToOtherNode, null, null);
+ writer.WriteProperty(options, PropCanRemainDecisions, value.CanRemainDecisions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropCanRemainOnCurrentNode, value.CanRemainOnCurrentNode, null, null);
+ writer.WriteProperty(options, PropClusterInfo, value.ClusterInfo, null, null);
+ writer.WriteProperty(options, PropConfiguredDelay, value.ConfiguredDelay, null, null);
+ writer.WriteProperty(options, PropConfiguredDelayInMillis, value.ConfiguredDelayInMillis, null, null);
+ writer.WriteProperty(options, PropCurrentNode, value.CurrentNode, null, null);
+ writer.WriteProperty(options, PropCurrentState, value.CurrentState, null, null);
+ writer.WriteProperty(options, PropIndex, value.Index, null, null);
+ writer.WriteProperty(options, PropMoveExplanation, value.MoveExplanation, null, null);
+ writer.WriteProperty(options, PropNodeAllocationDecisions, value.NodeAllocationDecisions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropNote, value.Note, null, null);
+ writer.WriteProperty(options, PropPrimary, value.Primary, null, null);
+ writer.WriteProperty(options, PropRebalanceExplanation, value.RebalanceExplanation, null, null);
+ writer.WriteProperty(options, PropRemainingDelay, value.RemainingDelay, null, null);
+ writer.WriteProperty(options, PropRemainingDelayInMillis, value.RemainingDelayInMillis, null, null);
+ writer.WriteProperty(options, PropShard, value.Shard, null, null);
+ writer.WriteProperty(options, PropUnassignedInfo, value.UnassignedInfo, null, null);
+ 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..37d1048cfba 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoRequest.g.cs
@@ -46,6 +46,11 @@ public ClusterInfoRequest(IReadOnlyCollection ApiUrlLookup.ClusterInfo;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -53,6 +58,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..80eee7c1ce0 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterInfoResponse.g.cs
@@ -22,20 +22,96 @@
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);
+ LocalJsonValue propClusterName = default;
+ LocalJsonValue propHttp = default;
+ LocalJsonValue propIngest = default;
+ LocalJsonValue propScript = default;
+ LocalJsonValue?> propThreadPool = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propClusterName.TryReadProperty(ref reader, options, PropClusterName, null))
+ {
+ continue;
+ }
+
+ if (propHttp.TryReadProperty(ref reader, options, PropHttp, null))
+ {
+ continue;
+ }
+
+ if (propIngest.TryReadProperty(ref reader, options, PropIngest, null))
+ {
+ continue;
+ }
+
+ if (propScript.TryReadProperty(ref reader, options, PropScript, null))
+ {
+ continue;
+ }
+
+ if (propThreadPool.TryReadProperty(ref reader, options, PropThreadPool, static IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropHttp, value.Http, null, null);
+ writer.WriteProperty(options, PropIngest, value.Ingest, null, null);
+ writer.WriteProperty(options, PropScript, value.Script, null, null);
+ writer.WriteProperty(options, PropThreadPool, value.ThreadPool, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ 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..87bf0803fe8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
@@ -57,6 +57,7 @@ public sealed partial class ClusterStatsRequestParameters : RequestParameters
///
public sealed partial class ClusterStatsRequest : PlainRequest
{
+ [JsonConstructor]
public ClusterStatsRequest()
{
}
@@ -73,6 +74,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..1476a8de543 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsResponse.g.cs
@@ -22,10 +22,111 @@
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);
+ LocalJsonValue propClusterName = default;
+ LocalJsonValue propClusterUuid = default;
+ LocalJsonValue propIndices = default;
+ LocalJsonValue propNodes = default;
+ LocalJsonValue propNodeStats = default;
+ LocalJsonValue propStatus = default;
+ LocalJsonValue propTimestamp = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propClusterName.TryReadProperty(ref reader, options, PropClusterName, null))
+ {
+ continue;
+ }
+
+ if (propClusterUuid.TryReadProperty(ref reader, options, PropClusterUuid, null))
+ {
+ continue;
+ }
+
+ if (propIndices.TryReadProperty(ref reader, options, PropIndices, null))
+ {
+ continue;
+ }
+
+ if (propNodes.TryReadProperty(ref reader, options, PropNodes, null))
+ {
+ continue;
+ }
+
+ if (propNodeStats.TryReadProperty(ref reader, options, PropNodeStats, null))
+ {
+ continue;
+ }
+
+ if (propStatus.TryReadProperty(ref reader, options, PropStatus, null))
+ {
+ continue;
+ }
+
+ if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropClusterUuid, value.ClusterUuid, null, null);
+ writer.WriteProperty(options, PropIndices, value.Indices, null, null);
+ writer.WriteProperty(options, PropNodes, value.Nodes, null, null);
+ writer.WriteProperty(options, PropNodeStats, value.NodeStats, null, null);
+ writer.WriteProperty(options, PropStatus, value.Status, null, null);
+ writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ClusterStatsResponseConverter))]
public sealed partial class ClusterStatsResponse : ElasticsearchResponse
{
///
@@ -33,7 +134,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 +141,6 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
/// Unique identifier for the cluster.
///
///
- [JsonInclude, JsonPropertyName("cluster_uuid")]
public string ClusterUuid { get; init; }
///
@@ -49,7 +148,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 +155,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 +162,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 +169,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 +176,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..3cb2ec82b08 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
@@ -62,6 +62,11 @@ public DeleteComponentTemplateRequest(Elastic.Clients.Elasticsearch.Names name)
{
}
+ [JsonConstructor]
+ internal DeleteComponentTemplateRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterDeleteComponentTemplate;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -70,6 +75,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..c9fbb212cc6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteComponentTemplateResponseConverter))]
public sealed partial class DeleteComponentTemplateResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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/DeleteVotingConfigExclusionsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteVotingConfigExclusionsRequest.g.cs
index b666916f7c7..0a964010043 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteVotingConfigExclusionsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteVotingConfigExclusionsRequest.g.cs
@@ -53,6 +53,11 @@ public sealed partial class DeleteVotingConfigExclusionsRequestParameters : Requ
///
public sealed partial class DeleteVotingConfigExclusionsRequest : PlainRequest
{
+ [JsonConstructor]
+ internal DeleteVotingConfigExclusionsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterDeleteVotingConfigExclusions;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
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..b6632950430 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs
@@ -62,6 +62,11 @@ public ExistsComponentTemplateRequest(Elastic.Clients.Elasticsearch.Names name)
{
}
+ [JsonConstructor]
+ internal ExistsComponentTemplateRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterExistsComponentTemplate;
protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD;
@@ -70,6 +75,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/GetClusterSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs
index c4fc5d41325..4db023e557c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs
@@ -71,6 +71,11 @@ public sealed partial class GetClusterSettingsRequestParameters : RequestParamet
///
public sealed partial class GetClusterSettingsRequest : PlainRequest
{
+ [JsonConstructor]
+ internal GetClusterSettingsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterGetSettings;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
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..1af5497ed1d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs
@@ -22,16 +22,74 @@
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);
+ LocalJsonValue?> propDefaults = default;
+ LocalJsonValue> propPersistent = default;
+ LocalJsonValue> propTransient = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propDefaults.TryReadProperty(ref reader, options, PropDefaults, static IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
+
+ if (propPersistent.TryReadProperty(ref reader, options, PropPersistent, static IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))
+ {
+ continue;
+ }
+
+ if (propTransient.TryReadProperty(ref reader, options, PropTransient, static IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropPersistent, value.Persistent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropTransient, value.Transient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null));
+ 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..27ad57a89e6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
@@ -71,6 +71,7 @@ public sealed partial class GetComponentTemplateRequestParameters : RequestParam
///
public sealed partial class GetComponentTemplateRequest : PlainRequest
{
+ [JsonConstructor]
public GetComponentTemplateRequest()
{
}
@@ -87,6 +88,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..d496809982b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propComponentTemplates = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propComponentTemplates.TryReadProperty(ref reader, options, PropComponentTemplates, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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..d4a65f7dd06 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs
@@ -128,6 +128,7 @@ public sealed partial class HealthRequestParameters : RequestParameters
///
public sealed partial class HealthRequest : PlainRequest
{
+ [JsonConstructor]
public HealthRequest()
{
}
@@ -144,6 +145,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..e4f9ee14b49 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthResponse.g.cs
@@ -22,10 +22,221 @@
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);
+ LocalJsonValue propActivePrimaryShards = default;
+ LocalJsonValue propActiveShards = default;
+ LocalJsonValue propActiveShardsPercentAsNumber = default;
+ LocalJsonValue propClusterName = default;
+ LocalJsonValue propDelayedUnassignedShards = default;
+ LocalJsonValue?> propIndices = default;
+ LocalJsonValue propInitializingShards = default;
+ LocalJsonValue propNumberOfDataNodes = default;
+ LocalJsonValue propNumberOfInFlightFetch = default;
+ LocalJsonValue propNumberOfNodes = default;
+ LocalJsonValue propNumberOfPendingTasks = default;
+ LocalJsonValue propRelocatingShards = default;
+ LocalJsonValue propStatus = default;
+ LocalJsonValue propTaskMaxWaitingInQueue = default;
+ LocalJsonValue propTaskMaxWaitingInQueueMillis = default;
+ LocalJsonValue propTimedOut = default;
+ LocalJsonValue propUnassignedPrimaryShards = default;
+ LocalJsonValue propUnassignedShards = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propActivePrimaryShards.TryReadProperty(ref reader, options, PropActivePrimaryShards, null))
+ {
+ continue;
+ }
+
+ if (propActiveShards.TryReadProperty(ref reader, options, PropActiveShards, null))
+ {
+ continue;
+ }
+
+ if (propActiveShardsPercentAsNumber.TryReadProperty(ref reader, options, PropActiveShardsPercentAsNumber, null))
+ {
+ continue;
+ }
+
+ if (propClusterName.TryReadProperty(ref reader, options, PropClusterName, null))
+ {
+ continue;
+ }
+
+ if (propDelayedUnassignedShards.TryReadProperty(ref reader, options, PropDelayedUnassignedShards, null))
+ {
+ continue;
+ }
+
+ if (propIndices.TryReadProperty(ref reader, options, PropIndices, static IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
+
+ if (propInitializingShards.TryReadProperty(ref reader, options, PropInitializingShards, null))
+ {
+ continue;
+ }
+
+ if (propNumberOfDataNodes.TryReadProperty(ref reader, options, PropNumberOfDataNodes, null))
+ {
+ continue;
+ }
+
+ if (propNumberOfInFlightFetch.TryReadProperty(ref reader, options, PropNumberOfInFlightFetch, null))
+ {
+ continue;
+ }
+
+ if (propNumberOfNodes.TryReadProperty(ref reader, options, PropNumberOfNodes, null))
+ {
+ continue;
+ }
+
+ if (propNumberOfPendingTasks.TryReadProperty(ref reader, options, PropNumberOfPendingTasks, null))
+ {
+ continue;
+ }
+
+ if (propRelocatingShards.TryReadProperty(ref reader, options, PropRelocatingShards, null))
+ {
+ continue;
+ }
+
+ if (propStatus.TryReadProperty(ref reader, options, PropStatus, null))
+ {
+ continue;
+ }
+
+ if (propTaskMaxWaitingInQueue.TryReadProperty(ref reader, options, PropTaskMaxWaitingInQueue, null))
+ {
+ continue;
+ }
+
+ if (propTaskMaxWaitingInQueueMillis.TryReadProperty(ref reader, options, PropTaskMaxWaitingInQueueMillis, null))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null))
+ {
+ continue;
+ }
+
+ if (propUnassignedPrimaryShards.TryReadProperty(ref reader, options, PropUnassignedPrimaryShards, null))
+ {
+ continue;
+ }
+
+ if (propUnassignedShards.TryReadProperty(ref reader, options, PropUnassignedShards, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropActiveShards, value.ActiveShards, null, null);
+ writer.WriteProperty(options, PropActiveShardsPercentAsNumber, value.ActiveShardsPercentAsNumber, null, null);
+ writer.WriteProperty(options, PropClusterName, value.ClusterName, null, null);
+ writer.WriteProperty(options, PropDelayedUnassignedShards, value.DelayedUnassignedShards, null, null);
+ writer.WriteProperty(options, PropIndices, value.Indices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropInitializingShards, value.InitializingShards, null, null);
+ writer.WriteProperty(options, PropNumberOfDataNodes, value.NumberOfDataNodes, null, null);
+ writer.WriteProperty(options, PropNumberOfInFlightFetch, value.NumberOfInFlightFetch, null, null);
+ writer.WriteProperty(options, PropNumberOfNodes, value.NumberOfNodes, null, null);
+ writer.WriteProperty(options, PropNumberOfPendingTasks, value.NumberOfPendingTasks, null, null);
+ writer.WriteProperty(options, PropRelocatingShards, value.RelocatingShards, null, null);
+ writer.WriteProperty(options, PropStatus, value.Status, null, null);
+ writer.WriteProperty(options, PropTaskMaxWaitingInQueue, value.TaskMaxWaitingInQueue, null, null);
+ writer.WriteProperty(options, PropTaskMaxWaitingInQueueMillis, value.TaskMaxWaitingInQueueMillis, null, null);
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null);
+ writer.WriteProperty(options, PropUnassignedPrimaryShards, value.UnassignedPrimaryShards, null, null);
+ writer.WriteProperty(options, PropUnassignedShards, value.UnassignedShards, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(HealthResponseConverter))]
public sealed partial class HealthResponse : ElasticsearchResponse
{
///
@@ -33,7 +244,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 +251,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 +258,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 +265,6 @@ public sealed partial class HealthResponse : ElasticsearchResponse
/// The name of the cluster.
///
///
- [JsonInclude, JsonPropertyName("cluster_name")]
public string ClusterName { get; init; }
///
@@ -65,10 +272,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 +280,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 +287,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 +294,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 +301,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 +308,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 +315,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 +323,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 +330,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 +337,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 +344,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 +351,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/PendingTasksRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs
index ed40db21041..3b0e83bcf33 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs
@@ -62,6 +62,11 @@ public sealed partial class PendingTasksRequestParameters : RequestParameters
///
public sealed partial class PendingTasksRequest : PlainRequest
{
+ [JsonConstructor]
+ internal PendingTasksRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPendingTasks;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
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..6ae324d6975 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propTasks = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propTasks.TryReadProperty(ref reader, options, PropTasks, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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/PostVotingConfigExclusionsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PostVotingConfigExclusionsRequest.g.cs
index 75da7c39dae..905a69e9c60 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PostVotingConfigExclusionsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PostVotingConfigExclusionsRequest.g.cs
@@ -86,6 +86,11 @@ public sealed partial class PostVotingConfigExclusionsRequestParameters : Reques
///
public sealed partial class PostVotingConfigExclusionsRequest : PlainRequest
{
+ [JsonConstructor]
+ internal PostVotingConfigExclusionsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPostVotingConfigExclusions;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
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..27afa57039d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
@@ -78,6 +78,11 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba
{
}
+ [JsonConstructor]
+ internal PutComponentTemplateRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPutComponentTemplate;
protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
@@ -86,6 +91,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..623a80de8f5 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PutComponentTemplateResponseConverter))]
public sealed partial class PutComponentTemplateResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..c2b6ae72941 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
@@ -149,6 +149,7 @@ public sealed partial class CountRequestParameters : RequestParameters
///
public partial class CountRequest : PlainRequest
{
+ [JsonConstructor]
public CountRequest()
{
}
@@ -165,6 +166,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..53c58a2d501 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
@@ -22,14 +22,63 @@
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);
+ LocalJsonValue propCount = default;
+ LocalJsonValue propShards = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCount.TryReadProperty(ref reader, options, PropCount, null))
+ {
+ continue;
+ }
+
+ if (propShards.TryReadProperty(ref reader, options, PropShards, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropShards, value.Shards, null, null);
+ 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..59e6ff4cd61 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
@@ -87,6 +87,36 @@ public sealed partial class CreateRequestParameters : RequestParameters
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
}
+internal sealed partial class CreateRequestConverter : System.Text.Json.Serialization.JsonConverter>
+{
+ public override CreateRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ return new CreateRequest { Document = reader.ReadValue(options, static TDocument (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(SourceMarker))!) };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, CreateRequest value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteValue(options, value.Document, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument v) => w.WriteValueEx(o, v, typeof(SourceMarker)));
+ }
+}
+
+internal sealed partial class CreateRequestConverterFactory : System.Text.Json.Serialization.JsonConverterFactory
+{
+ public override bool CanConvert(System.Type typeToConvert)
+ {
+ return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(CreateRequest<>);
+ }
+
+ 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(CreateRequestConverter<>).MakeGenericType(args[0]), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public, binder: null, args: null, culture: null)!;
+#pragma warning restore IL3050
+ return converter;
+ }
+}
+
///
///
/// Index a document.
@@ -94,12 +124,18 @@ 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
+[JsonConverter(typeof(CreateRequestConverterFactory))]
+public sealed partial class CreateRequest : PlainRequest
{
public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id))
{
}
+ [JsonConstructor]
+ internal CreateRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceCreate;
protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
@@ -108,6 +144,22 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
internal override string OperationName => "create";
+ ///
+ ///
+ /// Unique identifier for the document.
+ ///
+ ///
+ 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.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// ID of the pipeline to use to preprocess incoming documents.
@@ -115,7 +167,6 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// If a final pipeline is configured it will always run, regardless of the value of this parameter.
///
///
- [JsonIgnore]
public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); }
///
@@ -124,7 +175,6 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// Valid values: true, false, wait_for.
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
@@ -132,7 +182,6 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// Custom value used to route operations to a specific shard.
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
@@ -140,7 +189,6 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
///
@@ -149,7 +197,6 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// The specified version must match the current version of the document for the request to succeed.
///
///
- [JsonIgnore]
public long? Version { get => Q("version"); set => Q("version", value); }
///
@@ -157,7 +204,6 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// Specific version type: external, external_gte.
///
///
- [JsonIgnore]
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
///
@@ -166,15 +212,8 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
/// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
///
///
- [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)
- {
- settings.SourceSerializer.Serialize(Document, writer);
- }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
index edeaeb613d2..90a036fea2c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
@@ -22,26 +22,129 @@
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);
+ LocalJsonValue propForcedRefresh = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIndex = default;
+ LocalJsonValue propPrimaryTerm = default;
+ LocalJsonValue propResult = default;
+ LocalJsonValue propSeqNo = default;
+ LocalJsonValue propShards = default;
+ LocalJsonValue propVersion = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIndex.TryReadProperty(ref reader, options, PropIndex, null))
+ {
+ continue;
+ }
+
+ if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null))
+ {
+ continue;
+ }
+
+ if (propResult.TryReadProperty(ref reader, options, PropResult, null))
+ {
+ continue;
+ }
+
+ if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null))
+ {
+ continue;
+ }
+
+ if (propShards.TryReadProperty(ref reader, options, PropShards, null))
+ {
+ continue;
+ }
+
+ if (propVersion.TryReadProperty(ref reader, options, PropVersion, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIndex, value.Index, null, null);
+ writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null);
+ writer.WriteProperty(options, PropResult, value.Result, null, null);
+ writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null);
+ writer.WriteProperty(options, PropShards, value.Shards, null, null);
+ writer.WriteProperty(options, PropVersion, value.Version, null, null);
+ 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/CcrStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsRequest.g.cs
index 0c05bca66b6..9af3c6c66ec 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsRequest.g.cs
@@ -42,6 +42,11 @@ public sealed partial class CcrStatsRequestParameters : RequestParameters
///
public sealed partial class CcrStatsRequest : PlainRequest
{
+ [JsonConstructor]
+ internal CcrStatsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationStats;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
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..01b54b9f8e1 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/CcrStatsResponse.g.cs
@@ -22,14 +22,63 @@
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);
+ LocalJsonValue propAutoFollowStats = default;
+ LocalJsonValue propFollowStats = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAutoFollowStats.TryReadProperty(ref reader, options, PropAutoFollowStats, null))
+ {
+ continue;
+ }
+
+ if (propFollowStats.TryReadProperty(ref reader, options, PropFollowStats, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropFollowStats, value.FollowStats, null, null);
+ 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..d4f77ff30df 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternRequest.g.cs
@@ -46,6 +46,11 @@ public DeleteAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) :
{
}
+ [JsonConstructor]
+ internal DeleteAutoFollowPatternRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationDeleteAutoFollowPattern;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -53,6 +58,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..a16fdf4ffbe 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/DeleteAutoFollowPatternResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteAutoFollowPatternResponseConverter))]
public sealed partial class DeleteAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..832a37d08c9 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoRequest.g.cs
@@ -47,6 +47,11 @@ public FollowInfoRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
{
}
+ [JsonConstructor]
+ internal FollowInfoRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationFollowInfo;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -54,6 +59,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..22ccb83c1ca 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowInfoResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propFollowerIndices = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propFollowerIndices.TryReadProperty(ref reader, options, PropFollowerIndices, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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..a033e08492f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
@@ -56,6 +56,11 @@ public FollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r =>
{
}
+ [JsonConstructor]
+ internal FollowRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationFollow;
protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
@@ -64,6 +69,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..fa475174b13 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowResponse.g.cs
@@ -22,16 +22,74 @@
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);
+ LocalJsonValue propFollowIndexCreated = default;
+ LocalJsonValue propFollowIndexShardsAcked = default;
+ LocalJsonValue propIndexFollowingStarted = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propFollowIndexCreated.TryReadProperty(ref reader, options, PropFollowIndexCreated, null))
+ {
+ continue;
+ }
+
+ if (propFollowIndexShardsAcked.TryReadProperty(ref reader, options, PropFollowIndexShardsAcked, null))
+ {
+ continue;
+ }
+
+ if (propIndexFollowingStarted.TryReadProperty(ref reader, options, PropIndexFollowingStarted, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropFollowIndexShardsAcked, value.FollowIndexShardsAcked, null, null);
+ writer.WriteProperty(options, PropIndexFollowingStarted, value.IndexFollowingStarted, null, null);
+ 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..8fc86f9c184 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsRequest.g.cs
@@ -47,6 +47,11 @@ public FollowStatsRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(
{
}
+ [JsonConstructor]
+ internal FollowStatsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationFollowStats;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -54,6 +59,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..139d11e892a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowStatsResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propIndices = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propIndices.TryReadProperty(ref reader, options, PropIndices, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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..d1e9e0e3fa5 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerRequest.g.cs
@@ -58,6 +58,11 @@ public ForgetFollowerRequest(Elastic.Clients.Elasticsearch.IndexName index) : ba
{
}
+ [JsonConstructor]
+ internal ForgetFollowerRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationForgetFollower;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -66,6 +71,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..eaa000ee433 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ForgetFollowerResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue propShards = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propShards.TryReadProperty(ref reader, options, PropShards, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ 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..0123e02e850 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternRequest.g.cs
@@ -42,6 +42,7 @@ public sealed partial class GetAutoFollowPatternRequestParameters : RequestParam
///
public sealed partial class GetAutoFollowPatternRequest : PlainRequest
{
+ [JsonConstructor]
public GetAutoFollowPatternRequest()
{
}
@@ -57,6 +58,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..0f4f6452515 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/GetAutoFollowPatternResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propPatterns = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propPatterns.TryReadProperty(ref reader, options, PropPatterns, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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..259f4ea67c8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternRequest.g.cs
@@ -53,6 +53,11 @@ public PauseAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) :
{
}
+ [JsonConstructor]
+ internal PauseAutoFollowPatternRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationPauseAutoFollowPattern;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -60,6 +65,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..673d8a8c0da 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseAutoFollowPatternResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PauseAutoFollowPatternResponseConverter))]
public sealed partial class PauseAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..f3b0d933836 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowRequest.g.cs
@@ -49,6 +49,11 @@ public PauseFollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(
{
}
+ [JsonConstructor]
+ internal PauseFollowRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationPauseFollow;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -56,6 +61,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..d673bc340ec 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PauseFollowResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PauseFollowResponseConverter))]
public sealed partial class PauseFollowResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..06a8a0b0d83 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs
@@ -52,6 +52,11 @@ public PutAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) : ba
{
}
+ [JsonConstructor]
+ internal PutAutoFollowPatternRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationPutAutoFollowPattern;
protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
@@ -60,6 +65,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..cbb49eb8884 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PutAutoFollowPatternResponseConverter))]
public sealed partial class PutAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..8f82bd208f3 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternRequest.g.cs
@@ -48,6 +48,11 @@ public ResumeAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) :
{
}
+ [JsonConstructor]
+ internal ResumeAutoFollowPatternRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationResumeAutoFollowPattern;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -55,6 +60,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..cc410389e25 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeAutoFollowPatternResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ResumeAutoFollowPatternResponseConverter))]
public sealed partial class ResumeAutoFollowPatternResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..8a5ae6728dd 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs
@@ -49,6 +49,11 @@ public ResumeFollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base
{
}
+ [JsonConstructor]
+ internal ResumeFollowRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationResumeFollow;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -57,6 +62,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..abe16dfb51e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(ResumeFollowResponseConverter))]
public sealed partial class ResumeFollowResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..90c6496eb3f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowRequest.g.cs
@@ -51,6 +51,11 @@ public UnfollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r =
{
}
+ [JsonConstructor]
+ internal UnfollowRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.CrossClusterReplicationUnfollow;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -58,6 +63,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..0d365102d42 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/UnfollowResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(UnfollowResponseConverter))]
public sealed partial class UnfollowResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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/ListDanglingIndicesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesRequest.g.cs
index 651b65cef03..64c211f5b3f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesRequest.g.cs
@@ -48,6 +48,11 @@ public sealed partial class ListDanglingIndicesRequestParameters : RequestParame
///
public sealed partial class ListDanglingIndicesRequest : PlainRequest
{
+ [JsonConstructor]
+ internal ListDanglingIndicesRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.DanglingIndicesListDanglingIndices;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
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..db8042ef3ec 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propDanglingIndices = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propDanglingIndices.TryReadProperty(ref reader, options, PropDanglingIndices, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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..1ef92bdda10 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
@@ -256,6 +256,11 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
{
}
+ [JsonConstructor]
+ internal DeleteByQueryRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQuery;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -264,6 +269,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..e01db59e2ed 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
@@ -22,42 +22,217 @@
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);
+ LocalJsonValue propBatches = default;
+ LocalJsonValue propDeleted = default;
+ LocalJsonValue?> propFailures = default;
+ LocalJsonValue propNoops = default;
+ LocalJsonValue propRequestsPerSecond = default;
+ LocalJsonValue propRetries = default;
+ LocalJsonValue propSliceId = default;
+ LocalJsonValue propTask = default;
+ LocalJsonValue propThrottled = default;
+ LocalJsonValue propThrottledMillis = default;
+ LocalJsonValue propThrottledUntil = default;
+ LocalJsonValue propThrottledUntilMillis = default;
+ LocalJsonValue propTimedOut = default;
+ LocalJsonValue propTook = default;
+ LocalJsonValue propTotal = default;
+ LocalJsonValue propVersionConflicts = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propBatches.TryReadProperty(ref reader, options, PropBatches, null))
+ {
+ continue;
+ }
+
+ if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null))
+ {
+ continue;
+ }
+
+ if (propFailures.TryReadProperty(ref reader, options, PropFailures, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propNoops.TryReadProperty(ref reader, options, PropNoops, null))
+ {
+ continue;
+ }
+
+ if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null))
+ {
+ continue;
+ }
+
+ if (propRetries.TryReadProperty(ref reader, options, PropRetries, null))
+ {
+ continue;
+ }
+
+ if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, null))
+ {
+ continue;
+ }
+
+ if (propTask.TryReadProperty(ref reader, options, PropTask, null))
+ {
+ continue;
+ }
+
+ if (propThrottled.TryReadProperty(ref reader, options, PropThrottled, null))
+ {
+ continue;
+ }
+
+ if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, null))
+ {
+ continue;
+ }
+
+ if (propThrottledUntil.TryReadProperty(ref reader, options, PropThrottledUntil, null))
+ {
+ continue;
+ }
+
+ if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, null))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null))
+ {
+ continue;
+ }
+
+ if (propTook.TryReadProperty(ref reader, options, PropTook, null))
+ {
+ continue;
+ }
+
+ if (propTotal.TryReadProperty(ref reader, options, PropTotal, null))
+ {
+ continue;
+ }
+
+ if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropDeleted, value.Deleted, null, null);
+ writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropNoops, value.Noops, null, null);
+ writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null);
+ writer.WriteProperty(options, PropRetries, value.Retries, null, null);
+ writer.WriteProperty(options, PropSliceId, value.SliceId, null, null);
+ writer.WriteProperty(options, PropTask, value.Task, null, null);
+ writer.WriteProperty(options, PropThrottled, value.Throttled, null, null);
+ writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, null);
+ writer.WriteProperty(options, PropThrottledUntil, value.ThrottledUntil, null, null);
+ writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, null);
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null);
+ writer.WriteProperty(options, PropTook, value.Took, null, null);
+ writer.WriteProperty(options, PropTotal, value.Total, null, null);
+ writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null);
+ 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..62ba2e55d84 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
@@ -55,6 +55,11 @@ public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.TaskId taskI
{
}
+ [JsonConstructor]
+ internal DeleteByQueryRethrottleRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQueryRethrottle;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -63,6 +68,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..0f0c4c00142 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
@@ -22,13 +22,83 @@
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);
+ LocalJsonValue?> propNodeFailures = default;
+ LocalJsonValue?> propNodes = default;
+ LocalJsonValue?> propTaskFailures = default;
+ LocalJsonValue propTasks = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propNodeFailures.TryReadProperty(ref reader, options, PropNodeFailures, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propNodes.TryReadProperty(ref reader, options, PropNodes, static IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
+
+ if (propTaskFailures.TryReadProperty(ref reader, options, PropTaskFailures, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propTasks.TryReadProperty(ref reader, options, PropTasks, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropNodes, value.Nodes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropTaskFailures, value.TaskFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropTasks, value.Tasks, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteByQueryRethrottleResponseConverter))]
public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchResponse
{
- [JsonInclude, JsonPropertyName("node_failures")]
public IReadOnlyCollection? NodeFailures { get; init; }
///
@@ -36,9 +106,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 +115,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..c9e8514bc2d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
@@ -104,6 +104,11 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
{
}
+ [JsonConstructor]
+ internal DeleteRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDelete;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -112,6 +117,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..fb066c9c351 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
@@ -22,26 +22,129 @@
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);
+ LocalJsonValue propForcedRefresh = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIndex = default;
+ LocalJsonValue propPrimaryTerm = default;
+ LocalJsonValue propResult = default;
+ LocalJsonValue propSeqNo = default;
+ LocalJsonValue propShards = default;
+ LocalJsonValue propVersion = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIndex.TryReadProperty(ref reader, options, PropIndex, null))
+ {
+ continue;
+ }
+
+ if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null))
+ {
+ continue;
+ }
+
+ if (propResult.TryReadProperty(ref reader, options, PropResult, null))
+ {
+ continue;
+ }
+
+ if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null))
+ {
+ continue;
+ }
+
+ if (propShards.TryReadProperty(ref reader, options, PropShards, null))
+ {
+ continue;
+ }
+
+ if (propVersion.TryReadProperty(ref reader, options, PropVersion, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIndex, value.Index, null, null);
+ writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null);
+ writer.WriteProperty(options, PropResult, value.Result, null, null);
+ writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null);
+ writer.WriteProperty(options, PropShards, value.Shards, null, null);
+ writer.WriteProperty(options, PropVersion, value.Version, null, null);
+ 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..67d8d48efc2 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
@@ -61,6 +61,11 @@ public DeleteScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re
{
}
+ [JsonConstructor]
+ internal DeleteScriptRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteScript;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -69,6 +74,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..cf8fe95633a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeleteScriptResponseConverter))]
public sealed partial class DeleteScriptResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..2bcb065b744 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs
@@ -46,6 +46,11 @@ public DeletePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r =>
{
}
+ [JsonConstructor]
+ internal DeletePolicyRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichDeletePolicy;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -53,6 +58,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..4a10a689825 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DeletePolicyResponseConverter))]
public sealed partial class DeletePolicyResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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/EnrichStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs
index 83c270e3f05..f70036ec1ad 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs
@@ -42,6 +42,11 @@ public sealed partial class EnrichStatsRequestParameters : RequestParameters
///
public sealed partial class EnrichStatsRequest : PlainRequest
{
+ [JsonConstructor]
+ internal EnrichStatsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichStats;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
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..6cae3e0690d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsResponse.g.cs
@@ -22,10 +22,71 @@
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);
+ LocalJsonValue?> propCacheStats = default;
+ LocalJsonValue> propCoordinatorStats = default;
+ LocalJsonValue> propExecutingPolicies = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCacheStats.TryReadProperty(ref reader, options, PropCacheStats, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propCoordinatorStats.TryReadProperty(ref reader, options, PropCoordinatorStats, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (propExecutingPolicies.TryReadProperty(ref reader, options, PropExecutingPolicies, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropCoordinatorStats, value.CoordinatorStats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropExecutingPolicies, value.ExecutingPolicies, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(EnrichStatsResponseConverter))]
public sealed partial class EnrichStatsResponse : ElasticsearchResponse
{
///
@@ -33,7 +94,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 +101,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 +108,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..d0fc7805c21 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs
@@ -52,6 +52,11 @@ public ExecutePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r =>
{
}
+ [JsonConstructor]
+ internal ExecutePolicyRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichExecutePolicy;
protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
@@ -60,6 +65,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..ec5809f0d08 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs
@@ -22,14 +22,63 @@
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);
+ LocalJsonValue propStatus = default;
+ LocalJsonValue propTaskId = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propStatus.TryReadProperty(ref reader, options, PropStatus, null))
+ {
+ continue;
+ }
+
+ if (propTaskId.TryReadProperty(ref reader, options, PropTaskId, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropTaskId, value.TaskId, null, null);
+ 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..360dfea76b4 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs
@@ -42,6 +42,7 @@ public sealed partial class GetPolicyRequestParameters : RequestParameters
///
public sealed partial class GetPolicyRequest : PlainRequest
{
+ [JsonConstructor]
public GetPolicyRequest()
{
}
@@ -57,6 +58,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..cb9b5d11584 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyResponse.g.cs
@@ -22,12 +22,52 @@
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);
+ LocalJsonValue> propPolicies = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propPolicies.TryReadProperty(ref reader, options, PropPolicies, static IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null));
+ 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..39c1320f1af 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs
@@ -46,6 +46,11 @@ public PutPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.R
{
}
+ [JsonConstructor]
+ internal PutPolicyRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichPutPolicy;
protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
@@ -54,6 +59,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..830ed68b771 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PutPolicyResponseConverter))]
public sealed partial class PutPolicyResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..9f43e900450 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs
@@ -47,6 +47,11 @@ public EqlDeleteRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requi
{
}
+ [JsonConstructor]
+ internal EqlDeleteRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EqlDelete;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
@@ -54,6 +59,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..8a3a9f5eea9 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteResponse.g.cs
@@ -22,10 +22,51 @@
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);
+ LocalJsonValue propAcknowledged = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(EqlDeleteResponseConverter))]
public sealed partial class EqlDeleteResponse : ElasticsearchResponse
{
///
@@ -33,6 +74,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..9d0a5606dd5 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs
@@ -61,6 +61,11 @@ public EqlGetRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required
{
}
+ [JsonConstructor]
+ internal EqlGetRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGet;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -69,6 +74,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..5716e5f4b62 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
@@ -22,10 +22,128 @@
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);
+ LocalJsonValue> propHits = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIsPartial = default;
+ LocalJsonValue propIsRunning = default;
+ LocalJsonValue?> propShardFailures = default;
+ LocalJsonValue propTimedOut = default;
+ LocalJsonValue propTook = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propHits.TryReadProperty(ref reader, options, PropHits, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
+ {
+ continue;
+ }
+
+ if (propShardFailures.TryReadProperty(ref reader, options, PropShardFailures, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null))
+ {
+ continue;
+ }
+
+ if (propTook.TryReadProperty(ref reader, options, PropTook, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
+ writer.WriteProperty(options, PropShardFailures, value.ShardFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null);
+ writer.WriteProperty(options, PropTook, value.Took, null, null);
+ 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 +151,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 +158,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
/// Identifier for the search.
///
///
- [JsonInclude, JsonPropertyName("id")]
public string? Id { get; init; }
///
@@ -49,7 +165,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 +172,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 +179,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 +186,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 +193,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..f44ee9f5698 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
@@ -43,6 +43,204 @@ 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);
+ LocalJsonValue propAllowPartialSearchResults = default;
+ LocalJsonValue propAllowPartialSequenceResults = default;
+ LocalJsonValue propCaseSensitive = default;
+ LocalJsonValue propEventCategoryField = default;
+ LocalJsonValue propFetchSize = default;
+ LocalJsonValue?> propFields = default;
+ LocalJsonValue?> propFilter = default;
+ LocalJsonValue propKeepAlive = default;
+ LocalJsonValue propKeepOnCompletion = default;
+ LocalJsonValue propMaxSamplesPerKey = default;
+ LocalJsonValue propQuery = default;
+ LocalJsonValue propResultPosition = default;
+ LocalJsonValue?> propRuntimeMappings = default;
+ LocalJsonValue propSize = default;
+ LocalJsonValue propTiebreakerField = default;
+ LocalJsonValue propTimestampField = default;
+ LocalJsonValue propWaitForCompletionTimeout = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null))
+ {
+ continue;
+ }
+
+ if (propAllowPartialSequenceResults.TryReadProperty(ref reader, options, PropAllowPartialSequenceResults, null))
+ {
+ continue;
+ }
+
+ if (propCaseSensitive.TryReadProperty(ref reader, options, PropCaseSensitive, null))
+ {
+ continue;
+ }
+
+ if (propEventCategoryField.TryReadProperty(ref reader, options, PropEventCategoryField, null))
+ {
+ continue;
+ }
+
+ if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null))
+ {
+ continue;
+ }
+
+ if (propFields.TryReadProperty(ref reader, options, PropFields, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propFilter.TryReadProperty(ref reader, options, PropFilter, static ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propKeepAlive.TryReadProperty(ref reader, options, PropKeepAlive, null))
+ {
+ continue;
+ }
+
+ if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, null))
+ {
+ continue;
+ }
+
+ if (propMaxSamplesPerKey.TryReadProperty(ref reader, options, PropMaxSamplesPerKey, null))
+ {
+ continue;
+ }
+
+ if (propQuery.TryReadProperty(ref reader, options, PropQuery, null))
+ {
+ continue;
+ }
+
+ if (propResultPosition.TryReadProperty(ref reader, options, PropResultPosition, null))
+ {
+ continue;
+ }
+
+ if (propRuntimeMappings.TryReadProperty(ref reader, options, PropRuntimeMappings, static IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)))
+ {
+ continue;
+ }
+
+ if (propSize.TryReadProperty(ref reader, options, PropSize, null))
+ {
+ continue;
+ }
+
+ if (propTiebreakerField.TryReadProperty(ref reader, options, PropTiebreakerField, null))
+ {
+ continue;
+ }
+
+ if (propTimestampField.TryReadProperty(ref reader, options, PropTimestampField, null))
+ {
+ continue;
+ }
+
+ if (propWaitForCompletionTimeout.TryReadProperty(ref reader, options, PropWaitForCompletionTimeout, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ 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, null, null);
+ writer.WriteProperty(options, PropAllowPartialSequenceResults, value.AllowPartialSequenceResults, null, null);
+ writer.WriteProperty(options, PropCaseSensitive, value.CaseSensitive, null, null);
+ writer.WriteProperty(options, PropEventCategoryField, value.EventCategoryField, null, null);
+ writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null);
+ writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropFilter, value.Filter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null);
+ writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, null);
+ writer.WriteProperty(options, PropMaxSamplesPerKey, value.MaxSamplesPerKey, null, null);
+ writer.WriteProperty(options, PropQuery, value.Query, null, null);
+ writer.WriteProperty(options, PropResultPosition, value.ResultPosition, null, null);
+ writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IDictionary? v) => w.WriteDictionaryValue(o, v, null, null));
+ writer.WriteProperty(options, PropSize, value.Size, null, null);
+ writer.WriteProperty(options, PropTiebreakerField, value.TiebreakerField, null, null);
+ writer.WriteProperty(options, PropTimestampField, value.TimestampField, null, null);
+ writer.WriteProperty(options, PropWaitForCompletionTimeout, value.WaitForCompletionTimeout, null, null);
+ writer.WriteEndObject();
+ }
+}
+
///
///
/// Get EQL search results.
@@ -50,12 +248,18 @@ 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))
{
}
+ [JsonConstructor]
+ internal EqlSearchRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EqlSearch;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -64,9 +268,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 +282,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 +292,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 +299,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 +306,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 +313,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 +324,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 +331,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 +340,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 +347,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 +354,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..f9f1d04d40f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
@@ -22,10 +22,128 @@
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);
+ LocalJsonValue> propHits = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIsPartial = default;
+ LocalJsonValue propIsRunning = default;
+ LocalJsonValue?> propShardFailures = default;
+ LocalJsonValue propTimedOut = default;
+ LocalJsonValue propTook = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propHits.TryReadProperty(ref reader, options, PropHits, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
+ {
+ continue;
+ }
+
+ if (propShardFailures.TryReadProperty(ref reader, options, PropShardFailures, static IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)))
+ {
+ continue;
+ }
+
+ if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null))
+ {
+ continue;
+ }
+
+ if (propTook.TryReadProperty(ref reader, options, PropTook, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'.");
+ }
+
+ reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
+ return new EqlSearchResponse
+ {
+ 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, EqlSearchResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropHits, value.Hits, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
+ writer.WriteProperty(options, PropShardFailures, value.ShardFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null));
+ writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null);
+ writer.WriteProperty(options, PropTook, value.Took, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+internal sealed partial class EqlSearchResponseConverterFactory : System.Text.Json.Serialization.JsonConverterFactory
+{
+ public override bool CanConvert(System.Type typeToConvert)
+ {
+ return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(EqlSearchResponse<>);
+ }
+
+ 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(EqlSearchResponseConverter<>).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(EqlSearchResponseConverterFactory))]
public sealed partial class EqlSearchResponse : ElasticsearchResponse
{
///
@@ -33,7 +151,6 @@ public sealed partial class EqlSearchResponse : ElasticsearchResponse
/// Contains matching events and sequences. Also contains related metadata.
///
///
- [JsonInclude, JsonPropertyName("hits")]
public Elastic.Clients.Elasticsearch.Eql.EqlHits Hits { get; init; }
///
@@ -41,7 +158,6 @@ public sealed partial class EqlSearchResponse : ElasticsearchResponse
/// Identifier for the search.
///
///
- [JsonInclude, JsonPropertyName("id")]
public string? Id { get; init; }
///
@@ -49,7 +165,6 @@ public sealed partial class EqlSearchResponse : ElasticsearchResponse
/// If true, the response does not contain complete search results.
///
///
- [JsonInclude, JsonPropertyName("is_partial")]
public bool? IsPartial { get; init; }
///
@@ -57,7 +172,6 @@ public sealed partial class EqlSearchResponse : ElasticsearchResponse
/// If true, the search request is still executing.
///
///
- [JsonInclude, JsonPropertyName("is_running")]
public bool? IsRunning { get; init; }
///
@@ -65,7 +179,6 @@ public sealed partial class EqlSearchResponse : 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 +186,6 @@ public sealed partial class EqlSearchResponse : ElasticsearchResponse
/// If true, the request timed out before completion.
///
///
- [JsonInclude, JsonPropertyName("timed_out")]
public bool? TimedOut { get; init; }
///
@@ -81,6 +193,5 @@ public sealed partial class EqlSearchResponse : 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/GetEqlStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs
index faba4187dbb..c23fb1dc3e6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs
@@ -46,6 +46,11 @@ public GetEqlStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re
{
}
+ [JsonConstructor]
+ internal GetEqlStatusRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGetStatus;
protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
@@ -53,6 +58,14 @@ public GetEqlStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re
internal override bool SupportsBody => false;
internal override string OperationName => "eql.get_status";
+
+ ///
+ ///
+ /// Identifier for the search.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
}
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs
index a087b94c3a8..3f056c6e2cc 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs
@@ -22,10 +22,101 @@
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 GetEqlStatusResponseConverter : System.Text.Json.Serialization.JsonConverter
+{
+ private static readonly System.Text.Json.JsonEncodedText PropCompletionStatus = System.Text.Json.JsonEncodedText.Encode("completion_status");
+ 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 PropStartTimeInMillis = System.Text.Json.JsonEncodedText.Encode("start_time_in_millis");
+
+ public override GetEqlStatusResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonValue propCompletionStatus = default;
+ LocalJsonValue propExpirationTimeInMillis = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIsPartial = default;
+ LocalJsonValue propIsRunning = default;
+ LocalJsonValue propStartTimeInMillis = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null))
+ {
+ continue;
+ }
+
+ if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
+ {
+ continue;
+ }
+
+ if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
+ {
+ continue;
+ }
+
+ if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'.");
+ }
+
+ reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
+ return new GetEqlStatusResponse
+ {
+ CompletionStatus = propCompletionStatus.Value
+,
+ ExpirationTimeInMillis = propExpirationTimeInMillis.Value
+,
+ Id = propId.Value
+,
+ IsPartial = propIsPartial.Value
+,
+ IsRunning = propIsRunning.Value
+,
+ StartTimeInMillis = propStartTimeInMillis.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, GetEqlStatusResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null);
+ writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
+ writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
+ writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(GetEqlStatusResponseConverter))]
public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
{
///
@@ -33,7 +124,6 @@ public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
/// For a completed search shows the http status code of the completed search.
///
///
- [JsonInclude, JsonPropertyName("completion_status")]
public int? CompletionStatus { get; init; }
///
@@ -41,7 +131,6 @@ public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
/// Shows a timestamp when the eql search will be expired, in milliseconds since the Unix epoch. When this time is reached, the search and its results are deleted, even if the search is still ongoing.
///
///
- [JsonInclude, JsonPropertyName("expiration_time_in_millis")]
public long? ExpirationTimeInMillis { get; init; }
///
@@ -49,7 +138,6 @@ public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
/// Identifier for the search.
///
///
- [JsonInclude, JsonPropertyName("id")]
public string Id { get; init; }
///
@@ -57,7 +145,6 @@ public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
/// If true, the search request is still executing. If false, the search is completed.
///
///
- [JsonInclude, JsonPropertyName("is_partial")]
public bool IsPartial { get; init; }
///
@@ -65,7 +152,6 @@ public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
/// If true, the response does not contain complete search results. This could be because either the search is still running (is_running status is false), or because it is already completed (is_running status is true) and results are partial due to failures or timeouts.
///
///
- [JsonInclude, JsonPropertyName("is_running")]
public bool IsRunning { get; init; }
///
@@ -73,6 +159,5 @@ public sealed partial class GetEqlStatusResponse : ElasticsearchResponse
/// For a running search shows a timestamp when the eql search started, in milliseconds since the Unix epoch.
///
///
- [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/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs
index 1947cab2686..c74d80b4ce4 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs
@@ -63,6 +63,11 @@ public sealed partial class EsqlQueryRequestParameters : RequestParameters
///
public sealed partial class EsqlQueryRequest : PlainRequest
{
+ [JsonConstructor]
+ internal EsqlQueryRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs
index a69f181062f..96a7446c2f1 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs
@@ -119,6 +119,11 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
{
}
+ [JsonConstructor]
+ internal ExistsRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExists;
protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD;
@@ -127,6 +132,23 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
internal override string OperationName => "exists";
+ ///
+ ///
+ /// Identifier of the document.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
+ ///
+ ///
+ /// Comma-separated list of data streams, indices, and aliases.
+ /// Supports wildcards (*).
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// Specifies the node or shard the operation should be performed on.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs
index 92ee29cc3a7..bdc8bad8140 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs
@@ -110,6 +110,11 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
{
}
+ [JsonConstructor]
+ internal ExistsSourceRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExistsSource;
protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD;
@@ -118,6 +123,23 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
internal override string OperationName => "exists_source";
+ ///
+ ///
+ /// Identifier of the document.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
+ ///
+ ///
+ /// Comma-separated list of data streams, indices, and aliases.
+ /// Supports wildcards (*).
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// Specifies the node or shard the operation should be performed on.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs
index a747706a688..f16092c9e35 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs
@@ -131,6 +131,11 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
{
}
+ [JsonConstructor]
+ internal ExplainRequest()
+ {
+ }
+
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExplain;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
@@ -139,6 +144,23 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
internal override string OperationName => "explain";
+ ///
+ ///
+ /// Defines the document ID.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Id Id { get => P("id"); set => PR("id", value); }
+
+ ///
+ ///
+ /// Index names used to limit the request.
+ /// Only a single index name can be provided to this parameter.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.IndexName Index { get => P("index"); set => PR("index", value); }
+
///
///
/// Analyzer to use for the query string.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs
index 507b277bdfe..cf18bc89bc0 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs
@@ -22,20 +22,113 @@
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 ExplainResponseConverter : System.Text.Json.Serialization.JsonConverter>
+{
+ private static readonly System.Text.Json.JsonEncodedText PropExplanation = System.Text.Json.JsonEncodedText.Encode("explanation");
+ private static readonly System.Text.Json.JsonEncodedText PropGet = System.Text.Json.JsonEncodedText.Encode("get");
+ 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 PropMatched = System.Text.Json.JsonEncodedText.Encode("matched");
+
+ public override ExplainResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
+ {
+ reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
+ LocalJsonValue propExplanation = default;
+ LocalJsonValue?> propGet = default;
+ LocalJsonValue propId = default;
+ LocalJsonValue propIndex = default;
+ LocalJsonValue propMatched = default;
+ while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
+ {
+ if (propExplanation.TryReadProperty(ref reader, options, PropExplanation, null))
+ {
+ continue;
+ }
+
+ if (propGet.TryReadProperty(ref reader, options, PropGet, null))
+ {
+ continue;
+ }
+
+ if (propId.TryReadProperty(ref reader, options, PropId, null))
+ {
+ continue;
+ }
+
+ if (propIndex.TryReadProperty(ref reader, options, PropIndex, null))
+ {
+ continue;
+ }
+
+ if (propMatched.TryReadProperty(ref reader, options, PropMatched, null))
+ {
+ continue;
+ }
+
+ if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
+ {
+ reader.Skip();
+ }
+
+ throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'.");
+ }
+
+ reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
+ return new ExplainResponse
+ {
+ Explanation = propExplanation.Value
+,
+ Get = propGet.Value
+,
+ Id = propId.Value
+,
+ Index = propIndex.Value
+,
+ Matched = propMatched.Value
+ };
+ }
+
+ public override void Write(System.Text.Json.Utf8JsonWriter writer, ExplainResponse value, System.Text.Json.JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WriteProperty(options, PropExplanation, value.Explanation, null, null);
+ writer.WriteProperty(options, PropGet, value.Get, null, null);
+ writer.WriteProperty(options, PropId, value.Id, null, null);
+ writer.WriteProperty(options, PropIndex, value.Index, null, null);
+ writer.WriteProperty(options, PropMatched, value.Matched, null, null);
+ writer.WriteEndObject();
+ }
+}
+
+internal sealed partial class ExplainResponseConverterFactory : System.Text.Json.Serialization.JsonConverterFactory
+{
+ public override bool CanConvert(System.Type typeToConvert)
+ {
+ return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(ExplainResponse<>);
+ }
+
+ 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(ExplainResponseConverter<>).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(ExplainResponseConverterFactory))]
public sealed partial class ExplainResponse