diff --git a/benchmarks/Benchmarks/packages.lock.json b/benchmarks/Benchmarks/packages.lock.json
index 27bbaa8357a..08614b0e273 100644
--- a/benchmarks/Benchmarks/packages.lock.json
+++ b/benchmarks/Benchmarks/packages.lock.json
@@ -67,13 +67,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1"
+ "System.Text.Json": "6.0.0"
}
},
"Elasticsearch.Net": {
@@ -1035,8 +1035,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
@@ -1195,7 +1195,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
}
diff --git a/benchmarks/Profiling/packages.lock.json b/benchmarks/Profiling/packages.lock.json
index 362035ab72d..f1ff9c7aec7 100644
--- a/benchmarks/Profiling/packages.lock.json
+++ b/benchmarks/Profiling/packages.lock.json
@@ -31,13 +31,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1"
+ "System.Text.Json": "6.0.0"
}
},
"Microsoft.Build.Tasks.Git": {
@@ -121,8 +121,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
@@ -131,7 +131,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
}
diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs
index b887ecd1c44..05ffb3d986d 100644
--- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs
+++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs
@@ -28,9 +28,9 @@ public class HandleNestTypesOnSourceJsonConverter : JsonConverter
};
private readonly Serializer _builtInSerializer;
- private readonly IMemoryStreamFactory _memoryStreamFactory;
+ private readonly MemoryStreamFactory _memoryStreamFactory;
- public HandleNestTypesOnSourceJsonConverter(Serializer builtInSerializer, IMemoryStreamFactory memoryStreamFactory
+ public HandleNestTypesOnSourceJsonConverter(Serializer builtInSerializer, MemoryStreamFactory memoryStreamFactory
)
{
_builtInSerializer = builtInSerializer;
diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/JTokenExtensions.cs b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/JTokenExtensions.cs
index 58b6e23a928..d10d0594282 100644
--- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/JTokenExtensions.cs
+++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/JTokenExtensions.cs
@@ -14,7 +14,7 @@ internal static class JTokenExtensions
///
/// Writes a to a using
///
- public static MemoryStream ToStream(this JToken token, IMemoryStreamFactory memoryStreamFactory)
+ public static MemoryStream ToStream(this JToken token, MemoryStreamFactory memoryStreamFactory)
{
var ms = memoryStreamFactory.Create();
using (var streamWriter = new StreamWriter(ms, ConnectionSettingsAwareSerializer.ExpectedEncoding,
diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json
index 30ee7aaf027..abd3d524cd2 100644
--- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json
+++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json
@@ -37,13 +37,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1",
+ "System.Text.Json": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
@@ -128,8 +128,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
@@ -143,7 +143,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
},
@@ -183,13 +183,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1",
+ "System.Text.Json": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
@@ -303,8 +303,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.Buffers": "4.5.1",
@@ -332,7 +332,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
},
@@ -381,13 +381,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1",
+ "System.Text.Json": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
@@ -506,8 +506,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.Buffers": "4.5.1",
@@ -529,7 +529,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
},
@@ -569,13 +569,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1",
+ "System.Text.Json": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
@@ -686,8 +686,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.Buffers": "4.5.1",
@@ -709,7 +709,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
},
@@ -749,13 +749,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1"
+ "System.Text.Json": "6.0.0"
}
},
"Microsoft.Build.Tasks.Git": {
@@ -839,8 +839,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
@@ -849,7 +849,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
},
@@ -889,13 +889,13 @@
},
"Elastic.Transport": {
"type": "Transitive",
- "resolved": "0.3.2",
- "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
+ "resolved": "0.4.0",
+ "contentHash": "4uqaeeZOboqs8nSvYnQXnGOSTyPo4SvV4NH3o+Ls3OEV1d9VipYS09/8/DcmcklK7hWuQXhrdsQd1b6Vi0a//w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
"System.Diagnostics.DiagnosticSource": "5.0.1",
- "System.Text.Json": "6.0.1"
+ "System.Text.Json": "6.0.0"
}
},
"Microsoft.Build.Tasks.Git": {
@@ -979,8 +979,8 @@
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "6.0.1",
- "contentHash": "X3cTdM+jna1YyfTUzToW7aVgINFv7R1W4+1+3hua/YCyLjApPoR8fd+2Cep9DbfYjbv+rBx4K6dlmAWEJr9AHg==",
+ "resolved": "6.0.0",
+ "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
@@ -989,7 +989,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "[0.3.2, )"
+ "Elastic.Transport": "[0.4.0, )"
}
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs b/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs
index d5bc8bfa624..ccf3905ea2a 100644
--- a/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs
+++ b/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs
@@ -16,20 +16,20 @@ namespace Elastic.Clients.Elasticsearch;
public partial class BulkRequest : IStreamSerializable
{
- internal IRequest Self => this;
+ internal Request Self => this;
public BulkOperationsCollection Operations { get; set; }
- protected override string ContentType => "application/x-ndjson";
+ internal override string ContentType => "application/x-ndjson";
- protected override string Accept => "application/json";
+ internal override string Accept => "application/json";
public void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None)
{
if (Operations is null)
return;
- var index = Self.RouteValues.Get("index");
+ var index = RouteValues.Get("index");
foreach (var op in Operations)
{
@@ -48,7 +48,7 @@ public async Task SerializeAsync(Stream stream, IElasticsearchClientSettings set
if (Operations is null)
return;
- var index = Self.RouteValues.Get("index");
+ var index = RouteValues.Get("index");
foreach (var op in Operations)
{
@@ -65,9 +65,9 @@ public async Task SerializeAsync(Stream stream, IElasticsearchClientSettings set
public sealed partial class BulkRequestDescriptor : IStreamSerializable
{
- protected override string ContentType => "application/x-ndjson";
+ internal override string ContentType => "application/x-ndjson";
- protected override string Accept => "application/json";
+ internal override string Accept => "application/json";
private readonly BulkOperationsCollection _operations = new();
diff --git a/src/Elastic.Clients.Elasticsearch/Api/IndexRequest.cs b/src/Elastic.Clients.Elasticsearch/Api/IndexRequest.cs
index 389f5e74780..8bf4882f7f0 100644
--- a/src/Elastic.Clients.Elasticsearch/Api/IndexRequest.cs
+++ b/src/Elastic.Clients.Elasticsearch/Api/IndexRequest.cs
@@ -22,14 +22,14 @@ public IndexRequest() : this(typeof(TDocument)) { }
public IndexRequest(TDocument document, IndexName index = null, Id id = null) : this(index ?? typeof(TDocument), id ?? Id.From(document)) => Document = document;
- internal IRequest Self => this;
+ internal Request Self => this;
- [JsonIgnore] private Id? Id => Self.RouteValues.Get("id");
+ [JsonIgnore] private Id? Id => RouteValues.Get("id");
void ICustomJsonWriter.WriteJson(Utf8JsonWriter writer, Serializer sourceSerializer) => SourceSerialisation.Serialize(Document, writer, sourceSerializer);
internal static HttpMethod GetHttpMethod(IndexRequest request) =>
- request.Id?.StringOrLongValue != null || request.Self.RouteValues.ContainsId ? HttpMethod.PUT : HttpMethod.POST;
+ request.Id?.StringOrLongValue != null || request.RouteValues.ContainsId ? HttpMethod.PUT : HttpMethod.POST;
}
public sealed partial class IndexRequestDescriptor : ICustomJsonWriter
diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs
index 11c0ec5f9dd..60de2bd2d24 100644
--- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs
+++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs
@@ -13,26 +13,26 @@ public partial class ElasticsearchClient
public Task> UpdateAsync(IndexName index, Id id, CancellationToken cancellationToken = default)
{
var descriptor = new UpdateRequestDescriptor(index, id);
- return DoRequestAsync, UpdateResponse>(descriptor);
+ return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor);
}
public Task> UpdateAsync(IndexName index, Id id, Action> configureRequest, CancellationToken cancellationToken = default)
{
var descriptor = new UpdateRequestDescriptor(index, id);
configureRequest?.Invoke(descriptor);
- return DoRequestAsync, UpdateResponse>(descriptor);
+ return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor);
}
public UpdateResponse Update(IndexName index, Id id)
{
var descriptor = new UpdateRequestDescriptor(index, id);
- return DoRequest, UpdateResponse>(descriptor);
+ return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor);
}
public UpdateResponse Update(IndexName index, Id id, Action> configureRequest)
{
var descriptor = new UpdateRequestDescriptor(index, id);
configureRequest?.Invoke(descriptor);
- return DoRequest, UpdateResponse>(descriptor);
+ return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor);
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs
index 0ddb77861f4..2c0112cbaef 100644
--- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs
+++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs
@@ -8,15 +8,17 @@
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
+using Elastic.Clients.Elasticsearch.IndexManagement;
using Elastic.Clients.Elasticsearch.Requests;
using Elastic.Transport;
+using Elastic.Transport.Products.Elasticsearch;
namespace Elastic.Clients.Elasticsearch;
///
public sealed partial class ElasticsearchClient
{
- private readonly ITransport _transport;
+ private readonly HttpTransport _transport;
internal static ConditionalWeakTable SettingsTable { get; } = new();
@@ -43,7 +45,7 @@ public ElasticsearchClient(Uri uri) : this(new ElasticsearchClientSettings(uri))
///
/// The Cloud ID of an Elastic Cloud deployment.
/// The credentials to use for the connection.
- public ElasticsearchClient(string cloudId, IAuthenticationHeader credentials) : this(
+ public ElasticsearchClient(string cloudId, AuthorizationHeader credentials) : this(
new ElasticsearchClientSettings(cloudId, credentials))
{
}
@@ -53,7 +55,7 @@ public ElasticsearchClient(string cloudId, IAuthenticationHeader credentials) :
///
///
public ElasticsearchClient(IElasticsearchClientSettings elasticsearchClientSettings)
- : this(new Transport(elasticsearchClientSettings))
+ : this(new DefaultHttpTransport(elasticsearchClientSettings))
{
}
@@ -61,7 +63,7 @@ public ElasticsearchClient(IElasticsearchClientSettings elasticsearchClientSetti
/// TODO
///
///
- public ElasticsearchClient(ITransport transport)
+ public ElasticsearchClient(HttpTransport transport)
{
transport.ThrowIfNull(nameof(transport));
transport.Settings.ThrowIfNull(nameof(transport.Settings));
@@ -78,7 +80,7 @@ public ElasticsearchClient(ITransport transport)
public Inferrer Infer => _transport.Settings.Inferrer;
public Serializer RequestResponseSerializer => _transport.Settings.RequestResponseSerializer;
public Serializer SourceSerializer => _transport.Settings.SourceSerializer;
- public ITransport Transport => _transport;
+ public HttpTransport Transport => _transport;
private ProductCheckStatus _productCheckStatus;
@@ -91,12 +93,13 @@ private enum ProductCheckStatus
private partial void SetupNamespaces();
- internal TResponse DoRequest(
+ internal TResponse DoRequest(
TRequest request,
- IRequestParameters? parameters,
+ TRequestParameters? parameters,
Action? forceConfiguration = null)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new()
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new()
{
if (_productCheckStatus == ProductCheckStatus.Failed)
throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError);
@@ -129,7 +132,7 @@ internal TResponse DoRequest(
}
}
- var (url, postData) = PrepareRequest(request, forceConfiguration);
+ var (url, postData) = PrepareRequest(request, forceConfiguration);
var response = _transport.Request(request.HttpMethod, url, postData, parameters);
PostRequestProductCheck(request, response);
@@ -151,11 +154,12 @@ internal TResponse DoRequest(
return response;
}
- internal TResponse DoRequest(
+ internal TResponse DoRequest(
TRequest request,
Action? forceConfiguration = null)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new()
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new()
{
if (_productCheckStatus == ProductCheckStatus.Failed)
throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError);
@@ -188,7 +192,7 @@ internal TResponse DoRequest(
}
}
- var (url, postData) = PrepareRequest(request, forceConfiguration);
+ var (url, postData) = PrepareRequest(request, forceConfiguration);
var response = _transport.Request(request.HttpMethod, url, postData, request.RequestParameters);
PostRequestProductCheck(request, response);
@@ -210,12 +214,13 @@ internal TResponse DoRequest(
return response;
}
- internal Task DoRequestAsync(
+ internal Task DoRequestAsync(
TRequest request,
- IRequestParameters? parameters,
+ RequestParameters? parameters,
CancellationToken cancellationToken = default)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new()
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new()
{
if (_productCheckStatus == ProductCheckStatus.Failed)
throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError);
@@ -249,14 +254,14 @@ internal Task DoRequestAsync(
}
}
- var (url, postData) = PrepareRequest(request, null);
+ var (url, postData) = PrepareRequest(request, null);
if (_productCheckStatus == ProductCheckStatus.Succeeded && !requestModified)
return _transport.RequestAsync(request.HttpMethod, url, postData, parameters, cancellationToken);
return SendRequest(request, parameters, url, postData, hadRequestConfig, originalHeaders);
- async Task SendRequest(TRequest request, IRequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders)
+ async Task SendRequest(TRequest request, RequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders)
{
var response = await _transport.RequestAsync(request.HttpMethod, url, postData, parameters).ConfigureAwait(false);
PostRequestProductCheck(request, response);
@@ -280,11 +285,12 @@ async Task SendRequest(TRequest request, IRequestParameters? paramete
}
}
- internal Task DoRequestAsync(
+ internal Task DoRequestAsync(
TRequest request,
CancellationToken cancellationToken = default)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new()
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new()
{
if (_productCheckStatus == ProductCheckStatus.Failed)
throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError);
@@ -318,14 +324,14 @@ internal Task DoRequestAsync(
}
}
- var (url, postData) = PrepareRequest(request, null);
+ var (url, postData) = PrepareRequest(request, null);
if (_productCheckStatus == ProductCheckStatus.Succeeded && !requestModified)
return _transport.RequestAsync(request.HttpMethod, url, postData, request.RequestParameters, cancellationToken);
return SendRequest(request, request.RequestParameters, url, postData, hadRequestConfig, originalHeaders);
- async Task SendRequest(TRequest request, IRequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders)
+ async Task SendRequest(TRequest request, RequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders)
{
var response = await _transport.RequestAsync(request.HttpMethod, url, postData, parameters).ConfigureAwait(false);
PostRequestProductCheck(request, response);
@@ -349,13 +355,14 @@ async Task SendRequest(TRequest request, IRequestParameters? paramete
}
}
- internal Task DoRequestAsync(
+ internal Task DoRequestAsync(
TRequest request,
- IRequestParameters? parameters,
+ RequestParameters? parameters,
Action? forceConfiguration = null,
CancellationToken cancellationToken = default)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new()
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new()
{
if (_productCheckStatus == ProductCheckStatus.Failed)
throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError);
@@ -389,14 +396,14 @@ internal Task DoRequestAsync(
}
}
- var (url, postData) = PrepareRequest(request, forceConfiguration);
+ var (url, postData) = PrepareRequest(request, forceConfiguration);
if (_productCheckStatus == ProductCheckStatus.Succeeded && !requestModified)
return _transport.RequestAsync(request.HttpMethod, url, postData, parameters, cancellationToken);
return SendRequest(request, parameters, url, postData, hadRequestConfig, originalHeaders);
- async Task SendRequest(TRequest request, IRequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders)
+ async Task SendRequest(TRequest request, RequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders)
{
var response = await _transport.RequestAsync(request.HttpMethod, url, postData, parameters).ConfigureAwait(false);
PostRequestProductCheck(request, response);
@@ -420,9 +427,10 @@ async Task SendRequest(TRequest request, IRequestParameters? paramete
}
}
- private (string url, PostData data) PrepareRequest(TRequest request,
+ private (string url, PostData data) PrepareRequest(TRequest request,
Action? forceConfiguration)
- where TRequest : class, IRequest
+ where TRequest : Request
+ where TRequestParameters : RequestParameters, new()
{
request.ThrowIfNull(nameof(request), "A request is required.");
@@ -430,23 +438,15 @@ async Task SendRequest(TRequest request, IRequestParameters? paramete
ForceConfiguration(request, forceConfiguration);
if (request.ContentType is not null)
- ForceContentType(request, request.ContentType);
+ ForceContentType(request, request.ContentType);
if (request.Accept is not null)
- ForceAccept(request, request.Accept);
+ ForceAccept(request, request.Accept);
var url = request.GetUrl(ElasticsearchClientSettings);
- // TODO: Left while we decide if we prefer this
- //PostData postData = null;
- //if (request is IProxyRequest proxyRequest)
- //{
- // postData = PostData.ProxySerializable((stream, formatting) =>
- // proxyRequest.WriteJson(stream, ConnectionSettings.SourceSerializer, formatting));
- //}
-
var postData =
- /*request.CanBeEmpty && request.IsEmpty || */request.HttpMethod == HttpMethod.GET ||
+ request.HttpMethod == HttpMethod.GET ||
request.HttpMethod == HttpMethod.HEAD || !request.SupportsBody
? null
: PostData.Serializable(request);
@@ -455,12 +455,12 @@ async Task SendRequest(TRequest request, IRequestParameters? paramete
}
private void PostRequestProductCheck(TRequest request, TResponse response)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new()
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
{
- if (response.ApiCall.HttpStatusCode.HasValue && response.ApiCall.HttpStatusCode.Value >= 200 && response.ApiCall.HttpStatusCode.Value <= 299 && _productCheckStatus == ProductCheckStatus.NotChecked)
+ if (response.ApiCallDetails.HttpStatusCode.HasValue && response.ApiCallDetails.HttpStatusCode.Value >= 200 && response.ApiCallDetails.HttpStatusCode.Value <= 299 && _productCheckStatus == ProductCheckStatus.NotChecked)
{
- if (response.ApiCall.ParsedHeaders is null || !response.ApiCall.ParsedHeaders.TryGetValue("x-elastic-product", out var values) || !values.Single().Equals("Elasticsearch", StringComparison.Ordinal))
+ if (!response.ApiCallDetails.TryGetHeader("x-elastic-product", out var values) || !values.Single().Equals("Elasticsearch", StringComparison.Ordinal))
{
_productCheckStatus = ProductCheckStatus.Failed;
}
@@ -469,15 +469,17 @@ private void PostRequestProductCheck(TRequest request, TRes
}
}
- private static void ForceConfiguration(IRequest request, Action forceConfiguration)
+ private static void ForceConfiguration(Request request, Action forceConfiguration)
+ where TRequestParameters : RequestParameters, new()
{
var configuration = request.RequestParameters.RequestConfiguration ?? new RequestConfiguration();
forceConfiguration(configuration);
request.RequestParameters.RequestConfiguration = configuration;
}
- private static void ForceContentType(TRequest request, string contentType)
- where TRequest : class, IRequest
+ private static void ForceContentType(TRequest request, string contentType)
+ where TRequest : Request
+ where TRequestParameters : RequestParameters, new()
{
var configuration = request.RequestParameters.RequestConfiguration ?? new RequestConfiguration();
configuration.Accept = contentType;
@@ -485,8 +487,9 @@ private static void ForceContentType(TRequest request, string contentT
request.RequestParameters.RequestConfiguration = configuration;
}
- private static void ForceAccept(TRequest request, string acceptType)
- where TRequest : class, IRequest
+ private static void ForceAccept(TRequest request, string acceptType)
+ where TRequest : Request
+ where TRequestParameters : RequestParameters, new()
{
var configuration = request.RequestParameters.RequestConfiguration ?? new RequestConfiguration();
configuration.Accept = acceptType;
diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchResponseBaseExtensions.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchResponseBaseExtensions.cs
index bb31831adb3..086d28e4fbb 100644
--- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchResponseBaseExtensions.cs
+++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchResponseBaseExtensions.cs
@@ -6,7 +6,7 @@
namespace Elastic.Clients.Elasticsearch;
-public static class ElasticsearchResponseBaseExtensions
+public static class ElasticsearchResponseExtensions
{
- public static bool IsSuccess(this ElasticsearchResponseBase response) => response.ApiCall is not null && response.ApiCall.Success;
+ public static bool IsSuccess(this ElasticsearchResponse response) => response.ApiCallDetails is not null && response.ApiCallDetails.Success;
}
diff --git a/src/Elastic.Clients.Elasticsearch/Client/IndicesNamespace.cs b/src/Elastic.Clients.Elasticsearch/Client/IndicesNamespace.cs
index 187acf853cf..aefd2b6e704 100644
--- a/src/Elastic.Clients.Elasticsearch/Client/IndicesNamespace.cs
+++ b/src/Elastic.Clients.Elasticsearch/Client/IndicesNamespace.cs
@@ -19,7 +19,7 @@ public RefreshResponse Refresh(Indices indices)
{
var request = new RefreshRequest(indices);
request.BeforeRequest();
- return DoRequest(request);
+ return DoRequest(request);
}
///
@@ -33,6 +33,6 @@ public Task RefreshAsync(Indices indices, CancellationToken can
{
var request = new RefreshRequest(indices);
request.BeforeRequest();
- return DoRequestAsync(request, cancellationToken);
+ return DoRequestAsync(request, cancellationToken);
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/Client/NamespacedClientProxy.cs b/src/Elastic.Clients.Elasticsearch/Client/NamespacedClientProxy.cs
index fa6332ae7e6..b361f527ad8 100644
--- a/src/Elastic.Clients.Elasticsearch/Client/NamespacedClientProxy.cs
+++ b/src/Elastic.Clients.Elasticsearch/Client/NamespacedClientProxy.cs
@@ -7,6 +7,7 @@
using System.Threading.Tasks;
using Elastic.Clients.Elasticsearch.Requests;
using Elastic.Transport;
+using Elastic.Transport.Products.Elasticsearch;
namespace Elastic.Clients.Elasticsearch;
@@ -15,48 +16,53 @@ namespace Elastic.Clients.Elasticsearch;
///
/// Not intended to be used directly.
///
-public class NamespacedClientProxy
+public abstract class NamespacedClientProxy
{
private readonly ElasticsearchClient _client;
internal NamespacedClientProxy(ElasticsearchClient client) => _client = client;
- internal TResponse DoRequest(
+ internal TResponse DoRequest(
TRequest request,
- IRequestParameters parameters,
+ TRequestParameters parameters,
Action? forceConfiguration = null)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new() =>
- _client.DoRequest(request, parameters, forceConfiguration);
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new() =>
+ _client.DoRequest(request, parameters, forceConfiguration);
- internal TResponse DoRequest(
+ internal TResponse DoRequest(
TRequest request,
Action? forceConfiguration = null)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new() =>
- _client.DoRequest(request, forceConfiguration);
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new() =>
+ _client.DoRequest(request, forceConfiguration);
- internal Task DoRequestAsync(
+ internal Task DoRequestAsync(
TRequest request,
- IRequestParameters parameters,
+ TRequestParameters parameters,
CancellationToken cancellationToken = default)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new() =>
- _client.DoRequestAsync(request, parameters, cancellationToken: cancellationToken);
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new() =>
+ _client.DoRequestAsync(request, parameters, cancellationToken: cancellationToken);
- internal Task DoRequestAsync(
+ internal Task DoRequestAsync(
TRequest request,
CancellationToken cancellationToken = default)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new() =>
- _client.DoRequestAsync(request, cancellationToken: cancellationToken);
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new() =>
+ _client.DoRequestAsync(request, cancellationToken: cancellationToken);
- internal Task DoRequestAsync(
+ internal Task DoRequestAsync(
TRequest request,
- IRequestParameters parameters,
+ TRequestParameters parameters,
Action? forceConfiguration,
CancellationToken cancellationToken = default)
- where TRequest : class, IRequest
- where TResponse : class, ITransportResponse, new() =>
- _client.DoRequestAsync(request, parameters, forceConfiguration, cancellationToken);
+ where TRequest : Request
+ where TResponse : ElasticsearchResponse, new()
+ where TRequestParameters : RequestParameters, new() =>
+ _client.DoRequestAsync(request, parameters, forceConfiguration, cancellationToken);
}
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs
index 120b091bf67..4b6816eedf7 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs
@@ -45,7 +45,7 @@ public ElasticsearchClientSettings(Uri? uri = null) : this(
/// Sets up the client to communicate to Elastic Cloud using ,
/// documentation for more information on how to obtain your Cloud Id
///
- public ElasticsearchClientSettings(string cloudId, IAuthenticationHeader credentials) : this(
+ public ElasticsearchClientSettings(string cloudId, AuthorizationHeader credentials) : this(
new CloudNodePool(cloudId, credentials))
{
}
@@ -64,9 +64,9 @@ public ElasticsearchClientSettings(NodePool nodePool) : this(nodePool, null, nul
public ElasticsearchClientSettings(NodePool nodePool, SourceSerializerFactory sourceSerializer)
: this(nodePool, null, sourceSerializer) { }
- public ElasticsearchClientSettings(NodePool nodePool, ITransportClient connection) : this(nodePool, connection, null) { }
+ public ElasticsearchClientSettings(NodePool nodePool, TransportClient connection) : this(nodePool, connection, null) { }
- public ElasticsearchClientSettings(NodePool nodePool, ITransportClient connection, SourceSerializerFactory sourceSerializer) : this(
+ public ElasticsearchClientSettings(NodePool nodePool, TransportClient connection, SourceSerializerFactory sourceSerializer) : this(
nodePool,
connection, sourceSerializer, null)
{
@@ -74,7 +74,7 @@ public ElasticsearchClientSettings(NodePool nodePool, ITransportClient connectio
public ElasticsearchClientSettings(
NodePool nodePool,
- ITransportClient connection,
+ TransportClient connection,
SourceSerializerFactory sourceSerializer,
IPropertyMappingProvider propertyMappingProvider) : base(nodePool, connection, sourceSerializer, propertyMappingProvider)
{
@@ -109,7 +109,7 @@ public abstract class
protected ElasticsearchClientSettingsBase(
NodePool nodePool,
- ITransportClient connection,
+ TransportClient connection,
ElasticsearchClientSettings.SourceSerializerFactory? sourceSerializerFactory,
IPropertyMappingProvider propertyMappingProvider)
: base(nodePool, connection, null, ElasticsearchClientProductRegistration.DefaultForElasticsearchClientsElasticsearch)
@@ -317,7 +317,7 @@ public TConnectionSettings DefaultMappingFor(IEnumerable typeMap
}
}
-///
+///
public class ConnectionConfiguration : ConnectionConfigurationBase
{
///
@@ -340,14 +340,14 @@ public ConnectionConfiguration(InMemoryConnection connection)
/// Sets up the client to communicate to Elastic Cloud using ,
/// documentation for more information on how to obtain your Cloud Id
///
- public ConnectionConfiguration(string cloudId, IAuthenticationHeader credentials) : this(
+ public ConnectionConfiguration(string cloudId, AuthorizationHeader credentials) : this(
new CloudNodePool(cloudId, credentials))
{
}
public ConnectionConfiguration(NodePool nodePool) : this(nodePool, null, null) { }
- public ConnectionConfiguration(NodePool nodePool, ITransportClient connection) : this(nodePool,
+ public ConnectionConfiguration(NodePool nodePool, TransportClient connection) : this(nodePool,
connection, null)
{
}
@@ -357,33 +357,33 @@ public ConnectionConfiguration(NodePool nodePool, Serializer serializer) : this(
{
}
- public ConnectionConfiguration(NodePool nodePool, ITransportClient connection,
+ public ConnectionConfiguration(NodePool nodePool, TransportClient connection,
Serializer serializer)
: base(nodePool, connection, serializer)
{
}
}
-///
+///
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class
ConnectionConfigurationBase : TransportConfigurationBase,
- ITransportClientConfigurationValues
+ TransportClientConfigurationValues
where TConnectionConfiguration : ConnectionConfigurationBase,
- ITransportClientConfigurationValues
+ TransportClientConfigurationValues
{
private bool _includeServerStackTraceOnError;
- protected ConnectionConfigurationBase(NodePool nodePool, ITransportClient connection,
+ protected ConnectionConfigurationBase(NodePool nodePool, TransportClient connection,
Serializer? serializer,
- IProductRegistration registration = null)
+ ProductRegistration registration = null)
: base(nodePool, connection, serializer, registration ?? new ElasticsearchProductRegistration(typeof(ElasticsearchClient))) =>
UserAgent(ConnectionConfiguration.DefaultUserAgent);
- bool ITransportClientConfigurationValues.IncludeServerStackTraceOnError => _includeServerStackTraceOnError;
+ bool TransportClientConfigurationValues.IncludeServerStackTraceOnError => _includeServerStackTraceOnError;
- public override TConnectionConfiguration EnableDebugMode(Action onRequestCompleted = null) =>
+ public override TConnectionConfiguration EnableDebugMode(Action onRequestCompleted = null) =>
base.EnableDebugMode(onRequestCompleted)
.PrettyJson()
.IncludeServerStackTraceOnError();
@@ -409,7 +409,7 @@ public TConnectionConfiguration IncludeServerStackTraceOnError(bool b = true) =>
});
}
-public interface ITransportClientConfigurationValues : ITransportConfiguration
+public interface TransportClientConfigurationValues : ITransportConfiguration
{
///
/// Forces all requests to have ?error_trace=true querystring parameter appended,
diff --git a/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs b/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs
index 892863d09d2..419a1a1943d 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs
@@ -16,7 +16,7 @@ public ElasticsearchClientProductRegistration(Type markerType) : base(markerType
public static ElasticsearchClientProductRegistration DefaultForElasticsearchClientsElasticsearch { get; } = new(typeof(ElasticsearchClient));
///
- /// Elastic.Clients.Elasticsearch handles 404 in its , we do not want the low level client throwing
+ /// Elastic.Clients.Elasticsearch handles 404 in its , we do not want the low level client throwing
/// exceptions
/// when is enabled for 404's. The client is in charge of
/// composing paths
@@ -26,12 +26,12 @@ public override bool HttpStatusCodeClassifier(HttpMethod method, int statusCode)
statusCode is >= 200 and < 300 or 404;
///
- /// Makes the low level transport aware of Elastic.Clients.Elasticsearch's
+ /// Makes the low level transport aware of Elastic.Clients.Elasticsearch's
/// so that it can peek in to its exposed error when reporting failures.
///
public override bool TryGetServerErrorReason(TResponse response, [NotNullWhen(returnValue: true)] out string? reason)
{
- if (response is not ElasticsearchResponseBase r)
+ if (response is not ElasticsearchResponse r)
return base.TryGetServerErrorReason(response, out reason);
reason = r.ServerError?.Error?.ToString();
return !string.IsNullOrEmpty(reason);
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Infer/Inferrer.cs b/src/Elastic.Clients.Elasticsearch/Core/Infer/Inferrer.cs
index 5b9f8140d79..4d5c459660f 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Infer/Inferrer.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Infer/Inferrer.cs
@@ -26,7 +26,7 @@ public Inferrer(IElasticsearchClientSettings elasticsearchClientSettings)
// Action>>>();
//CreateSearchResponseDelegates =
// new ConcurrentDictionary>>();
+ // Action>>();
}
//internal ConcurrentDictionary>>
@@ -34,7 +34,7 @@ public Inferrer(IElasticsearchClientSettings elasticsearchClientSettings)
// CreateMultiHitDelegates { get; }
//internal ConcurrentDictionary>>
+ // Action>>
// CreateSearchResponseDelegates { get; }
private FieldResolver FieldResolver { get; }
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/IRequest.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/IRequest.cs
deleted file mode 100644
index 3fe54a38331..00000000000
--- a/src/Elastic.Clients.Elasticsearch/Core/Request/IRequest.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to Elasticsearch B.V under one or more agreements.
-// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
-// See the LICENSE file in the project root for more information.
-
-using System.Text.Json.Serialization;
-using Elastic.Transport;
-
-namespace Elastic.Clients.Elasticsearch.Requests;
-
-public interface IRequest
-{
- [JsonIgnore] string? Accept { get; }
-
- [JsonIgnore] string? ContentType { get; }
-
- [JsonIgnore] HttpMethod HttpMethod { get; }
-
- [JsonIgnore] bool SupportsBody { get; }
-
- [JsonIgnore] RouteValues RouteValues { get; }
-
- [JsonIgnore] IRequestParameters RequestParameters { get; }
-
- //[JsonIgnore] bool CanBeEmpty { get; }
-
- //[JsonIgnore] bool IsEmpty { get; }
-
- string GetUrl(IElasticsearchClientSettings settings);
-}
-
-public interface IRequest : IRequest
- where TParameters : class, IRequestParameters, new()
-{
- ///
- /// Used to describe request parameters that are not part of the body. e.g. query string, connection configuration
- /// overrides, etc.
- ///
- [JsonIgnore]
- new TParameters RequestParameters { get; }
-}
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/PlainRequest.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/PlainRequest.cs
index 485328faaa8..3ce888c5a36 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Request/PlainRequest.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Request/PlainRequest.cs
@@ -8,8 +8,15 @@
namespace Elastic.Clients.Elasticsearch.Requests;
-public abstract partial class PlainRequest
+public abstract class PlainRequest : Request
+ where TParameters : RequestParameters, new()
{
+ // This internal ctor ensures that only types defined within the client assembly can derive from this base class.
+ // We don't expect consumers to derive from this public base class.
+ internal PlainRequest() { }
+
+ protected PlainRequest(Func pathSelector) : base(pathSelector) { }
+
///Include the stack trace of returned errors.
[JsonIgnore]
public bool? ErrorTrace
@@ -59,16 +66,6 @@ public string SourceQueryString
get => Q("source");
set => Q("source", value);
}
-}
-
-public abstract partial class PlainRequest : Request
- where TParameters : class, IRequestParameters, new()
-{
- // This internal ctor ensures that only types defined within the client assembly can derive from this base class.
- // We don't expect consumers to derive from this public base class.
- internal PlainRequest() { }
-
- protected PlainRequest(Func pathSelector) : base(pathSelector) { }
///
/// Specify settings for this request alone, handy if you need a custom timeout or want to bypass sniffing, retries
@@ -76,7 +73,7 @@ protected PlainRequest(Func pathSelector) : base(pathS
[JsonIgnore]
public IRequestConfiguration RequestConfiguration
{
- get => RequestState.RequestParameters.RequestConfiguration;
- set => RequestState.RequestParameters.RequestConfiguration = value;
+ get => RequestParameters.RequestConfiguration;
+ set => RequestParameters.RequestConfiguration = value;
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs
index ded708999c2..c27868e1f60 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs
@@ -8,85 +8,57 @@
namespace Elastic.Clients.Elasticsearch.Requests;
-public abstract class Request : IRequest
- where TParameters : class, IRequestParameters, new()
+public abstract class Request
{
- private readonly TParameters _parameters;
+ internal Request() { }
- // ReSharper disable once VirtualMemberCallInConstructor
- internal Request()
- {
- _parameters = new TParameters();
- // ReSharper disable once VirtualMemberCallInConstructor
- RequestDefaults(_parameters);
- }
+ internal virtual string? Accept { get; } = null;
- protected Request(Func pathSelector)
- {
- pathSelector(RequestState.RouteValues);
- _parameters = new TParameters();
- // ReSharper disable once VirtualMemberCallInConstructor
- RequestDefaults(_parameters);
- }
+ internal virtual string? ContentType { get; } = null;
- protected virtual HttpMethod? DynamicHttpMethod { get; }
+ [JsonIgnore] internal abstract HttpMethod HttpMethod { get; }
- protected abstract HttpMethod HttpMethod { get; }
+ [JsonIgnore] internal abstract bool SupportsBody { get; }
- protected abstract bool SupportsBody { get; }
+ [JsonIgnore] protected RouteValues RouteValues { get; } = new();
- internal virtual void BeforeRequest() { }
-
- //protected virtual bool CanBeEmpty => false;
-
- //protected virtual bool IsEmpty => false;
-
- [JsonIgnore] protected IRequest RequestState => this;
-
- protected virtual string? Accept { get; } = null;
-
- protected virtual string? ContentType { get; } = null;
+ [JsonIgnore] protected virtual HttpMethod? DynamicHttpMethod => null;
internal abstract ApiUrls ApiUrls { get; }
- [JsonIgnore] HttpMethod IRequest.HttpMethod => DynamicHttpMethod ?? HttpMethod;
-
- [JsonIgnore] bool IRequest.SupportsBody => SupportsBody;
-
- //[JsonIgnore] bool IRequest.CanBeEmpty => CanBeEmpty;
-
- //[JsonIgnore] bool IRequest.IsEmpty => IsEmpty;
-
- [JsonIgnore] string? IRequest.Accept => Accept;
-
- [JsonIgnore] string? IRequest.ContentType => ContentType;
-
- [JsonIgnore] TParameters IRequest.RequestParameters => _parameters;
+ protected virtual string ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) =>
+ ApiUrls.Resolve(routeValues, settings);
- IRequestParameters IRequest.RequestParameters => _parameters;
+ internal virtual void BeforeRequest() { }
- [JsonIgnore] RouteValues IRequest.RouteValues { get; } = new();
+ internal string GetUrl(IElasticsearchClientSettings settings) => ResolveUrl(RouteValues, settings);
+}
- string IRequest.GetUrl(IElasticsearchClientSettings settings) => ResolveUrl(RequestState.RouteValues, settings);
+public abstract class Request : Request
+ where TParameters : RequestParameters, new()
+{
+ private readonly TParameters _parameters;
- protected virtual string ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) =>
- ApiUrls.Resolve(routeValues, settings);
+ internal Request() => _parameters = new TParameters();
- ///
- /// Allows a request implementation to set certain request parameter defaults, use sparingly!
- ///
- protected virtual void RequestDefaults(TParameters parameters) { }
+ protected Request(Func pathSelector)
+ {
+ pathSelector(RouteValues);
+ _parameters = new TParameters();
+ }
- protected TOut Q(string name) => RequestState.RequestParameters.GetQueryStringValue(name);
+ [JsonIgnore] internal TParameters RequestParameters => _parameters;
+
+ protected TOut Q(string name) => RequestParameters.GetQueryStringValue(name);
- protected void Q(string name, object value) => RequestState.RequestParameters.SetQueryString(name, value);
+ protected void Q(string name, object value) => RequestParameters.SetQueryString(name, value);
- protected void Q(string name, IStringable value) => RequestState.RequestParameters.SetQueryString(name, value.GetString());
+ protected void Q(string name, IStringable value) => RequestParameters.SetQueryString(name, value.GetString());
protected void SetAcceptHeader(string format)
{
- RequestState.RequestParameters.RequestConfiguration ??= new RequestConfiguration();
- RequestState.RequestParameters.RequestConfiguration.Accept =
- RequestState.RequestParameters.AcceptHeaderFromFormat(format);
+ RequestParameters.RequestConfiguration ??= new RequestConfiguration();
+ RequestParameters.RequestConfiguration.Accept =
+ RequestParameters.AcceptHeaderFromFormat(format);
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/RequestDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/RequestDescriptor.cs
index 7a79cbdf2b8..eedb5ce2607 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Request/RequestDescriptor.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Request/RequestDescriptor.cs
@@ -14,8 +14,8 @@ namespace Elastic.Clients.Elasticsearch.Requests;
/// Base class for all request descriptor types.
///
public abstract partial class RequestDescriptor : Request, ISelfSerializable
- where TDescriptor : RequestDescriptor, IRequest
- where TParameters : RequestParameters, new()
+ where TDescriptor : RequestDescriptor
+ where TParameters : RequestParameters, new()
{
private readonly TDescriptor _descriptor;
@@ -32,8 +32,6 @@ internal RequestDescriptor(Func pathSelector) : base(p
protected TDescriptor Self => _descriptor;
- protected RouteValues RouteValues => ((IRequest)this).RouteValues;
-
protected TDescriptor Qs(string name, object value)
{
Q(name, value);
@@ -52,8 +50,8 @@ protected TDescriptor Qs(string name, IStringable value)
public TDescriptor RequestConfiguration(
Func configurationSelector)
{
- var rc = RequestState.RequestParameters.RequestConfiguration;
- RequestState.RequestParameters.RequestConfiguration =
+ var rc = RequestParameters.RequestConfiguration;
+ RequestParameters.RequestConfiguration =
configurationSelector?.Invoke(new RequestConfigurationDescriptor(rc)) ?? rc;
return _descriptor;
}
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/RouteValues.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/RouteValues.cs
index 34693a23ea5..39bdd9498d3 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Request/RouteValues.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Request/RouteValues.cs
@@ -8,7 +8,7 @@
namespace Elastic.Clients.Elasticsearch.Requests;
-internal class ResolvedRouteValues : Dictionary
+internal sealed class ResolvedRouteValues : Dictionary
{
internal static ResolvedRouteValues Empty = new(0);
diff --git a/src/Elastic.Clients.Elasticsearch/Core/Response/DictionaryResponse.cs b/src/Elastic.Clients.Elasticsearch/Core/Response/DictionaryResponse.cs
index c3cd93235c1..59f02f392f7 100644
--- a/src/Elastic.Clients.Elasticsearch/Core/Response/DictionaryResponse.cs
+++ b/src/Elastic.Clients.Elasticsearch/Core/Response/DictionaryResponse.cs
@@ -8,7 +8,7 @@
namespace Elastic.Clients.Elasticsearch;
-public abstract class DictionaryResponse : ElasticsearchResponseBase
+public abstract class DictionaryResponse : ElasticsearchResponse
{
internal DictionaryResponse(IReadOnlyDictionary dictionary)
{
diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
index e2d2cd3bb74..7d00cdd7682 100644
--- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
+++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
@@ -17,7 +17,7 @@
annotations
-
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs
index 95d48a8631b..ee97e517a3e 100644
--- a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs
+++ b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs
@@ -110,7 +110,7 @@ private void RefreshOnCompleted()
var refresh = _client.Indices.Refresh(request);
if (!refresh.IsValid)
- throw Throw($"Refreshing after all documents have indexed failed", refresh.ApiCall);
+ throw Throw($"Refreshing after all documents have indexed failed", refresh);
}
private async Task BulkAsync(IList buffer, long page, int backOffRetries)
@@ -155,7 +155,7 @@ private async Task BulkAsync(IList buffer, long page, int ba
_compositeCancelToken.ThrowIfCancellationRequested();
_bulkResponseCallback?.Invoke(response);
- if (!response.ApiCall.Success)
+ if (!response.ApiCallDetails.Success)
return await HandleBulkRequestAsync(buffer, page, backOffRetries, response).ConfigureAwait(false);
var retryableDocuments = new List();
@@ -218,13 +218,13 @@ private void HandleDroppedDocuments(List> droppedDocument
private async Task HandleBulkRequestAsync(IList buffer, long page, int backOffRetries, BulkResponse response)
{
- var clientException = response.ApiCall.OriginalException as TransportException;
+ var clientException = response.ApiCallDetails.OriginalException as TransportException;
var failureReason = clientException?.FailureReason;
var reason = failureReason?.GetStringValue() ?? nameof(PipelineFailure.BadRequest);
switch (failureReason)
{
case PipelineFailure.MaxRetriesReached:
- if (response.ApiCall.AuditTrail.Last().Event == AuditEvent.FailedOverAllNodes)
+ if (response.ApiCallDetails.AuditTrail.Last().Event == AuditEvent.FailedOverAllNodes)
throw ThrowOnBadBulk(response, $"{nameof(BulkAll)} halted after attempted bulk failed over all the active nodes");
ThrowOnExhaustedRetries();
@@ -261,11 +261,11 @@ private async Task RetryDocumentsAsync(long page, int backOffRe
return await BulkAsync(retryDocuments, page, backOffRetries).ConfigureAwait(false);
}
- private Exception ThrowOnBadBulk(IElasticsearchResponse response, string message)
+ private Exception ThrowOnBadBulk(ElasticsearchResponse response, string message)
{
_incrementFailed();
_partitionedBulkRequest.BackPressure?.Release();
- return Throw(message, response.ApiCall);
+ return Throw(message, response);
}
private static bool RetryBulkActionPredicate(ResponseItem bulkResponseItem, T d) => bulkResponseItem.Status == 429;
@@ -290,6 +290,6 @@ public IDisposable Subscribe(IObserver observer)
return this;
}
- private static TransportException Throw(string message, IApiCallDetails details) =>
+ private static TransportException Throw(string message, ElasticsearchResponse details) =>
new(PipelineFailure.BadResponse, message, details);
}
diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/RequestParametersExtensions.cs b/src/Elastic.Clients.Elasticsearch/Helpers/RequestParametersExtensions.cs
index d3ea358e036..9748a2c13ca 100644
--- a/src/Elastic.Clients.Elasticsearch/Helpers/RequestParametersExtensions.cs
+++ b/src/Elastic.Clients.Elasticsearch/Helpers/RequestParametersExtensions.cs
@@ -10,7 +10,7 @@ namespace Elastic.Clients.Elasticsearch;
internal static class RequestParametersExtensions
{
- internal static void SetRequestMetaData(this IRequestParameters parameters, RequestMetaData requestMetaData)
+ internal static void SetRequestMetaData(this RequestParameters parameters, RequestMetaData requestMetaData)
{
if (parameters is null)
throw new ArgumentNullException(nameof(parameters));
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 a9cc004499d..0745ab543ea 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed class AsyncSearchStatusRequestParameters : RequestParameters
+public sealed class AsyncSearchStatusRequestParameters : RequestParameters
{
}
@@ -38,8 +38,8 @@ public AsyncSearchStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r =>
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchStatus;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
}
public sealed partial class AsyncSearchStatusRequestDescriptor : RequestDescriptor, AsyncSearchStatusRequestParameters>
@@ -54,8 +54,8 @@ internal AsyncSearchStatusRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchStatus;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
{
RouteValues.Required("id", id);
@@ -79,8 +79,8 @@ internal AsyncSearchStatusRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchStatus;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
{
RouteValues.Required("id", id);
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 7d61c2af242..30515b542df 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
@@ -24,7 +24,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponseBase
+public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("completion_status")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs
index 3227b29e67f..88fe49450c8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed class AsyncSearchSubmitRequestParameters : RequestParameters
+public sealed class AsyncSearchSubmitRequestParameters : RequestParameters
{
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
@@ -546,8 +546,8 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices)
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchSubmit;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
@@ -789,8 +789,8 @@ public AsyncSearchSubmitRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchSubmit;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public AsyncSearchSubmitRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public AsyncSearchSubmitRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public AsyncSearchSubmitRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
@@ -1822,8 +1822,8 @@ public AsyncSearchSubmitRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchSubmit;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public AsyncSearchSubmitRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public AsyncSearchSubmitRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public AsyncSearchSubmitRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitResponse.g.cs
index da84cb6886a..fed9187dcac 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitResponse.g.cs
@@ -24,7 +24,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed partial class AsyncSearchSubmitResponse : ElasticsearchResponseBase
+public sealed partial class AsyncSearchSubmitResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("expiration_time")]
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 b18ff635dda..711e8add3d7 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed class DeleteAsyncSearchRequestParameters : RequestParameters
+public sealed class DeleteAsyncSearchRequestParameters : RequestParameters
{
}
@@ -38,8 +38,8 @@ public DeleteAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r =>
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchDelete;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => false;
}
public sealed partial class DeleteAsyncSearchRequestDescriptor : RequestDescriptor, DeleteAsyncSearchRequestParameters>
@@ -54,8 +54,8 @@ internal DeleteAsyncSearchRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchDelete;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => false;
public DeleteAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
{
RouteValues.Required("id", id);
@@ -79,8 +79,8 @@ internal DeleteAsyncSearchRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchDelete;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => false;
public DeleteAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
{
RouteValues.Required("id", id);
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 e99eb0fe288..d20f68d00cf 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed partial class DeleteAsyncSearchResponse : ElasticsearchResponseBase
+public sealed partial class DeleteAsyncSearchResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("acknowledged")]
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 8b59e7dc5a9..602b4126ade 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed class GetAsyncSearchRequestParameters : RequestParameters
+public sealed class GetAsyncSearchRequestParameters : RequestParameters
{
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
@@ -46,8 +46,8 @@ public GetAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchGet;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
@@ -70,8 +70,8 @@ internal GetAsyncSearchRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchGet;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
public GetAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
public GetAsyncSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys);
public GetAsyncSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout);
@@ -98,8 +98,8 @@ internal GetAsyncSearchRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.AsyncSearchGet;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
public GetAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
public GetAsyncSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys);
public GetAsyncSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout);
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 7cf03924af0..f8e47dc83b3 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
@@ -24,7 +24,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
-public sealed partial class GetAsyncSearchResponse : ElasticsearchResponseBase
+public sealed partial class GetAsyncSearchResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("expiration_time")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
index b11e87cd5e1..06dc4768a18 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class BulkRequestParameters : RequestParameters
+public sealed class BulkRequestParameters : RequestParameters
{
[JsonIgnore]
public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); }
@@ -68,8 +68,8 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
[JsonIgnore]
public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); }
@@ -106,8 +106,8 @@ public BulkRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source);
public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
@@ -136,8 +136,8 @@ public BulkRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source);
public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
index a17053f11e4..a822d8de955 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class BulkResponse : ElasticsearchResponseBase
+public sealed partial class BulkResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("errors")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
index 27b5f38e6f2..7ec01f513c2 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
@@ -27,15 +27,15 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class ClearScrollRequestParameters : RequestParameters
+public sealed class ClearScrollRequestParameters : RequestParameters
{
}
public sealed partial class ClearScrollRequest : PlainRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClearScroll;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => true;
[JsonInclude]
[JsonPropertyName("scroll_id")]
public Elastic.Clients.Elasticsearch.ScrollIds? ScrollId { get; set; }
@@ -49,8 +49,8 @@ public ClearScrollRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClearScroll;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => true;
private Elastic.Clients.Elasticsearch.ScrollIds? ScrollIdValue { get; set; }
public ClearScrollRequestDescriptor ScrollId(Elastic.Clients.Elasticsearch.ScrollIds? scrollId)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
index 4f510480353..ba9257721fc 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class ClearScrollResponse : ElasticsearchResponseBase
+public sealed partial class ClearScrollResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("num_freed")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
index c1acaf6fa3b..be8cdd99c92 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
@@ -27,15 +27,15 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class ClosePointInTimeRequestParameters : RequestParameters
+public sealed class ClosePointInTimeRequestParameters : RequestParameters
{
}
public sealed partial class ClosePointInTimeRequest : PlainRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClosePointInTime;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => true;
[JsonInclude]
[JsonPropertyName("id")]
public Elastic.Clients.Elasticsearch.Id Id { get; set; }
@@ -49,8 +49,8 @@ public ClosePointInTimeRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClosePointInTime;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => true;
private Elastic.Clients.Elasticsearch.Id IdValue { get; set; }
public ClosePointInTimeRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
index b3ed06c0524..b0ad17657bd 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class ClosePointInTimeResponse : ElasticsearchResponseBase
+public sealed partial class ClosePointInTimeResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("num_freed")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthRequest.g.cs
index 38d6dbfe342..1229606e8c0 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.Cluster;
-public sealed class ClusterHealthRequestParameters : RequestParameters
+public sealed class ClusterHealthRequestParameters : RequestParameters
{
[JsonIgnore]
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
@@ -74,8 +74,8 @@ public ClusterHealthRequest(Elastic.Clients.Elasticsearch.Indices? indices) : ba
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
[JsonIgnore]
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
@@ -118,8 +118,8 @@ public ClusterHealthRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
public ClusterHealthRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public ClusterHealthRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? level) => Qs("level", level);
public ClusterHealthRequestDescriptor Local(bool? local = true) => Qs("local", local);
@@ -150,8 +150,8 @@ public ClusterHealthRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth;
- protected override HttpMethod HttpMethod => HttpMethod.GET;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.GET;
+ internal override bool SupportsBody => false;
public ClusterHealthRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public ClusterHealthRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? level) => Qs("level", level);
public ClusterHealthRequestDescriptor Local(bool? local = true) => Qs("local", local);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs
index e5acabb98a9..fbe7323c229 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch.Cluster;
-public sealed partial class ClusterHealthResponse : ElasticsearchResponseBase
+public sealed partial class ClusterHealthResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("active_primary_shards")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
index ece0a9758c2..5d9130b7f28 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class CountRequestParameters : RequestParameters
+public sealed class CountRequestParameters : RequestParameters
{
[JsonIgnore]
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
@@ -83,8 +83,8 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
[JsonIgnore]
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
@@ -144,8 +144,8 @@ public CountRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opti
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
@@ -231,8 +231,8 @@ public CountRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
index adc2f8976b9..8e94b65bc3b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class CountResponse : ElasticsearchResponseBase
+public sealed partial class CountResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("count")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
index cf44993047c..572f52bce23 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class CreateRequestParameters : RequestParameters
+public sealed class CreateRequestParameters : RequestParameters
{
[JsonIgnore]
public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); }
@@ -58,8 +58,8 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCreate;
- protected override HttpMethod HttpMethod => HttpMethod.PUT;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.PUT;
+ internal override bool SupportsBody => true;
[JsonIgnore]
public TDocument Document { get; set; }
@@ -105,8 +105,8 @@ internal CreateRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCreate;
- protected override HttpMethod HttpMethod => HttpMethod.PUT;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.PUT;
+ internal override bool SupportsBody => true;
public CreateRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public CreateRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? refresh) => Qs("refresh", refresh);
public CreateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
index a659829837f..87ba370e633 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class CreateResponse : ElasticsearchResponseBase
+public sealed partial class CreateResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("forced_refresh")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
index b6ff1f63292..438147737f3 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class DeleteByQueryRequestParameters : RequestParameters
+public sealed class DeleteByQueryRequestParameters : RequestParameters
{
[JsonIgnore]
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
@@ -121,8 +121,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQuery;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
[JsonIgnore]
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
@@ -232,8 +232,8 @@ internal DeleteByQueryRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQuery;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
@@ -393,8 +393,8 @@ internal DeleteByQueryRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQuery;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => true;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => true;
public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
index ff66640b6d4..4e4764752bf 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class DeleteByQueryResponse : ElasticsearchResponseBase
+public sealed partial class DeleteByQueryResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("batches")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
index 9d2d1710f41..858089c512f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class DeleteByQueryRethrottleRequestParameters : RequestParameters
+public sealed class DeleteByQueryRethrottleRequestParameters : RequestParameters
{
[JsonIgnore]
public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); }
@@ -40,8 +40,8 @@ public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.TaskId task_
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQueryRethrottle;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => false;
[JsonIgnore]
public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); }
}
@@ -58,8 +58,8 @@ internal DeleteByQueryRethrottleRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQueryRethrottle;
- protected override HttpMethod HttpMethod => HttpMethod.POST;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.POST;
+ internal override bool SupportsBody => false;
public DeleteByQueryRethrottleRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond);
public DeleteByQueryRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.TaskId task_id)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
index ac35df6b38e..ffd75b667d8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchResponseBase
+public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("node_failures")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
index fc468871549..6a31e5132ad 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class DeleteRequestParameters : RequestParameters
+public sealed class DeleteRequestParameters : RequestParameters
{
[JsonIgnore]
public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); }
@@ -61,8 +61,8 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDelete;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => false;
[JsonIgnore]
public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); }
@@ -120,8 +120,8 @@ internal DeleteRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDelete;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => false;
public DeleteRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm);
public DeleteRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo);
public DeleteRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? refresh) => Qs("refresh", refresh);
@@ -159,8 +159,8 @@ internal DeleteRequestDescriptor()
}
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDelete;
- protected override HttpMethod HttpMethod => HttpMethod.DELETE;
- protected override bool SupportsBody => false;
+ internal override HttpMethod HttpMethod => HttpMethod.DELETE;
+ internal override bool SupportsBody => false;
public DeleteRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm);
public DeleteRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo);
public DeleteRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? refresh) => Qs("refresh", refresh);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
index 4513ce30cf6..13054ac3f12 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
@@ -23,7 +23,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed partial class DeleteResponse : ElasticsearchResponseBase
+public sealed partial class DeleteResponse : ElasticsearchResponse
{
[JsonInclude]
[JsonPropertyName("forced_refresh")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
index 882e82a8f19..10e05900ede 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
@@ -27,7 +27,7 @@
#nullable restore
namespace Elastic.Clients.Elasticsearch;
-public sealed class DeleteScriptRequestParameters : RequestParameters
+public sealed class DeleteScriptRequestParameters : RequestParameters
{
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q