diff --git a/benchmarks/Benchmarks/packages.lock.json b/benchmarks/Benchmarks/packages.lock.json index cbf0971da36..feb5384df27 100644 --- a/benchmarks/Benchmarks/packages.lock.json +++ b/benchmarks/Benchmarks/packages.lock.json @@ -67,8 +67,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "Elasticsearch.Net": { "type": "Transitive", @@ -1172,7 +1172,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } } diff --git a/benchmarks/Profiling/packages.lock.json b/benchmarks/Profiling/packages.lock.json index cd4a05629bb..47bfe236f8e 100644 --- a/benchmarks/Profiling/packages.lock.json +++ b/benchmarks/Profiling/packages.lock.json @@ -31,8 +31,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -88,7 +88,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } } diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json index d3dc1517ee6..88e8d31dcbf 100644 --- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json @@ -37,8 +37,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -152,7 +152,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } }, @@ -192,8 +192,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -341,7 +341,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } }, @@ -390,8 +390,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -538,7 +538,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } }, @@ -578,8 +578,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -718,7 +718,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } }, @@ -758,8 +758,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -867,7 +867,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } }, @@ -907,8 +907,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -964,7 +964,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } } } diff --git a/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs b/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs index cb756c5df90..344bae20ab8 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using Elastic.Clients.Elasticsearch.Requests; namespace Elastic.Clients.Elasticsearch; @@ -17,7 +18,7 @@ internal override void BeforeRequest() } } - protected override (string ResolvedUrl, string UrlTemplate) ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) + protected override (string ResolvedUrl, string UrlTemplate, Dictionary? resolvedRouteValues) ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) { if (Pit is not null && !string.IsNullOrEmpty(Pit.Id ?? string.Empty) && routeValues.ContainsKey("index")) { @@ -61,7 +62,7 @@ internal override void BeforeRequest() } } - protected override (string ResolvedUrl, string UrlTemplate) ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) + protected override (string ResolvedUrl, string UrlTemplate, Dictionary? resolvedRouteValues) ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) { if ((Self.PitValue is not null || Self.PitDescriptor is not null || Self.PitDescriptorAction is not null) && routeValues.ContainsKey("index")) { diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs index 77e2f37ebab..9d3a7855b3c 100644 --- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs +++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics; +using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text.Json; @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Elastic.Clients.Elasticsearch.Requests; using Elastic.Transport; +using Elastic.Transport.Diagnostics; using Elastic.Transport.Products.Elasticsearch; namespace Elastic.Clients.Elasticsearch; @@ -20,10 +21,11 @@ namespace Elastic.Clients.Elasticsearch; /// public partial class ElasticsearchClient { - private readonly HttpTransport _transport; - - private static readonly ActivitySource _activitySource = new("Elastic.Clients.Elasticsearch.ElasticsearchClient"); + private const string OpenTelemetrySpanAttributePrefix = "db.elasticsearch."; + // This should be updated if any of the code uses semantic conventions defined in newer schema versions. + private const string OpenTelemetrySchemaVersion = "https://opentelemetry.io/schemas/1.21.0"; + private readonly HttpTransport _transport; internal static ConditionalWeakTable SettingsTable { get; } = new(); /// @@ -102,93 +104,121 @@ internal TResponse DoRequest( Action? forceConfiguration) where TRequest : Request where TResponse : ElasticsearchResponse, new() + where TRequestParameters : RequestParameters, new() + => DoRequestCoreAsync(false, request, forceConfiguration).EnsureCompleted(); + + internal Task DoRequestAsync( + TRequest request, + CancellationToken cancellationToken = default) + where TRequest : Request + where TResponse : ElasticsearchResponse, new() + where TRequestParameters : RequestParameters, new() + => DoRequestAsync(request, null, cancellationToken); + + internal Task DoRequestAsync( + TRequest request, + Action? forceConfiguration, + CancellationToken cancellationToken = default) + where TRequest : Request + where TResponse : ElasticsearchResponse, new() + where TRequestParameters : RequestParameters, new() + => DoRequestCoreAsync(true, request, forceConfiguration, cancellationToken).AsTask(); + + private ValueTask DoRequestCoreAsync( + bool isAsync, + TRequest request, + Action? forceConfiguration, + CancellationToken cancellationToken = default) + where TRequest : Request + where TResponse : ElasticsearchResponse, new() where TRequestParameters : RequestParameters, new() { if (_productCheckStatus == ProductCheckStatus.Failed) throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError); - var requestModified = false; - var hadRequestConfig = false; - HeadersList? originalHeaders = null; + var (requestModified, hadRequestConfig, originalHeaders) = AttachProductCheckHeaderIfRequired(request); + var (resolvedUrl, urlTemplate, resolvedRouteValues, postData) = PrepareRequest(request, forceConfiguration); + var openTelemetryData = PrepareOpenTelemetryData(request, resolvedRouteValues); - // If we have not yet checked the product name, add the product header to the list of headers to parse. - if (_productCheckStatus == ProductCheckStatus.NotChecked) + if (_productCheckStatus == ProductCheckStatus.Succeeded && !requestModified) { - requestModified = true; - if (request.RequestParameters.RequestConfiguration is null) - { - request.RequestParameters.RequestConfiguration = new RequestConfiguration(); - } - else - { - originalHeaders = request.RequestParameters.RequestConfiguration.ResponseHeadersToParse; - hadRequestConfig = true; - } - - if (request.RequestParameters.RequestConfiguration.ResponseHeadersToParse.Count == 0) - { - request.RequestParameters.RequestConfiguration.ResponseHeadersToParse = new HeadersList("x-elastic-product"); - } + if (isAsync) + return new ValueTask(_transport.RequestAsync(request.HttpMethod, resolvedUrl, postData, request.RequestParameters, in openTelemetryData, cancellationToken)); else - { - request.RequestParameters.RequestConfiguration.ResponseHeadersToParse = new HeadersList(request.RequestParameters.RequestConfiguration.ResponseHeadersToParse, "x-elastic-product"); - } + return new ValueTask(_transport.Request(request.HttpMethod, resolvedUrl, postData, request.RequestParameters, in openTelemetryData)); } - var (resolvedUrl, urlTemplate, postData) = PrepareRequest(request, forceConfiguration); - - TResponse response; + return SendRequest(isAsync); - using (var activity = _activitySource.StartActivity($"Elasticsearch: {request.HttpMethod} /{urlTemplate}", ActivityKind.Client)) + async ValueTask SendRequest(bool isAsync) { - activity?.SetTag("db.system", "elasticsearch"); - activity?.SetCustomProperty("elastic.transport.client", true); - - response = _transport.Request(request.HttpMethod, resolvedUrl, postData, request.RequestParameters); + TResponse response; - if (response.ApiCallDetails.RequestBodyInBytes is not null) - activity?.SetTag("db.statement", System.Text.Encoding.UTF8.GetString(response.ApiCallDetails.RequestBodyInBytes)); - } + if (isAsync) + response = await _transport.RequestAsync(request.HttpMethod, resolvedUrl, postData, request.RequestParameters, in openTelemetryData, cancellationToken).ConfigureAwait(false); + else + response = _transport.Request(request.HttpMethod, resolvedUrl, postData, request.RequestParameters, in openTelemetryData); - PostRequestProductCheck(request, response); + PostRequestProductCheck(request, response); - if (_productCheckStatus == ProductCheckStatus.Failed) - throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError); + if (_productCheckStatus == ProductCheckStatus.Failed) + throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError); - if (requestModified) - { - if (!hadRequestConfig) - { - request.RequestParameters.RequestConfiguration = null; - } - else if (originalHeaders.HasValue && originalHeaders.Value.Count > 0) + if (request.RequestParameters.RequestConfiguration is not null) { - request.RequestParameters.RequestConfiguration.ResponseHeadersToParse = originalHeaders.Value; + if (!hadRequestConfig) + { + request.RequestParameters.RequestConfiguration = null; + } + else if (originalHeaders.HasValue && originalHeaders.Value.Count > 0) + { + request.RequestParameters.RequestConfiguration.ResponseHeadersToParse = originalHeaders.Value; + } } - } - return response; + return response; + } } - internal Task DoRequestAsync( - TRequest request, - CancellationToken cancellationToken = default) + private static OpenTelemetryData PrepareOpenTelemetryData(TRequest request, Dictionary resolvedRouteValues) where TRequest : Request - where TResponse : ElasticsearchResponse, new() where TRequestParameters : RequestParameters, new() - => DoRequestAsync(request, null, cancellationToken); + { + // If there are no subscribed listeners, we avoid some work and allocations + if (!Elastic.Transport.Diagnostics.OpenTelemetry.ElasticTransportActivitySourceHasListeners) + return default; + + // We fall back to a general operation name in cases where the derived request fails to override the property + var operationName = !string.IsNullOrEmpty(request.OperationName) ? request.OperationName : request.HttpMethod.GetStringValue(); + + // TODO: Optimisation: We should consider caching these, either for cases where resolvedRouteValues is null, or + // caching per combination of route values. + // We should benchmark this first to assess the impact for common workloads. + // The former is likely going to save some short-lived allocations, but only for requests to endpoints without required path parts. + // The latter may bloat the cache as some combinations of path parts may rarely re-occur. + var attributes = new Dictionary + { + [OpenTelemetry.SemanticConventions.DbOperation] = !string.IsNullOrEmpty(request.OperationName) ? request.OperationName : "unknown", + [$"{OpenTelemetrySpanAttributePrefix}schema_url"] = OpenTelemetrySchemaVersion + }; - internal Task DoRequestAsync( - TRequest request, - Action? forceConfiguration, - CancellationToken cancellationToken = default) + if (resolvedRouteValues is not null) + { + foreach (var value in resolvedRouteValues) + { + if (!string.IsNullOrEmpty(value.Key) && !string.IsNullOrEmpty(value.Value)) + attributes.Add($"{OpenTelemetrySpanAttributePrefix}path_parts.{value.Key}", value.Value); + } + } + + var openTelemetryData = new OpenTelemetryData { SpanName = operationName, SpanAttributes = attributes }; + return openTelemetryData; + } + + private (bool requestModified, bool hadRequestConfig, HeadersList? originalHeaders) AttachProductCheckHeaderIfRequired(TRequest request) where TRequest : Request - where TResponse : ElasticsearchResponse, new() where TRequestParameters : RequestParameters, new() { - if (_productCheckStatus == ProductCheckStatus.Failed) - throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError); - var requestModified = false; var hadRequestConfig = false; HeadersList? originalHeaders = null; @@ -218,49 +248,10 @@ internal Task DoRequestAsync } } - var (resolvedUrl, urlTemplate, postData) = PrepareRequest(request, forceConfiguration); - - return _productCheckStatus == ProductCheckStatus.Succeeded && !requestModified && !_activitySource.HasListeners() - ? _transport.RequestAsync(request.HttpMethod, resolvedUrl, postData, request.RequestParameters, cancellationToken) - : SendRequest(request, request.RequestParameters, resolvedUrl, postData, hadRequestConfig, originalHeaders); - - async Task SendRequest(TRequest request, RequestParameters? parameters, string url, PostData postData, bool hadRequestConfig, HeadersList? originalHeaders) - { - TResponse response; - - using (var activity = _activitySource.StartActivity($"Elasticsearch: {request.HttpMethod} /{urlTemplate}", ActivityKind.Client)) - { - activity?.AddTag("db.system", "elasticsearch"); - activity?.SetCustomProperty("elastic.transport.client", true); - - response = await _transport.RequestAsync(request.HttpMethod, url, postData, parameters, cancellationToken).ConfigureAwait(false); - - if (response.ApiCallDetails.RequestBodyInBytes is not null) - activity?.AddTag("db.statement", System.Text.Encoding.UTF8.GetString(response.ApiCallDetails.RequestBodyInBytes)); - } - - PostRequestProductCheck(request, response); - - if (_productCheckStatus == ProductCheckStatus.Failed) - throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError); - - if (request.RequestParameters.RequestConfiguration is not null) - { - if (!hadRequestConfig) - { - request.RequestParameters.RequestConfiguration = null; - } - else if (originalHeaders.HasValue && originalHeaders.Value.Count > 0) - { - request.RequestParameters.RequestConfiguration.ResponseHeadersToParse = originalHeaders.Value; - } - } - - return response; - } + return (requestModified, hadRequestConfig, originalHeaders); } - private (string resolvedUrl, string urlTemplate, PostData data) PrepareRequest(TRequest request, + private (string resolvedUrl, string urlTemplate, Dictionary? resolvedRouteValues, PostData data) PrepareRequest(TRequest request, Action? forceConfiguration) where TRequest : Request where TRequestParameters : RequestParameters, new() @@ -276,7 +267,7 @@ async Task SendRequest(TRequest request, RequestParameters? parameter if (request.Accept is not null) ForceAccept(request, request.Accept); - var (resolvedUrl, urlTemplate) = request.GetUrl(ElasticsearchClientSettings); + var (resolvedUrl, urlTemplate, routeValues) = request.GetUrl(ElasticsearchClientSettings); var postData = request.HttpMethod == HttpMethod.GET || @@ -284,10 +275,10 @@ async Task SendRequest(TRequest request, RequestParameters? parameter ? null : PostData.Serializable(request); - return (resolvedUrl, urlTemplate, postData); + return (resolvedUrl, urlTemplate, routeValues, postData); } - private void PostRequestProductCheck(TRequest request, TResponse response) + private void PostRequestProductCheck(TRequest request, TResponse response) where TRequest : Request where TResponse : ElasticsearchResponse, new() { diff --git a/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs index 2a0e63b9445..d54e7f0b50a 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Configuration/ElasticsearchClientSettings.cs @@ -50,15 +50,6 @@ public ElasticsearchClientSettings(string cloudId, AuthorizationHeader credentia { } - /// - /// Instantiate connection settings using a using the provided - /// that never uses any IO. - /// - public ElasticsearchClientSettings(InMemoryConnection connection) - : this(new SingleNodePool(new Uri("http://localhost:9200")), connection) - { - } - public ElasticsearchClientSettings(NodePool nodePool) : this(nodePool, null, null) { } public ElasticsearchClientSettings(NodePool nodePool, SourceSerializerFactory sourceSerializer) @@ -72,6 +63,15 @@ public ElasticsearchClientSettings(NodePool nodePool, TransportClient connection { } + /// + /// Instantiate connection settings using a using the provided + /// that never uses any IO. + /// + public ElasticsearchClientSettings(InMemoryTransportClient inMemoryTransportClient) + : this(new SingleNodePool(new Uri("http://localhost:9200")), inMemoryTransportClient) + { + } + public ElasticsearchClientSettings( NodePool nodePool, TransportClient connection, @@ -318,18 +318,13 @@ public class ConnectionConfiguration : ConnectionConfigurationBase public static readonly UserAgent DefaultUserAgent = - Elastic.Transport.UserAgent.Create("elasticsearch-net", typeof(ITransportConfiguration)); + Transport.UserAgent.Create("elasticsearch-net", typeof(ITransportConfiguration)); public ConnectionConfiguration(Uri uri = null) : this(new SingleNodePool(uri ?? new Uri("http://localhost:9200"))) { } - public ConnectionConfiguration(InMemoryConnection connection) - : this(new SingleNodePool(new Uri("http://localhost:9200")), connection) - { - } - /// /// Sets up the client to communicate to Elastic Cloud using , /// documentation for more information on how to obtain your Cloud Id diff --git a/src/Elastic.Clients.Elasticsearch/Core/Extensions/TaskExtensions.cs b/src/Elastic.Clients.Elasticsearch/Core/Extensions/TaskExtensions.cs new file mode 100644 index 00000000000..0b740fd82ab --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Core/Extensions/TaskExtensions.cs @@ -0,0 +1,41 @@ +// 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. + +// Adapted from https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/src/Shared/TaskExtensions.cs +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Diagnostics; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch; + +internal static class TaskExtensions +{ + [Conditional("DEBUG")] + private static void VerifyTaskCompleted(bool isCompleted) + { + if (!isCompleted) + { + if (Debugger.IsAttached) + { + Debugger.Break(); + } + // Throw an InvalidOperationException instead of using + // Debug.Assert because that brings down xUnit immediately + throw new InvalidOperationException("Task is not completed"); + } + } + + public static T EnsureCompleted(this ValueTask task) + { +#if DEBUG + VerifyTaskCompleted(task.IsCompleted); +#endif +#pragma warning disable VSTHRD002 // Avoid problematic synchronous waits + return task.GetAwaiter().GetResult(); +#pragma warning restore VSTHRD002 // Avoid problematic synchronous waits + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Core/OpenTelemetry/SemanticConventions.cs b/src/Elastic.Clients.Elasticsearch/Core/OpenTelemetry/SemanticConventions.cs new file mode 100644 index 00000000000..afc1d7437cb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Core/OpenTelemetry/SemanticConventions.cs @@ -0,0 +1,10 @@ +// 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. + +namespace Elastic.Clients.Elasticsearch.OpenTelemetry; + +internal static class SemanticConventions +{ + public const string DbOperation = "db.operation"; +} diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/ApiUrls.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/ApiUrls.cs index 05aeac1f51b..f2e3b8a8a3e 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Request/ApiUrls.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Request/ApiUrls.cs @@ -57,10 +57,10 @@ internal ApiUrls(string[] routes) /// public Dictionary> Routes { get; } - public (string ResolvedUrl, string UrlTemplate) Resolve(RouteValues routeValues, IElasticsearchClientSettings settings) + public (string ResolvedUrl, string UrlTemplate, Dictionary? resolvedRouteValues) Resolve(RouteValues routeValues, IElasticsearchClientSettings settings) { if (_fixedUrl != null) - return (_fixedUrl, _fixedUrl); + return (_fixedUrl, _fixedUrl, null); var resolved = routeValues.Resolve(settings); @@ -68,13 +68,13 @@ internal ApiUrls(string[] routes) throw new Exception($"No route taking {resolved.Count} parameters{_errorMessageSuffix}"); if (routes.Count == 1) - return (routes[0].ToUrl(resolved), routes[0].Route); + return (routes[0].ToUrl(resolved), routes[0].Route, resolved); //find the first url with N parts that has all provided named parts foreach (var u in routes) { if (u.Matches(resolved)) - return (u.ToUrl(resolved), u.Route); + return (u.ToUrl(resolved), u.Route, resolved); } throw new Exception($"No route taking {routeValues.Count} parameters{_errorMessageSuffix}"); diff --git a/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs b/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs index adc1d1a7358..928f3f26e34 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/Request/Request.cs @@ -3,8 +3,10 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.Text.Json.Serialization; using Elastic.Transport; +using Elastic.Transport.Diagnostics; namespace Elastic.Clients.Elasticsearch.Requests; @@ -48,12 +50,15 @@ internal Request() { } internal abstract ApiUrls ApiUrls { get; } - protected virtual (string ResolvedUrl, string UrlTemplate) ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) => + protected virtual (string ResolvedUrl, string UrlTemplate, Dictionary? resolvedRouteValues) ResolveUrl(RouteValues routeValues, IElasticsearchClientSettings settings) => ApiUrls.Resolve(routeValues, settings); internal virtual void BeforeRequest() { } - internal (string ResolvedUrl, string UrlTemplate) GetUrl(IElasticsearchClientSettings settings) => ResolveUrl(RouteValues, settings); + internal (string ResolvedUrl, string UrlTemplate, Dictionary? resolvedRouteValues) GetUrl(IElasticsearchClientSettings settings) => ResolveUrl(RouteValues, settings); + + [JsonIgnore] + internal virtual string? OperationName { get; } } public abstract class Request : Request diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index ea2bfd14f03..48c5c3ec152 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -18,7 +18,7 @@ annotations - + all runtime; build; native; contentfiles; analyzers 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 93a83779f99..323d6481115 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs @@ -47,6 +47,8 @@ public AsyncSearchStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => protected override HttpMethod StaticHttpMethod => HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "async_search.status"; } /// @@ -70,6 +72,8 @@ internal AsyncSearchStatusRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "async_search.status"; + public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); @@ -102,6 +106,8 @@ internal AsyncSearchStatusRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "async_search.status"; + public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); 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 66521de9069..dd9ecffb743 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs @@ -47,6 +47,8 @@ public DeleteAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; internal override bool SupportsBody => false; + + internal override string OperationName => "async_search.delete"; } /// @@ -70,6 +72,8 @@ internal DeleteAsyncSearchRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "async_search.delete"; + public DeleteAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); @@ -102,6 +106,8 @@ internal DeleteAsyncSearchRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "async_search.delete"; + public DeleteAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); 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 1d277f4df7d..52e0612ed47 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs @@ -62,6 +62,8 @@ public GetAsyncSearchRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r. internal override bool SupportsBody => false; + internal override string OperationName => "async_search.get"; + /// /// Specifies how long the async search should be available in the cluster.
When not specified, the `keep_alive` set with the corresponding submit async request will be used.
Otherwise, it is possible to override the value and extend the validity of the request.
When this period expires, the search, if still running, is cancelled.
If the search is completed, its saved results are deleted.
///
@@ -102,6 +104,8 @@ internal GetAsyncSearchRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "async_search.get"; + 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); @@ -138,6 +142,8 @@ internal GetAsyncSearchRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "async_search.get"; + 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/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs index bf80b95380f..66c67686fc9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -608,6 +608,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) internal override bool SupportsBody => true; + internal override string OperationName => "async_search.submit"; + /// /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
@@ -958,6 +960,8 @@ public SubmitAsyncSearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "async_search.submit"; + public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); @@ -2028,6 +2032,8 @@ public SubmitAsyncSearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "async_search.submit"; + public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs index 2e5d1812145..b139da2e320 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs @@ -96,6 +96,8 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r internal override bool SupportsBody => true; + internal override string OperationName => "bulk"; + /// /// The pipeline id to preprocess incoming documents with /// @@ -168,6 +170,8 @@ public BulkRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "bulk"; + 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); @@ -206,6 +210,8 @@ public BulkRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "bulk"; + 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/ClearScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs index 231db5e5861..a79849c8f98 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs @@ -44,6 +44,8 @@ public sealed partial class ClearScrollRequest : PlainRequest true; + internal override string OperationName => "clear_scroll"; + [JsonInclude, JsonPropertyName("scroll_id")] public Elastic.Clients.Elasticsearch.ScrollIds? ScrollId { get; set; } } @@ -65,6 +67,8 @@ public ClearScrollRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "clear_scroll"; + 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/ClosePointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs index f20262058bc..2f4780c3143 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs @@ -44,6 +44,8 @@ public sealed partial class ClosePointInTimeRequest : PlainRequest true; + internal override string OperationName => "close_point_in_time"; + [JsonInclude, JsonPropertyName("id")] public Elastic.Clients.Elasticsearch.Id Id { get; set; } } @@ -65,6 +67,8 @@ public ClosePointInTimeRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "close_point_in_time"; + 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/Cluster/AllocationExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs index a39376c01ea..98277431ff8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs @@ -53,6 +53,8 @@ public sealed partial class AllocationExplainRequest : PlainRequest true; + internal override string OperationName => "cluster.allocation_explain"; + /// /// If true, returns information about disk usage and shard sizes. /// @@ -107,6 +109,8 @@ public AllocationExplainRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "cluster.allocation_explain"; + public AllocationExplainRequestDescriptor IncludeDiskInfo(bool? includeDiskInfo = true) => Qs("include_disk_info", includeDiskInfo); public AllocationExplainRequestDescriptor IncludeYesDecisions(bool? includeYesDecisions = true) => Qs("include_yes_decisions", includeYesDecisions); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs index 0a15479182b..917896a8048 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStatsRequest.g.cs @@ -61,6 +61,8 @@ public ClusterStatsRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id) : bas internal override bool SupportsBody => false; + internal override string OperationName => "cluster.stats"; + /// /// If `true`, returns settings in flat format. /// @@ -91,6 +93,8 @@ public ClusterStatsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "cluster.stats"; + public ClusterStatsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public ClusterStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs index df6a9e56694..253c2472033 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs @@ -63,6 +63,8 @@ public sealed partial class GetClusterSettingsRequest : PlainRequest false; + internal override string OperationName => "cluster.get_settings"; + /// /// If `true`, returns settings in flat format. /// @@ -105,6 +107,8 @@ public GetClusterSettingsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "cluster.get_settings"; + public GetClusterSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public GetClusterSettingsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public GetClusterSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs index 0dfb669339d..de14efad4af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/HealthRequest.g.cs @@ -106,6 +106,8 @@ public HealthRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => internal override bool SupportsBody => false; + internal override string OperationName => "cluster.health"; + /// /// Whether to expand wildcard expression to concrete indices that are open, closed or both. /// @@ -190,6 +192,8 @@ public HealthRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "cluster.health"; + public HealthRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public HealthRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? level) => Qs("level", level); public HealthRequestDescriptor Local(bool? local = true) => Qs("local", local); @@ -230,6 +234,8 @@ public HealthRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "cluster.health"; + public HealthRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public HealthRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? level) => Qs("level", level); public HealthRequestDescriptor Local(bool? local = true) => Qs("local", local); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs index 66545b25b16..c35a18b39d1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PendingTasksRequest.g.cs @@ -53,6 +53,8 @@ public sealed partial class PendingTasksRequest : PlainRequest false; + internal override string OperationName => "cluster.pending_tasks"; + /// /// If `true`, the request retrieves information from the local node only.
If `false`, information is retrieved from the master node.
///
@@ -83,6 +85,8 @@ public PendingTasksRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "cluster.pending_tasks"; + public PendingTasksRequestDescriptor Local(bool? local = true) => Qs("local", local); public PendingTasksRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs index 5bed5e66fd9..96f54759085 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs @@ -121,6 +121,8 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => internal override bool SupportsBody => true; + internal override string OperationName => "count"; + /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -229,6 +231,8 @@ public CountRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opti internal override bool SupportsBody => true; + internal override string OperationName => "count"; + 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); @@ -322,6 +326,8 @@ public CountRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "count"; + 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/CreateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs index a0af66bb9f0..d5de217049f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs @@ -83,6 +83,8 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie internal override bool SupportsBody => true; + internal override string OperationName => "create"; + [JsonIgnore] public TDocument Document { get; set; } @@ -160,6 +162,8 @@ internal CreateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "create"; + 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/DanglingIndices/ListDanglingIndicesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesRequest.g.cs index c4f17496111..49d26858357 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/ListDanglingIndicesRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class ListDanglingIndicesRequest : PlainRequest HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "dangling_indices.list_dangling_indices"; } /// @@ -62,6 +64,8 @@ public ListDanglingIndicesRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "dangling_indices.list_dangling_indices"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs index c57697c2e79..29410972eb7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs @@ -187,6 +187,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas internal override bool SupportsBody => true; + internal override string OperationName => "delete_by_query"; + /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -383,6 +385,8 @@ internal DeleteByQueryRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "delete_by_query"; + 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); @@ -546,6 +550,8 @@ internal DeleteByQueryRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "delete_by_query"; + 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/DeleteByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs index 7a767ff177d..d4c5116c90f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs @@ -52,6 +52,8 @@ public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.TaskId task_ internal override bool SupportsBody => false; + internal override string OperationName => "delete_by_query_rethrottle"; + /// /// The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. /// @@ -80,6 +82,8 @@ internal DeleteByQueryRethrottleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "delete_by_query_rethrottle"; + 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/DeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs index 207f851e361..857322b414e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs @@ -87,6 +87,8 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie internal override bool SupportsBody => false; + internal override string OperationName => "delete"; + /// /// only perform the delete operation if the last operation that has changed the document has the specified primary term /// @@ -177,6 +179,8 @@ internal DeleteRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "delete"; + 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); @@ -224,6 +228,8 @@ internal DeleteRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "delete"; + 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/DeleteScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs index 60d8631c59b..e294395d16a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs @@ -57,6 +57,8 @@ public DeleteScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re internal override bool SupportsBody => false; + internal override string OperationName => "delete_script"; + /// /// Specify timeout for connection to master /// @@ -91,6 +93,8 @@ internal DeleteScriptRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "delete_script"; + public DeleteScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -126,6 +130,8 @@ internal DeleteScriptRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "delete_script"; + public DeleteScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs index 69924cb663a..3acf9d5a6af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/DeletePolicyRequest.g.cs @@ -47,6 +47,8 @@ public DeletePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; internal override bool SupportsBody => false; + + internal override string OperationName => "enrich.delete_policy"; } /// @@ -70,6 +72,8 @@ internal DeletePolicyRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "enrich.delete_policy"; + public DeletePolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { RouteValues.Required("name", name); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs index 96565a86893..f2f3b3d7e11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/EnrichStatsRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class EnrichStatsRequest : PlainRequest HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "enrich.stats"; } /// @@ -62,6 +64,8 @@ public EnrichStatsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "enrich.stats"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs index 2f4c97c7537..a6bc46912f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs @@ -52,6 +52,8 @@ public ExecutePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => internal override bool SupportsBody => false; + internal override string OperationName => "enrich.execute_policy"; + /// /// If `true`, the request blocks other enrich policy execution requests until complete. /// @@ -80,6 +82,8 @@ internal ExecutePolicyRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "enrich.execute_policy"; + public ExecutePolicyRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); public ExecutePolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs index 6c8c9588f8b..e8420825e97 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/GetPolicyRequest.g.cs @@ -51,6 +51,8 @@ public GetPolicyRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r => r protected override HttpMethod StaticHttpMethod => HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "enrich.get_policy"; } /// @@ -70,6 +72,8 @@ public GetPolicyRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "enrich.get_policy"; + public GetPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names? name) { RouteValues.Optional("name", name); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs index b4188aa0a34..238b808bbf1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Enrich/PutPolicyRequest.g.cs @@ -48,6 +48,8 @@ public PutPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.R internal override bool SupportsBody => true; + internal override string OperationName => "enrich.put_policy"; + /// /// Matches enrich data to incoming documents based on a `geo_shape` query. /// @@ -88,6 +90,8 @@ internal PutPolicyRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "enrich.put_policy"; + public PutPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { RouteValues.Required("name", name); @@ -261,6 +265,8 @@ internal PutPolicyRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "enrich.put_policy"; + public PutPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { RouteValues.Required("name", name); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs index de9398b42f1..4e080ccf54b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlDeleteRequest.g.cs @@ -47,6 +47,8 @@ public EqlDeleteRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requi protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; internal override bool SupportsBody => false; + + internal override string OperationName => "eql.delete"; } /// @@ -70,6 +72,8 @@ internal EqlDeleteRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "eql.delete"; + public EqlDeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); @@ -102,6 +106,8 @@ internal EqlDeleteRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "eql.delete"; + public EqlDeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs index a050cc13e10..cef83e22a03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetRequest.g.cs @@ -57,6 +57,8 @@ public EqlGetRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required internal override bool SupportsBody => false; + internal override string OperationName => "eql.get"; + /// /// Period for which the search and its results are stored on the cluster.
Defaults to the keep_alive value set by the search’s EQL search API request.
///
@@ -91,6 +93,8 @@ internal EqlGetRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "eql.get"; + public EqlGetRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive); public EqlGetRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); @@ -126,6 +130,8 @@ internal EqlGetRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "eql.get"; + public EqlGetRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive); public EqlGetRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs index e36776b0a53..bda9c833845 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -55,6 +55,8 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "eql.search"; + [JsonIgnore] public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } [JsonIgnore] @@ -148,6 +150,8 @@ internal EqlSearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "eql.search"; + public EqlSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public EqlSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public EqlSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -528,6 +532,8 @@ internal EqlSearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "eql.search"; + public EqlSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public EqlSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public EqlSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs index dc05f95827f..fa307baf8e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusRequest.g.cs @@ -47,6 +47,8 @@ public GetEqlStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re protected override HttpMethod StaticHttpMethod => HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "eql.get_status"; } /// @@ -70,6 +72,8 @@ internal GetEqlStatusRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "eql.get_status"; + public GetEqlStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); @@ -102,6 +106,8 @@ internal GetEqlStatusRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "eql.get_status"; + public GetEqlStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs index 3dba165a313..b2999304f8f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs @@ -97,6 +97,8 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie internal override bool SupportsBody => false; + internal override string OperationName => "exists"; + /// /// Specify the node or shard the operation should be performed on (default: random) /// @@ -199,6 +201,8 @@ internal ExistsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "exists"; + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); @@ -248,6 +252,8 @@ internal ExistsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "exists"; + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs index a25a9df84b9..191cdb5fa3a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs @@ -92,6 +92,8 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti internal override bool SupportsBody => false; + internal override string OperationName => "exists_source"; + /// /// Specify the node or shard the operation should be performed on (default: random) /// @@ -188,6 +190,8 @@ internal ExistsSourceRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "exists_source"; + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); @@ -236,6 +240,8 @@ internal ExistsSourceRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "exists_source"; + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs index 2d6f11e9735..65de5a4b491 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs @@ -107,6 +107,8 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli internal override bool SupportsBody => true; + internal override string OperationName => "explain"; + /// /// The analyzer for the query string query /// @@ -223,6 +225,8 @@ internal ExplainRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "explain"; + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); @@ -320,6 +324,8 @@ internal ExplainRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "explain"; + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs index 2b4d4589a32..6f51d9a1344 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs @@ -81,6 +81,8 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "field_caps"; + /// /// If false, the request returns an error if any wildcard expression, index alias,
or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request
targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.
///
@@ -153,6 +155,8 @@ public FieldCapsRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "field_caps"; + public FieldCapsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public FieldCapsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public FieldCapsRequestDescriptor Filters(string? filters) => Qs("filters", filters); @@ -269,6 +273,8 @@ public FieldCapsRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "field_caps"; + public FieldCapsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public FieldCapsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public FieldCapsRequestDescriptor Filters(string? filters) => Qs("filters", filters); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs index f7a02512086..4dbc5417363 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs @@ -97,6 +97,8 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients internal override bool SupportsBody => false; + internal override string OperationName => "get"; + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -199,6 +201,8 @@ internal GetRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get"; + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); @@ -248,6 +252,8 @@ internal GetRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get"; + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptContextRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptContextRequest.g.cs index e21568eb1d1..10868b939e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptContextRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptContextRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class GetScriptContextRequest : PlainRequest HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "get_script_context"; } /// @@ -62,6 +64,8 @@ public GetScriptContextRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get_script_context"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptLanguagesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptLanguagesRequest.g.cs index 20fe73b2c2e..0af3e1a5d0c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptLanguagesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptLanguagesRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class GetScriptLanguagesRequest : PlainRequest HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "get_script_languages"; } /// @@ -62,6 +64,8 @@ public GetScriptLanguagesRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get_script_languages"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs index 4ccd78a9ee7..f21631b3066 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs @@ -52,6 +52,8 @@ public GetScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requi internal override bool SupportsBody => false; + internal override string OperationName => "get_script"; + /// /// Specify timeout for connection to master /// @@ -80,6 +82,8 @@ internal GetScriptRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get_script"; + public GetScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public GetScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) @@ -114,6 +118,8 @@ internal GetScriptRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get_script"; + public GetScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public GetScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs index 445f11df350..465a4bed328 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs @@ -93,6 +93,8 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C internal override bool SupportsBody => false; + internal override string OperationName => "get_source"; + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -191,6 +193,8 @@ internal GetSourceRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get_source"; + public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); @@ -240,6 +244,8 @@ internal GetSourceRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "get_source"; + public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Graph/ExploreRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Graph/ExploreRequest.g.cs index 56064ecbb9c..a65bf803d03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Graph/ExploreRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Graph/ExploreRequest.g.cs @@ -57,6 +57,8 @@ public ExploreRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => internal override bool SupportsBody => true; + internal override string OperationName => "graph.explore"; + /// /// Custom value used to route operations to a specific shard. /// @@ -115,6 +117,8 @@ internal ExploreRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "graph.explore"; + public ExploreRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public ExploreRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -365,6 +369,8 @@ internal ExploreRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "graph.explore"; + public ExploreRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing); public ExploreRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs index 01bcaec3387..1472963dd8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs @@ -62,6 +62,8 @@ public CloneIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic. internal override bool SupportsBody => true; + internal override string OperationName => "indices.clone"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -114,6 +116,8 @@ internal CloneIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.clone"; + public CloneIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public CloneIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public CloneIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -191,6 +195,8 @@ internal CloneIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.clone"; + public CloneIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public CloneIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public CloneIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs index 46f43861244..53f633e5034 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs @@ -77,6 +77,8 @@ public CloseIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r internal override bool SupportsBody => false; + internal override string OperationName => "indices.close"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -135,6 +137,8 @@ internal CloseIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.close"; + public CloseIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public CloseIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public CloseIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -174,6 +178,8 @@ internal CloseIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.close"; + public CloseIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public CloseIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public CloseIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs index 63571d47686..69a9c9cc376 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs @@ -47,6 +47,8 @@ public CreateDataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamName name protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; internal override bool SupportsBody => false; + + internal override string OperationName => "indices.create_data_stream"; } /// @@ -70,6 +72,8 @@ internal CreateDataStreamRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.create_data_stream"; + public CreateDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.DataStreamName name) { RouteValues.Required("name", name); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs index 38ea70951eb..35cfd3ad1b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs @@ -62,6 +62,8 @@ public CreateIndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( internal override bool SupportsBody => true; + internal override string OperationName => "indices.create"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -124,6 +126,8 @@ internal CreateIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.create"; + public CreateIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public CreateIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public CreateIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -271,6 +275,8 @@ internal CreateIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.create"; + public CreateIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public CreateIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public CreateIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs index cb523e46285..0b9b7b9b09e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs @@ -57,6 +57,8 @@ public DeleteAliasRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_alias"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -91,6 +93,8 @@ internal DeleteAliasRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_alias"; + public DeleteAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -132,6 +136,8 @@ internal DeleteAliasRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_alias"; + public DeleteAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs index 1c4c90a2b4c..17bbace549e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs @@ -63,6 +63,8 @@ public DeleteDataLifecycleRequest(Elastic.Clients.Elasticsearch.DataStreamNames internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_data_lifecycle"; + /// /// Whether wildcard expressions should get expanded to open or closed indices (default: open) /// @@ -104,6 +106,8 @@ internal DeleteDataLifecycleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_data_lifecycle"; + public DeleteDataLifecycleRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public DeleteDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteDataLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs index 4b4a787c7cb..4cba84fa754 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs @@ -52,6 +52,8 @@ public DeleteDataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamNames nam internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_data_stream"; + /// /// Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`. /// @@ -80,6 +82,8 @@ internal DeleteDataStreamRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_data_stream"; + public DeleteDataStreamRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public DeleteDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.DataStreamNames name) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs index c86249cf2f5..2f88ce7d5d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs @@ -72,6 +72,8 @@ public DeleteIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base( internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -124,6 +126,8 @@ internal DeleteIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete"; + public DeleteIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public DeleteIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public DeleteIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -162,6 +166,8 @@ internal DeleteIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete"; + public DeleteIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public DeleteIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public DeleteIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs index 91c6f79e814..d9df5e0e50a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs @@ -57,6 +57,8 @@ public DeleteIndexTemplateRequest(Elastic.Clients.Elasticsearch.Names name) : ba internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_index_template"; + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -91,6 +93,8 @@ internal DeleteIndexTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_index_template"; + public DeleteIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteIndexTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs index 832b803f50d..b488173558f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs @@ -57,6 +57,8 @@ public DeleteTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r = internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_template"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -91,6 +93,8 @@ internal DeleteTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.delete_template"; + public DeleteTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeleteTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs index 957d571a869..c0e956812a6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs @@ -71,6 +71,8 @@ public ExistsAliasRequest(Elastic.Clients.Elasticsearch.Indices? indices, Elasti internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_alias"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -121,6 +123,8 @@ internal ExistsAliasRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_alias"; + public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ExistsAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -168,6 +172,8 @@ internal ExistsAliasRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_alias"; + public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ExistsAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs index d05b58ddeda..75104dd82bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs @@ -52,6 +52,8 @@ public ExistsIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : bas internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_index_template"; + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -80,6 +82,8 @@ internal ExistsIndexTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_index_template"; + public ExistsIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public ExistsIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs index ef23386747e..9c0b5b58495 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs @@ -77,6 +77,8 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -135,6 +137,8 @@ internal ExistsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists"; + public ExistsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ExistsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public ExistsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); @@ -174,6 +178,8 @@ internal ExistsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists"; + public ExistsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ExistsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public ExistsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs index 71f769be18b..da6dea5bef5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs @@ -62,6 +62,8 @@ public ExistsTemplateRequest(Elastic.Clients.Elasticsearch.Names name) : base(r internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_template"; + /// /// Return settings in flat format (default: false) /// @@ -102,6 +104,8 @@ internal ExistsTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.exists_template"; + public ExistsTemplateRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public ExistsTemplateRequestDescriptor Local(bool? local = true) => Qs("local", local); public ExistsTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs index ceb081c7df0..e06023a71dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs @@ -58,6 +58,8 @@ public ExplainDataLifecycleRequest(Elastic.Clients.Elasticsearch.Indices indices internal override bool SupportsBody => false; + internal override string OperationName => "indices.explain_data_lifecycle"; + /// /// indicates if the API should return the default values the system uses for the index's lifecycle /// @@ -93,6 +95,8 @@ internal ExplainDataLifecycleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.explain_data_lifecycle"; + public ExplainDataLifecycleRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public ExplainDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -129,6 +133,8 @@ internal ExplainDataLifecycleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.explain_data_lifecycle"; + public ExplainDataLifecycleRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public ExplainDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FlushRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FlushRequest.g.cs index d85e1199c85..c6f7218231f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FlushRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FlushRequest.g.cs @@ -76,6 +76,8 @@ public FlushRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => internal override bool SupportsBody => false; + internal override string OperationName => "indices.flush"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -124,6 +126,8 @@ public FlushRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.flush"; + public FlushRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public FlushRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public FlushRequestDescriptor Force(bool? force = true) => Qs("force", force); @@ -158,6 +162,8 @@ public FlushRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.flush"; + public FlushRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public FlushRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public FlushRequestDescriptor Force(bool? force = true) => Qs("force", force); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs index bfcc04937d9..ff4fb4c2d67 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs @@ -86,6 +86,8 @@ public ForcemergeRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base( internal override bool SupportsBody => false; + internal override string OperationName => "indices.forcemerge"; + /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -146,6 +148,8 @@ public ForcemergeRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.forcemerge"; + public ForcemergeRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ForcemergeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public ForcemergeRequestDescriptor Flush(bool? flush = true) => Qs("flush", flush); @@ -182,6 +186,8 @@ public ForcemergeRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.forcemerge"; + public ForcemergeRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public ForcemergeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public ForcemergeRequestDescriptor Flush(bool? flush = true) => Qs("flush", flush); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs index cf81bc2bb2d..d857e53a465 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs @@ -79,6 +79,8 @@ public GetAliasRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_alias"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -129,6 +131,8 @@ public GetAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices) internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_alias"; + public GetAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -176,6 +180,8 @@ public GetAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices) internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_alias"; + public GetAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs index 8f7f590ab7b..687c7ae43cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs @@ -58,6 +58,8 @@ public GetDataLifecycleRequest(Elastic.Clients.Elasticsearch.DataStreamNames nam internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_data_lifecycle"; + /// /// Type of data stream that wildcard patterns can match.
Supports comma-separated values, such as `open,hidden`.
Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
///
@@ -93,6 +95,8 @@ internal GetDataLifecycleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_data_lifecycle"; + public GetDataLifecycleRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetDataLifecycleRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs index f88cbb514c2..e52115c6004 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs @@ -61,6 +61,8 @@ public GetDataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamNames? name) internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_data_stream"; + /// /// Type of data stream that wildcard patterns can match.
Supports comma-separated values, such as `open,hidden`.
///
@@ -91,6 +93,8 @@ public GetDataStreamRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_data_stream"; + public GetDataStreamRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetDataStreamRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs index 5d7d4e7795d..bca246116e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs @@ -76,6 +76,8 @@ public GetFieldMappingRequest(Elastic.Clients.Elasticsearch.Indices? indices, El internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_field_mapping"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -132,6 +134,8 @@ internal GetFieldMappingRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_field_mapping"; + public GetFieldMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetFieldMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetFieldMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -180,6 +184,8 @@ internal GetFieldMappingRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_field_mapping"; + public GetFieldMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetFieldMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetFieldMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs index 3cd9c9a288f..011436d1ae7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs @@ -87,6 +87,8 @@ public GetIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r = internal override bool SupportsBody => false; + internal override string OperationName => "indices.get"; + /// /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only
missing or closed indices. This behavior applies even if the request targets other open indices. For example,
a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
///
@@ -157,6 +159,8 @@ internal GetIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get"; + public GetIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetIndexRequestDescriptor Features(ICollection? features) => Qs("features", features); @@ -198,6 +202,8 @@ internal GetIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get"; + public GetIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetIndexRequestDescriptor Features(ICollection? features) => Qs("features", features); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs index f21836242c1..419897d24a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs @@ -71,6 +71,8 @@ public GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base( internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_index_template"; + /// /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// @@ -113,6 +115,8 @@ public GetIndexTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_index_template"; + public GetIndexTemplateRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public GetIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public GetIndexTemplateRequestDescriptor Local(bool? local = true) => Qs("local", local); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs index a11a873a926..02c0a7cdd81 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs @@ -76,6 +76,8 @@ public GetMappingRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base( internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_mapping"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -124,6 +126,8 @@ public GetMappingRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_mapping"; + public GetMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -158,6 +162,8 @@ public GetMappingRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_mapping"; + public GetMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public GetMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public GetMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs index 62dec15f8e4..beb2faf5637 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs @@ -66,6 +66,8 @@ public GetTemplateRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r => internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_template"; + /// /// If `true`, returns settings in flat format. /// @@ -102,6 +104,8 @@ public GetTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.get_template"; + public GetTemplateRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public GetTemplateRequestDescriptor Local(bool? local = true) => Qs("local", local); public GetTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs index b82262b2eba..00020ae1567 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs @@ -104,6 +104,8 @@ public IndicesStatsRequest(Elastic.Clients.Elasticsearch.Indices? indices, Elast internal override bool SupportsBody => false; + internal override string OperationName => "indices.stats"; + /// /// Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. /// @@ -184,6 +186,8 @@ public IndicesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indi internal override bool SupportsBody => false; + internal override string OperationName => "indices.stats"; + public IndicesStatsRequestDescriptor CompletionFields(Elastic.Clients.Elasticsearch.Fields? completionFields) => Qs("completion_fields", completionFields); public IndicesStatsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public IndicesStatsRequestDescriptor FielddataFields(Elastic.Clients.Elasticsearch.Fields? fielddataFields) => Qs("fielddata_fields", fielddataFields); @@ -236,6 +240,8 @@ public IndicesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indi internal override bool SupportsBody => false; + internal override string OperationName => "indices.stats"; + public IndicesStatsRequestDescriptor CompletionFields(Elastic.Clients.Elasticsearch.Fields? completionFields) => Qs("completion_fields", completionFields); public IndicesStatsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public IndicesStatsRequestDescriptor FielddataFields(Elastic.Clients.Elasticsearch.Fields? fielddataFields) => Qs("fielddata_fields", fielddataFields); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs index 34596fd279a..598eed91924 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs @@ -47,6 +47,8 @@ public MigrateToDataStreamRequest(Elastic.Clients.Elasticsearch.IndexName name) protected override HttpMethod StaticHttpMethod => HttpMethod.POST; internal override bool SupportsBody => false; + + internal override string OperationName => "indices.migrate_to_data_stream"; } /// @@ -70,6 +72,8 @@ internal MigrateToDataStreamRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.migrate_to_data_stream"; + public MigrateToDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.IndexName name) { RouteValues.Required("name", name); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs index 8ec9e8a8821..1933e267d1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs @@ -77,6 +77,8 @@ public OpenIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r internal override bool SupportsBody => false; + internal override string OperationName => "indices.open"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -135,6 +137,8 @@ internal OpenIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.open"; + public OpenIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public OpenIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public OpenIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -174,6 +178,8 @@ internal OpenIndexRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.open"; + public OpenIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public OpenIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public OpenIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs index e0f49c525e3..5dff4f0cc37 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs @@ -57,6 +57,8 @@ public PutAliasRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Cl internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_alias"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -121,6 +123,8 @@ internal PutAliasRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_alias"; + public PutAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -275,6 +279,8 @@ internal PutAliasRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_alias"; + public PutAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs index 04ad7010267..2f1cbe0e1cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs @@ -63,6 +63,8 @@ public PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.DataStreamNames nam internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_data_lifecycle"; + /// /// Type of data stream that wildcard patterns can match.
Supports comma-separated values, such as `open,hidden`.
Valid values are: `all`, `hidden`, `open`, `closed`, `none`.
///
@@ -110,6 +112,8 @@ internal PutDataLifecycleRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_data_lifecycle"; + public PutDataLifecycleRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public PutDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutDataLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 8e8f98fc074..88adb00c1ae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -52,6 +52,8 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_index_template"; + /// /// If `true`, this request cannot replace or update existing index templates. /// @@ -122,6 +124,8 @@ internal PutIndexTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_index_template"; + public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) @@ -331,6 +335,8 @@ internal PutIndexTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_index_template"; + public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs index 3258a1637c5..503300f5a1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -77,6 +77,8 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_mapping"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -202,6 +204,8 @@ internal PutMappingRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_mapping"; + public PutMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public PutMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public PutMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -533,6 +537,8 @@ internal PutMappingRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_mapping"; + public PutMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public PutMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public PutMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs index d0d1228d003..0271ca2ce99 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -67,6 +67,8 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_template"; + /// /// If true, this request cannot replace or update existing index templates. /// @@ -150,6 +152,8 @@ internal PutTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.put_template"; + public PutTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutTemplateRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs index 34c12c183ab..e605e2a12c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs @@ -66,6 +66,8 @@ public RefreshRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r = internal override bool SupportsBody => false; + internal override string OperationName => "indices.refresh"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
///
@@ -102,6 +104,8 @@ public RefreshRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.refresh"; + public RefreshRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public RefreshRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public RefreshRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -134,6 +138,8 @@ public RefreshRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.refresh"; + public RefreshRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public RefreshRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public RefreshRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs index 09217180380..11d81d0967c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs @@ -71,6 +71,8 @@ public RolloverRequest(Elastic.Clients.Elasticsearch.IndexAlias alias, Elastic.C internal override bool SupportsBody => true; + internal override string OperationName => "indices.rollover"; + /// /// If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover. /// @@ -145,6 +147,8 @@ internal RolloverRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.rollover"; + public RolloverRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); public RolloverRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public RolloverRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs index 05b6ab29b24..c6710c0ebc4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkIndexRequest.g.cs @@ -62,6 +62,8 @@ public ShrinkIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic internal override bool SupportsBody => true; + internal override string OperationName => "indices.shrink"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -114,6 +116,8 @@ internal ShrinkIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.shrink"; + public ShrinkIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public ShrinkIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public ShrinkIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -191,6 +195,8 @@ internal ShrinkIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.shrink"; + public ShrinkIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public ShrinkIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public ShrinkIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs index 6e09577e657..23b57af0dee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -59,6 +59,8 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b internal override bool SupportsBody => true; + internal override string OperationName => "indices.simulate_index_template"; + /// /// If `true`, the template passed in the body is only used if no existing
templates match the same index patterns. If `false`, the simulation uses
the template with the highest priority. Note that the template is not
permanently added or updated in either case; it is only used for the
simulation.
///
@@ -144,6 +146,8 @@ internal SimulateIndexTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.simulate_index_template"; + public SimulateIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -368,6 +372,8 @@ internal SimulateIndexTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.simulate_index_template"; + public SimulateIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index 900efbeffc9..22fb9a8ed60 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -66,6 +66,8 @@ public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base( internal override bool SupportsBody => false; + internal override string OperationName => "indices.simulate_template"; + /// /// If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. /// @@ -102,6 +104,8 @@ public SimulateTemplateRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "indices.simulate_template"; + public SimulateTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public SimulateTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public SimulateTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs index d7b95446aaf..ac971f19588 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs @@ -62,6 +62,8 @@ public SplitIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic. internal override bool SupportsBody => true; + internal override string OperationName => "indices.split"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -114,6 +116,8 @@ internal SplitIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.split"; + public SplitIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public SplitIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public SplitIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); @@ -191,6 +195,8 @@ internal SplitIndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.split"; + public SplitIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public SplitIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public SplitIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs index 4b5fb352a90..6dde9c07a54 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs @@ -53,6 +53,8 @@ public sealed partial class UpdateAliasesRequest : PlainRequest true; + internal override string OperationName => "indices.update_aliases"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -89,6 +91,8 @@ public UpdateAliasesRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.update_aliases"; + public UpdateAliasesRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -191,6 +195,8 @@ public UpdateAliasesRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "indices.update_aliases"; + public UpdateAliasesRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs index 075c3615260..a97d108e1d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs @@ -106,6 +106,8 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r internal override bool SupportsBody => true; + internal override string OperationName => "index"; + [JsonIgnore] public TDocument Document { get; set; } @@ -210,6 +212,8 @@ internal IndexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "index"; + public IndexRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); public IndexRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); public IndexRequestDescriptor OpType(Elastic.Clients.Elasticsearch.OpType? opType) => Qs("op_type", opType); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs index 2e382fd4d80..e8d702a45cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class InfoRequest : PlainRequest protected override HttpMethod StaticHttpMethod => HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "info"; } /// @@ -62,6 +64,8 @@ public InfoRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "info"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/DeletePipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/DeletePipelineRequest.g.cs index 49a5f57b3f3..5a4a385bcad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/DeletePipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/DeletePipelineRequest.g.cs @@ -57,6 +57,8 @@ public DeletePipelineRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r. internal override bool SupportsBody => false; + internal override string OperationName => "ingest.delete_pipeline"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -91,6 +93,8 @@ internal DeletePipelineRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ingest.delete_pipeline"; + public DeletePipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeletePipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -126,6 +130,8 @@ internal DeletePipelineRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ingest.delete_pipeline"; + public DeletePipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public DeletePipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs index 0872d69a36a..5deb001cfff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class GeoIpStatsRequest : PlainRequest HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "ingest.geo_ip_stats"; } /// @@ -62,6 +64,8 @@ public GeoIpStatsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ingest.geo_ip_stats"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineRequest.g.cs index ad14953bbbd..5cb0b6910b9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineRequest.g.cs @@ -61,6 +61,8 @@ public GetPipelineRequest(Elastic.Clients.Elasticsearch.Id? id) : base(r => r.Op internal override bool SupportsBody => false; + internal override string OperationName => "ingest.get_pipeline"; + /// /// Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
///
@@ -91,6 +93,8 @@ public GetPipelineRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ingest.get_pipeline"; + public GetPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public GetPipelineRequestDescriptor Summary(bool? summary = true) => Qs("summary", summary); @@ -122,6 +126,8 @@ public GetPipelineRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ingest.get_pipeline"; + public GetPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public GetPipelineRequestDescriptor Summary(bool? summary = true) => Qs("summary", summary); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs index ddd9e240b3f..00dfbf288a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class ProcessorGrokRequest : PlainRequest HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "ingest.processor_grok"; } /// @@ -62,6 +64,8 @@ public ProcessorGrokRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ingest.processor_grok"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs index dc472adf40e..ac7b21958e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -62,6 +62,8 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req internal override bool SupportsBody => true; + internal override string OperationName => "ingest.put_pipeline"; + /// /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. /// @@ -132,6 +134,8 @@ internal PutPipelineRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "ingest.put_pipeline"; + public PutPipelineRequestDescriptor IfVersion(long? ifVersion) => Qs("if_version", ifVersion); public PutPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutPipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -367,6 +371,8 @@ internal PutPipelineRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "ingest.put_pipeline"; + public PutPipelineRequestDescriptor IfVersion(long? ifVersion) => Qs("if_version", ifVersion); public PutPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutPipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs index b59696b8682..27c7e813723 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/SimulateRequest.g.cs @@ -56,6 +56,8 @@ public SimulateRequest(Elastic.Clients.Elasticsearch.Id? id) : base(r => r.Optio internal override bool SupportsBody => true; + internal override string OperationName => "ingest.simulate"; + /// /// If `true`, the response includes output data for each processor in the executed pipeline. /// @@ -92,6 +94,8 @@ public SimulateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "ingest.simulate"; + public SimulateRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) @@ -245,6 +249,8 @@ public SimulateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "ingest.simulate"; + public SimulateRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs index eea07076a6a..135632294b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs @@ -91,6 +91,8 @@ public MultiGetRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "mget"; + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -169,6 +171,8 @@ public MultiGetRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "mget"; + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); @@ -299,6 +303,8 @@ public MultiGetRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "mget"; + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs index 572ec219fb7..834d9dd7353 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs @@ -113,6 +113,8 @@ public MultiSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base internal override bool SupportsBody => true; + internal override string OperationName => "msearch"; + /// /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. /// @@ -226,6 +228,8 @@ public MultiSearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "msearch"; + public MultiSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public MultiSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public MultiSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -297,6 +301,8 @@ public MultiSearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "msearch"; + public MultiSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public MultiSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public MultiSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs index fb234fb02e1..b78a73464fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs @@ -78,6 +78,8 @@ public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices internal override bool SupportsBody => true; + internal override string OperationName => "msearch_template"; + /// /// Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution /// @@ -149,6 +151,8 @@ public MultiSearchTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "msearch_template"; + public MultiSearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public MultiSearchTemplateRequestDescriptor MaxConcurrentSearches(long? maxConcurrentSearches) => Qs("max_concurrent_searches", maxConcurrentSearches); public MultiSearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); @@ -213,6 +217,8 @@ public MultiSearchTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "msearch_template"; + public MultiSearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public MultiSearchTemplateRequestDescriptor MaxConcurrentSearches(long? maxConcurrentSearches) => Qs("max_concurrent_searches", maxConcurrentSearches); public MultiSearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs index 584c7b938b7..eef01058a9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs @@ -106,6 +106,8 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) : internal override bool SupportsBody => true; + internal override string OperationName => "mtermvectors"; + /// /// A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". /// @@ -194,6 +196,8 @@ public MultiTermVectorsRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "mtermvectors"; + public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) => Qs("fields", fields); public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); @@ -321,6 +325,8 @@ public MultiTermVectorsRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "mtermvectors"; + public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) => Qs("fields", fields); public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs index 67b13692697..505d545de31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs @@ -72,6 +72,8 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b internal override bool SupportsBody => false; + internal override string OperationName => "open_point_in_time"; + /// /// Specific the time to live for the point in time /// @@ -124,6 +126,8 @@ internal OpenPointInTimeRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "open_point_in_time"; + public OpenPointInTimeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public OpenPointInTimeRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public OpenPointInTimeRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration keepAlive) => Qs("keep_alive", keepAlive); @@ -162,6 +166,8 @@ internal OpenPointInTimeRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "open_point_in_time"; + public OpenPointInTimeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public OpenPointInTimeRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public OpenPointInTimeRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration keepAlive) => Qs("keep_alive", keepAlive); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingRequest.g.cs index a79e9fd7669..2a2a7420096 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingRequest.g.cs @@ -43,6 +43,8 @@ public sealed partial class PingRequest : PlainRequest protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; internal override bool SupportsBody => false; + + internal override string OperationName => "ping"; } /// @@ -62,6 +64,8 @@ public PingRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "ping"; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs index 91a0fc93971..a2e2fe125e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs @@ -61,6 +61,8 @@ public PutScriptRequest(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Ela internal override bool SupportsBody => true; + internal override string OperationName => "put_script"; + /// /// Specify timeout for connection to master /// @@ -101,6 +103,8 @@ internal PutScriptRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "put_script"; + public PutScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); @@ -192,6 +196,8 @@ internal PutScriptRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "put_script"; + public PutScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs index d21bec1eb94..b9d9c653ccc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs @@ -71,6 +71,8 @@ public RankEvalRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "rank_eval"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. /// @@ -125,6 +127,8 @@ public RankEvalRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "rank_eval"; + public RankEvalRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public RankEvalRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public RankEvalRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -281,6 +285,8 @@ public RankEvalRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "rank_eval"; + public RankEvalRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public RankEvalRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public RankEvalRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs index 9a56bde9f63..f513b1f7a5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs @@ -79,6 +79,8 @@ public sealed partial class ReindexRequest : PlainRequest true; + internal override string OperationName => "reindex"; + /// /// Should the affected indexes be refreshed? /// @@ -153,6 +155,8 @@ public ReindexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "reindex"; + public ReindexRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ReindexRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); public ReindexRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); @@ -325,6 +329,8 @@ public ReindexRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "reindex"; + public ReindexRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); public ReindexRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); public ReindexRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs index 9a4025a035d..3d5d77831ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs @@ -52,6 +52,8 @@ public ReindexRethrottleRequest(Elastic.Clients.Elasticsearch.Id task_id) : base internal override bool SupportsBody => false; + internal override string OperationName => "reindex_rethrottle"; + /// /// The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. /// @@ -80,6 +82,8 @@ internal ReindexRethrottleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "reindex_rethrottle"; + public ReindexRethrottleRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); public ReindexRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.Id task_id) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs index fa861faea3a..74fb139300e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs @@ -52,6 +52,8 @@ public RenderSearchTemplateRequest(Elastic.Clients.Elasticsearch.Id? id) : base( internal override bool SupportsBody => true; + internal override string OperationName => "render_search_template"; + [JsonInclude, JsonPropertyName("file")] public string? File { get; set; } [JsonInclude, JsonPropertyName("params")] @@ -77,6 +79,8 @@ public RenderSearchTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "render_search_template"; + public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) { RouteValues.Optional("id", id); @@ -147,6 +151,8 @@ public RenderSearchTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "render_search_template"; + public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) { RouteValues.Optional("id", id); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs index 103d6fe3f00..8c413844fe4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs @@ -48,6 +48,8 @@ public sealed partial class ScrollRequest : PlainRequest true; + internal override string OperationName => "scroll"; + /// /// If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. /// @@ -84,6 +86,8 @@ public ScrollRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "scroll"; + public ScrollRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); private Elastic.Clients.Elasticsearch.Duration? ScrollValue { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index fcfbd5dd268..616a72524d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -617,6 +617,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => internal override bool SupportsBody => true; + internal override string OperationName => "search"; + /// /// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
///
@@ -1021,6 +1023,8 @@ public SearchRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Opt internal override bool SupportsBody => true; + internal override string OperationName => "search"; + public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); @@ -2168,6 +2172,8 @@ public SearchRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "search"; + public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs index 1486094518c..f5afe7a62d1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs @@ -81,6 +81,8 @@ public SearchShardsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : bas internal override bool SupportsBody => false; + internal override string OperationName => "search_shards"; + /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -135,6 +137,8 @@ public SearchShardsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "search_shards"; + public SearchShardsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchShardsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public SearchShardsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); @@ -170,6 +174,8 @@ public SearchShardsRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "search_shards"; + public SearchShardsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchShardsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public SearchShardsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs index 756f063f8a7..51b32c90705 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs @@ -106,6 +106,8 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b internal override bool SupportsBody => true; + internal override string OperationName => "search_template"; + /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -208,6 +210,8 @@ public SearchTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "search_template"; + public SearchTemplateRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchTemplateRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); @@ -322,6 +326,8 @@ public SearchTemplateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "search_template"; + public SearchTemplateRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchTemplateRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/ClearCursorRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/ClearCursorRequest.g.cs index 25de0408e4f..05d5c4bfd47 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/ClearCursorRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/ClearCursorRequest.g.cs @@ -44,6 +44,8 @@ public sealed partial class ClearCursorRequest : PlainRequest true; + internal override string OperationName => "sql.clear_cursor"; + [JsonInclude, JsonPropertyName("cursor")] public string Cursor { get; set; } } @@ -65,6 +67,8 @@ public ClearCursorRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "sql.clear_cursor"; + private string CursorValue { get; set; } public ClearCursorRequestDescriptor Cursor(string cursor) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs index 9d2e94f4a82..770d312b80c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs @@ -47,6 +47,8 @@ public DeleteAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; internal override bool SupportsBody => false; + + internal override string OperationName => "sql.delete_async"; } /// @@ -70,6 +72,8 @@ internal DeleteAsyncRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "sql.delete_async"; + public DeleteAsyncRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); @@ -102,6 +106,8 @@ internal DeleteAsyncRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "sql.delete_async"; + public DeleteAsyncRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs index d9016504ab1..e8478b10a88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs @@ -67,6 +67,8 @@ public GetAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requir internal override bool SupportsBody => false; + internal override string OperationName => "sql.get_async"; + /// /// Separator for CSV results. The API only supports this parameter for CSV responses. /// @@ -113,6 +115,8 @@ internal GetAsyncRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "sql.get_async"; + public GetAsyncRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); public GetAsyncRequestDescriptor Format(string? format) => Qs("format", format); public GetAsyncRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive); @@ -150,6 +154,8 @@ internal GetAsyncRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "sql.get_async"; + public GetAsyncRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); public GetAsyncRequestDescriptor Format(string? format) => Qs("format", format); public GetAsyncRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs index 5e60666beb9..29cade986d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs @@ -47,6 +47,8 @@ public GetAsyncStatusRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r. protected override HttpMethod StaticHttpMethod => HttpMethod.GET; internal override bool SupportsBody => false; + + internal override string OperationName => "sql.get_async_status"; } /// @@ -70,6 +72,8 @@ internal GetAsyncStatusRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "sql.get_async_status"; + public GetAsyncStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); @@ -102,6 +106,8 @@ internal GetAsyncStatusRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "sql.get_async_status"; + public GetAsyncStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) { RouteValues.Required("id", id); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs index 0f093d0c634..f75432122c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -44,6 +44,8 @@ public sealed partial class QueryRequest : PlainRequest internal override bool SupportsBody => true; + internal override string OperationName => "sql.query"; + /// /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. /// @@ -154,6 +156,8 @@ public QueryRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "sql.query"; + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } @@ -462,6 +466,8 @@ public QueryRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "sql.query"; + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } private QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs index 132e77ece8e..6d3fc7edf86 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs @@ -72,6 +72,8 @@ public CancelRequest(Elastic.Clients.Elasticsearch.TaskId? task_id) : base(r => internal override bool SupportsBody => false; + internal override string OperationName => "tasks.cancel"; + /// /// A comma-separated list of actions that should be cancelled. Leave empty to cancel all. /// @@ -115,6 +117,8 @@ public CancelRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "tasks.cancel"; + public CancelRequestDescriptor Actions(ICollection? actions) => Qs("actions", actions); public CancelRequestDescriptor Nodes(ICollection? nodes) => Qs("nodes", nodes); public CancelRequestDescriptor ParentTaskId(string? parentTaskId) => Qs("parent_task_id", parentTaskId); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs index 40e84417fc9..f648359de30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs @@ -58,6 +58,8 @@ public GetTasksRequest(Elastic.Clients.Elasticsearch.Id task_id) : base(r => r.R internal override bool SupportsBody => false; + internal override string OperationName => "tasks.get"; + /// /// Explicit operation timeout /// @@ -93,6 +95,8 @@ internal GetTasksRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "tasks.get"; + public GetTasksRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public GetTasksRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs index 5b0fc15e173..5284538b54b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs @@ -84,6 +84,8 @@ public sealed partial class ListRequest : PlainRequest internal override bool SupportsBody => false; + internal override string OperationName => "tasks.list"; + /// /// Comma-separated list or wildcard expression of actions used to limit the request. /// @@ -151,6 +153,8 @@ public ListRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "tasks.list"; + public ListRequestDescriptor Actions(ICollection? actions) => Qs("actions", actions); public ListRequestDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); public ListRequestDescriptor GroupBy(Elastic.Clients.Elasticsearch.Tasks.GroupBy? groupBy) => Qs("group_by", groupBy); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs index 8b72157135e..1cf6331b2fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs @@ -106,6 +106,8 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( internal override bool SupportsBody => true; + internal override string OperationName => "termvectors"; + [JsonIgnore] public TDocument Document { get; set; } @@ -216,6 +218,8 @@ internal TermVectorsRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "termvectors"; + public TermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); public TermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields) => Qs("fields", fields); public TermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs index afcc4788c32..d80120727b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs @@ -48,6 +48,8 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r internal override bool SupportsBody => true; + internal override string OperationName => "terms_enum"; + /// /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. /// @@ -112,6 +114,8 @@ internal TermsEnumRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "terms_enum"; + public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) { RouteValues.Required("index", index); @@ -291,6 +295,8 @@ internal TermsEnumRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "terms_enum"; + public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) { RouteValues.Required("index", index); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs index 25aa059ea02..7fe18e8df3e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs @@ -187,6 +187,8 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas internal override bool SupportsBody => true; + internal override string OperationName => "update_by_query"; + /// /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) /// @@ -387,6 +389,8 @@ internal UpdateByQueryRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "update_by_query"; + public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); @@ -576,6 +580,8 @@ internal UpdateByQueryRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "update_by_query"; + public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs index cda3d2be049..de846f66f05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs @@ -52,6 +52,8 @@ public UpdateByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.Id task_id) internal override bool SupportsBody => false; + internal override string OperationName => "update_by_query_rethrottle"; + /// /// The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. /// @@ -80,6 +82,8 @@ internal UpdateByQueryRethrottleRequestDescriptor() internal override bool SupportsBody => false; + internal override string OperationName => "update_by_query_rethrottle"; + public UpdateByQueryRethrottleRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); public UpdateByQueryRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.Id task_id) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index 41691d5f6cd..7cecd2993ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -102,6 +102,8 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie internal override bool SupportsBody => true; + internal override string OperationName => "update"; + /// /// Only perform the operation if the document has this primary term. /// @@ -254,6 +256,8 @@ internal UpdateRequestDescriptor() internal override bool SupportsBody => true; + internal override string OperationName => "update"; + public UpdateRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public UpdateRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public UpdateRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); diff --git a/src/Elastic.Clients.Elasticsearch/packages.lock.json b/src/Elastic.Clients.Elasticsearch/packages.lock.json index c52016ca02a..667780aba72 100644 --- a/src/Elastic.Clients.Elasticsearch/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch/packages.lock.json @@ -22,9 +22,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.15, )", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "requested": "[0.4.16, )", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -172,9 +172,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.15, )", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "requested": "[0.4.16, )", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -356,9 +356,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.15, )", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "requested": "[0.4.16, )", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -548,9 +548,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.15, )", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "requested": "[0.4.16, )", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -723,9 +723,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.15, )", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "requested": "[0.4.16, )", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -867,9 +867,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.15, )", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "requested": "[0.4.16, )", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", diff --git a/src/Playground/Program.cs b/src/Playground/Program.cs index 32e08c97152..9131ef1bba7 100644 --- a/src/Playground/Program.cs +++ b/src/Playground/Program.cs @@ -34,7 +34,7 @@ #region Hidden Aggregation a = new TermsAggregation("test"); -var settings = new ElasticsearchClientSettings(new InMemoryConnection()) +var settings = new ElasticsearchClientSettings(new InMemoryTransportClient()) .DefaultIndex("default-index") .DefaultMappingFor(m => m .DisableIdInference() @@ -238,7 +238,7 @@ public StockData(string dataLine) -//var settings = new ElasticsearchClientSettings(new InMemoryConnection()) +//var settings = new ElasticsearchClientSettings(new InMemoryTransportClient()) // .EnableDebugMode() // .DefaultMappingFor(p => p // .PropertyName(pn => pn.Age, "custom-name") diff --git a/src/Playground/packages.lock.json b/src/Playground/packages.lock.json index 67b8101d499..e7b50fb9e24 100644 --- a/src/Playground/packages.lock.json +++ b/src/Playground/packages.lock.json @@ -48,8 +48,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -110,7 +110,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/src/PlaygroundV7x/Program.cs b/src/PlaygroundV7x/Program.cs index 2ea53097e7b..9121aef508d 100644 --- a/src/PlaygroundV7x/Program.cs +++ b/src/PlaygroundV7x/Program.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using Elasticsearch.Net; using Nest; @@ -92,7 +91,7 @@ static void HandleStatusCode(int? statusCode) // }) // }; -// var client = new ElasticClient(new ConnectionSettings(new InMemoryConnection()) +// var client = new ElasticClient(new ConnectionSettings(new InMemoryTransportClient()) // .DefaultIndex("default-index") // //.DefaultMappingFor(m => m // //.DisableIdInference() diff --git a/tests/Tests.ClusterLauncher/packages.lock.json b/tests/Tests.ClusterLauncher/packages.lock.json index 29b460c26ea..0af8fef2dad 100644 --- a/tests/Tests.ClusterLauncher/packages.lock.json +++ b/tests/Tests.ClusterLauncher/packages.lock.json @@ -75,8 +75,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1280,7 +1280,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -1397,8 +1397,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -2596,7 +2596,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -2713,8 +2713,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "FluentAssertions": { "type": "Transitive", @@ -3899,7 +3899,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.Core/Client/FixedResponseClient.cs b/tests/Tests.Core/Client/FixedResponseClient.cs index 592fb0970ab..466c0889e6b 100644 --- a/tests/Tests.Core/Client/FixedResponseClient.cs +++ b/tests/Tests.Core/Client/FixedResponseClient.cs @@ -56,7 +56,7 @@ public static ElasticsearchClientSettings CreateConnectionSettings( var headers = new Dictionary> { { "x-elastic-product", new[] { "Elasticsearch" } } }; - var connection = new InMemoryConnection(responseBytes, statusCode, exception, contentType, headers); + var connection = new InMemoryTransportClient(responseBytes, statusCode, exception, contentType, headers); var nodePool = new SingleNodePool(new Uri("http://localhost:9200")); var defaultSettings = new ElasticsearchClientSettings(nodePool, connection) .DefaultIndex("default-index"); diff --git a/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs b/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs index 113eb151e6b..ca1756d0f5f 100644 --- a/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs +++ b/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs @@ -15,10 +15,10 @@ public static TransportClient CreateConnection(this TestConfigurationBase config var headers = new Dictionary> { { "x-elastic-product", new[] { "Elasticsearch" } } }; return forceInMemory - ? new InMemoryConnection(response, headers: headers) + ? new InMemoryTransportClient(response, headers: headers) : configuration.RunIntegrationTests ? new HttpTransportClient() - : new InMemoryConnection(response, headers: headers); + : new InMemoryTransportClient(response, headers: headers); } public static bool InRange(this TestConfigurationBase configuration, string range) => diff --git a/tests/Tests.Core/ManagedElasticsearch/Clusters/OpenTelemtryCluster.cs b/tests/Tests.Core/ManagedElasticsearch/Clusters/OpenTelemetryCluster.cs similarity index 72% rename from tests/Tests.Core/ManagedElasticsearch/Clusters/OpenTelemtryCluster.cs rename to tests/Tests.Core/ManagedElasticsearch/Clusters/OpenTelemetryCluster.cs index 7067cd327df..c9b4a742d41 100644 --- a/tests/Tests.Core/ManagedElasticsearch/Clusters/OpenTelemtryCluster.cs +++ b/tests/Tests.Core/ManagedElasticsearch/Clusters/OpenTelemetryCluster.cs @@ -4,7 +4,7 @@ namespace Tests.Core.ManagedElasticsearch.Clusters; -public class OpenTelemtryCluster : ClientTestClusterBase +public class OpenTelemetryCluster : ClientTestClusterBase { - public OpenTelemtryCluster() : base() { } + public OpenTelemetryCluster() : base() { } } diff --git a/tests/Tests.Core/packages.lock.json b/tests/Tests.Core/packages.lock.json index 5c09afee0cd..6095588d79b 100644 --- a/tests/Tests.Core/packages.lock.json +++ b/tests/Tests.Core/packages.lock.json @@ -137,8 +137,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1589,7 +1589,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.Domain/Project.cs b/tests/Tests.Domain/Project.cs index d59d17c1511..3e3a52a9e56 100644 --- a/tests/Tests.Domain/Project.cs +++ b/tests/Tests.Domain/Project.cs @@ -171,7 +171,7 @@ public class Project public static class AnonymizerExtensions { - private static readonly Inferrer Infer = new(new ElasticsearchClientSettings(new InMemoryConnection()).ApplyDomainSettings()); + private static readonly Inferrer Infer = new(new ElasticsearchClientSettings(new InMemoryTransportClient()).ApplyDomainSettings()); public static object ToAnonymousObject(this JoinField field) => field.Match(p => Infer.RelationName(p.Name), c => new diff --git a/tests/Tests.Domain/packages.lock.json b/tests/Tests.Domain/packages.lock.json index e3e5305e6a5..435dac2d613 100644 --- a/tests/Tests.Domain/packages.lock.json +++ b/tests/Tests.Domain/packages.lock.json @@ -57,8 +57,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==", + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1142,7 +1142,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "tests.configuration": { diff --git a/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs index 0ec92ae2a52..d18b117ce76 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs @@ -17,8 +17,8 @@ namespace Tests.ClientConcepts.HighLevel.Indexing */ public class Indexing : DocumentationTestBase { - private readonly ElasticsearchClient _client = new ElasticsearchClient( - new ElasticsearchClientSettings(new SingleNodePool(new Uri("http://localhost:9200")), new InMemoryConnection())); + private readonly ElasticsearchClient _client = new(new ElasticsearchClientSettings( + new SingleNodePool(new Uri("http://localhost:9200")), new InMemoryTransportClient())); /// hide public class Person diff --git a/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs index 4e1cf04fe8f..c36beda0f5e 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs @@ -24,7 +24,7 @@ public class IndexNameInference : DocumentationTestBase //hide private class ConnectionSettings : ElasticsearchClientSettings { - public ConnectionSettings() : base(new InMemoryConnection()) + public ConnectionSettings() : base(new InMemoryTransportClient()) { } } diff --git a/tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs index 134ef308531..afa8bf34598 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs @@ -68,7 +68,7 @@ public class MyChild : MyDocument //public void SimpleParentChildMapping() //{ // var connectionPool = new SingleNodePool(new Uri("http://localhost:9200")); - // var connectionSettings = new ElasticsearchClientSettings(connectionPool, new InMemoryConnection()) // <1> for the purposes of this example, an in memory connection is used which doesn't actually send a request. In your application, you'd use the default connection or your own implementation that actually sends a request. + // var connectionSettings = new ElasticsearchClientSettings(connectionPool, new InMemoryTransportClient()) // <1> for the purposes of this example, an in memory connection is used which doesn't actually send a request. In your application, you'd use the default connection or your own implementation that actually sends a request. // .DefaultMappingFor(m => m.IndexName("index")) // .DefaultMappingFor(m => m.IndexName("index")) // .DefaultMappingFor(m => m.IndexName("index").RelationName("parent")); diff --git a/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs index bd0fe2d115a..3c53da440b9 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs @@ -218,7 +218,7 @@ [U] public void UsingJsonNetSerializer() var pool = new SingleNodePool(new Uri("http://localhost:9200")); var connectionSettings = new ElasticsearchClientSettings( pool, - connection: new InMemoryConnection(), // <1> an _in-memory_ connection is used here for example purposes. In your production application, you would use an `TransportClient` implementation that actually sends a request. + connection: new InMemoryTransportClient(), // <1> an _in-memory_ connection is used here for example purposes. In your production application, you would use an `TransportClient` implementation that actually sends a request. sourceSerializer: (builtin, settings) => new MyFirstCustomJsonNetSerializer(builtin, settings)) .DefaultIndex("my-index"); @@ -303,7 +303,7 @@ protected override JsonContract CreateContract(Type objectType) // var pool = new SingleNodePool(new Uri("http://localhost:9200")); // var connectionSettings = new ElasticsearchClientSettings( // pool, - // connection: new InMemoryConnection(), + // connection: new InMemoryTransportClient(), // sourceSerializer: (builtin, settings) => new MySecondCustomJsonNetSerializer(builtin, settings)) // .DefaultIndex("my-index"); diff --git a/tests/Tests/ClientConcepts/OpenTelemetry/ActivityTest.cs b/tests/Tests/ClientConcepts/OpenTelemetry/ActivityTest.cs deleted file mode 100644 index 865e9e02836..00000000000 --- a/tests/Tests/ClientConcepts/OpenTelemetry/ActivityTest.cs +++ /dev/null @@ -1,57 +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.Diagnostics; -using System.Threading.Tasks; -using Tests.Core.Client; -using Tests.Domain; - -namespace Tests.ClientConcepts.OpenTelemetry; - -public class ActivityTest -{ - [U] - public async Task BasicOpenTelemetryTest() - { - Activity oTelActivity = null; - var listener = new ActivityListener - { - ActivityStarted = _ => { }, - ActivityStopped = activity => oTelActivity = activity, - ShouldListenTo = activitySource => activitySource.Name == "Elastic.Clients.Elasticsearch.ElasticsearchClient", - Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.AllData - }; - ActivitySource.AddActivityListener(listener); - - var client = TestClient.DefaultInMemoryClient; - - client.Ping(); - - VerifyActivity(oTelActivity); - - await client.PingAsync(); - - VerifyActivity(oTelActivity); - - await client.SearchAsync(s => s.Index("test").Query(q => q.MatchAll())); - - VerifyActivity(oTelActivity, "Elasticsearch: POST /{index}/_search", "http://localhost:9200/test/_search?pretty=true&error_trace=true"); - - static void VerifyActivity(Activity oTelActivity, string name = null, string url = null) - { - oTelActivity.Should().NotBeNull(); - - oTelActivity.Kind.Should().Be(ActivityKind.Client); - - oTelActivity.DisplayName.Should().Be(name ?? "Elasticsearch: HEAD /"); - oTelActivity.OperationName.Should().Be(name ?? "Elasticsearch: HEAD /"); - - oTelActivity.Tags.Should().Contain(n => n.Key == "db.system" && n.Value == "elasticsearch"); - oTelActivity.Tags.Should().Contain(n => n.Key == "http.url" && n.Value == (url ?? "http://localhost:9200/?pretty=true&error_trace=true")); - oTelActivity.Tags.Should().Contain(n => n.Key == "net.peer.name" && n.Value == "localhost"); - - oTelActivity.Status.Should().Be(ActivityStatusCode.Ok); - } - } -} diff --git a/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryActivityTest.cs b/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryActivityTest.cs index 840f04883bc..9ca42cce7a0 100644 --- a/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryActivityTest.cs +++ b/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryActivityTest.cs @@ -13,12 +13,12 @@ namespace Tests.ClientConcepts.OpenTelemetry; /// /// Asserts that emits an OpenTelemetry compatible . /// -public class OpenTelemetryActivityTest : ApiIntegrationTestBase +public class OpenTelemetryActivityTest : ApiIntegrationTestBase { Activity _oTelActivity = null; ActivityListener _listener = null; - public OpenTelemetryActivityTest(OpenTelemtryCluster cluster, EndpointUsage usage) : base(cluster, usage) { } + public OpenTelemetryActivityTest(OpenTelemetryCluster cluster, EndpointUsage usage) : base(cluster, usage) { } protected override bool ExpectIsValid => true; protected override int ExpectStatusCode => 200; @@ -31,7 +31,7 @@ protected override void IntegrationSetup(ElasticsearchClient client, CallUniqueV { ActivityStarted = _ => { }, ActivityStopped = activity => _oTelActivity = activity, - ShouldListenTo = activitySource => activitySource.Name == "Elastic.Clients.Elasticsearch.ElasticsearchClient", + ShouldListenTo = activitySource => activitySource.Name == Elastic.Transport.Diagnostics.OpenTelemetry.ElasticTransportActivitySourceName, Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.AllData }; @@ -56,12 +56,16 @@ protected override void OnAfterCall(ElasticsearchClient client) _oTelActivity.Kind.Should().Be(ActivityKind.Client); - _oTelActivity.DisplayName.Should().Be("Elasticsearch: HEAD /"); - _oTelActivity.OperationName.Should().Be("Elasticsearch: HEAD /"); + _oTelActivity.DisplayName.Should().Be("ping"); + _oTelActivity.OperationName.Should().Be("ping"); + _oTelActivity.Tags.Should().Contain(n => n.Key == "elastic.transport.product.name" && n.Value == "elasticsearch-net"); _oTelActivity.Tags.Should().Contain(n => n.Key == "db.system" && n.Value == "elasticsearch"); - _oTelActivity.Tags.Should().Contain(n => n.Key == "http.url" && n.Value == $"http://{TestElasticsearchClientSettings.LocalOrProxyHost}:9200/?pretty=true&error_trace=true"); - _oTelActivity.Tags.Should().Contain(n => n.Key == "net.peer.name" && n.Value == TestElasticsearchClientSettings.LocalOrProxyHost); + _oTelActivity.Tags.Should().Contain(n => n.Key == "db.operation" && n.Value == "ping"); + _oTelActivity.Tags.Should().Contain(n => n.Key == "db.user" && n.Value == "elastic"); + _oTelActivity.Tags.Should().Contain(n => n.Key == "url.full" && n.Value == $"http://{TestElasticsearchClientSettings.LocalOrProxyHost}:9200/?pretty=true&error_trace=true"); + _oTelActivity.Tags.Should().Contain(n => n.Key == "server.address" && n.Value == TestElasticsearchClientSettings.LocalOrProxyHost); + _oTelActivity.Tags.Should().Contain(n => n.Key == "http.request.method" && n.Value == "HEAD"); _oTelActivity.Status.Should().Be(ActivityStatusCode.Ok); } diff --git a/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryTests.cs b/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryTests.cs new file mode 100644 index 00000000000..45455d43023 --- /dev/null +++ b/tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryTests.cs @@ -0,0 +1,71 @@ +// 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.Diagnostics; +using System.Threading.Tasks; +using Tests.Core.Client; +using Tests.Domain; + +namespace Tests.ClientConcepts.OpenTelemetry; + +public class ActivityTest +{ + [U] + public async Task BasicOpenTelemetryTest() + { + Activity oTelActivity = null; + var listener = new ActivityListener + { + ActivityStarted = _ => { }, + ActivityStopped = activity => oTelActivity = activity, + ShouldListenTo = activitySource => activitySource.Name == Elastic.Transport.Diagnostics.OpenTelemetry.ElasticTransportActivitySourceName, + Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.AllData + }; + ActivitySource.AddActivityListener(listener); + + var client = TestClient.DefaultInMemoryClient; + + client.Ping(); + + VerifyActivity(oTelActivity, "ping"); + + await client.PingAsync(); + + VerifyActivity(oTelActivity, "ping"); + + await client.SearchAsync(s => s.Index("test").Query(q => q.MatchAll())); + + VerifyActivity(oTelActivity, "search", "http://localhost:9200/test/_search?pretty=true&error_trace=true"); + + static void VerifyActivity(Activity oTelActivity, string operation, string url = null) + { + oTelActivity.Should().NotBeNull(); + + oTelActivity.Kind.Should().Be(ActivityKind.Client); + + oTelActivity.DisplayName.Should().Be(operation); + oTelActivity.OperationName.Should().Be(operation); + + oTelActivity.Tags.Should().Contain(n => n.Key == "elastic.transport.product.name" && n.Value == "elasticsearch-net"); + oTelActivity.Tags.Should().Contain(n => n.Key == "db.system" && n.Value == "elasticsearch"); + oTelActivity.Tags.Should().Contain(n => n.Key == "db.operation" && n.Value == operation); + oTelActivity.Tags.Should().Contain(n => n.Key == "db.user" && n.Value == "elastic"); + oTelActivity.Tags.Should().Contain(n => n.Key == "url.full" && n.Value == (url ?? "http://localhost:9200/?pretty=true&error_trace=true")); + oTelActivity.Tags.Should().Contain(n => n.Key == "server.address" && n.Value == "localhost"); + oTelActivity.Tags.Should().Contain(n => n.Key == "http.request.method" && n.Value == (operation == "ping" ? "HEAD" : "POST")); + + switch (operation) + { + case "search": + oTelActivity.Tags.Should().Contain(n => n.Key == "db.elasticsearch.path_parts.index" && n.Value == "test"); + break; + default: + oTelActivity.Tags.Should().NotContain(n => n.Key == "db.elasticsearch.path_parts.index"); + break; + } + + oTelActivity.Status.Should().Be(ActivityStatusCode.Ok); + } + } +} diff --git a/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs b/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs index cf2471657a1..5227f2ced40 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs @@ -46,7 +46,7 @@ public void CanDeserialize() var pool = new SingleNodePool(new Uri("http://localhost:9200")); - var connection = new InMemoryConnection(Encoding.UTF8.GetBytes(json)); + var connection = new InMemoryTransportClient(Encoding.UTF8.GetBytes(json)); var settings = new ElasticsearchClientSettings(pool, connection); var client = new ElasticsearchClient(settings); diff --git a/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs b/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs index 7c573950a1c..9fbacbaf9f7 100644 --- a/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs +++ b/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs @@ -16,7 +16,7 @@ public void RetriedButFailedDocuments_InvokeDroppedDocumentsCallback() var response = @"{""took"":30,""errors"":true,""items"":[{""index"":{""_index"":""thing"",""_id"":""1"",""status"":429}}]}"; var responseBytes = Encoding.UTF8.GetBytes(response); - var connection = new InMemoryConnection(responseBytes, 200); + var connection = new InMemoryTransportClient(responseBytes, 200); var connectionPool = new SingleNodePool(new Uri("http://localhost:9200")); var settings = new ElasticsearchClientSettings(connectionPool, connection).DefaultIndex("thing"); var client = new ElasticsearchClient(settings); diff --git a/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs b/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs index 025c4e980c2..e7f08f16161 100644 --- a/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs +++ b/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs @@ -77,7 +77,7 @@ static void ConfigureOptions(JsonSerializerOptions o) => // <1> // Any changes to the documentation code needs to be applied here also. settings = new ElasticsearchClientSettings( nodePool, - new InMemoryConnection(), + new InMemoryTransportClient(), sourceSerializer: (defaultSerializer, settings) => new DefaultSourceSerializer(settings, ConfigureOptions)) .DisableDirectStreaming(); @@ -311,7 +311,7 @@ public async Task DerivingFromSystemTextJsonSerializer_ToRegisterACustomEnumConv // Any changes to the documentation code needs to be applied here also. settings = new ElasticsearchClientSettings( nodePool, - new InMemoryConnection(), + new InMemoryTransportClient(), sourceSerializer: (defaultSerializer, settings) => new MyCustomSerializer(settings)) .DisableDirectStreaming(); diff --git a/tests/Tests/Documentation/DocumentationTestBase.cs b/tests/Tests/Documentation/DocumentationTestBase.cs index 16802d2d00d..99f4bc3570d 100644 --- a/tests/Tests/Documentation/DocumentationTestBase.cs +++ b/tests/Tests/Documentation/DocumentationTestBase.cs @@ -6,5 +6,5 @@ namespace Tests.Documentation; public abstract class DocumentationTestBase { - public static readonly ElasticsearchClient Client = new(new ElasticsearchClientSettings(new InMemoryConnection()).DisableDirectStreaming()); + public static readonly ElasticsearchClient Client = new(new ElasticsearchClientSettings(new InMemoryTransportClient()).DisableDirectStreaming()); } diff --git a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs index 5b6f5398d52..787435ec4d2 100644 --- a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs +++ b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs @@ -44,7 +44,7 @@ public async Task IndexingADocument() // Needed for the test assertion as we should use the in memory connection and disable direct streaming. // We don't want to include those in the docs as it may mislead or confuse developers. // Any changes to the documentation code needs to be applied here also. - client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 201))); + client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 201))); #pragma warning disable format //tag::create-tweet[] @@ -74,7 +74,7 @@ public async Task GettingADocument() var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":1,""_seq_no"":0,""_primary_term"":1,""found"":true,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); #pragma warning disable format //tag::get-tweet[] @@ -97,7 +97,7 @@ public async Task SearchingForDocumentsFluent() var jsonResponse = @"{""took"":9,""timed_out"":false,""_shards"":{""total"":1,""successful"":1,""skipped"":0,""failed"":0},""hits"":{""total"":{""value"":1,""relation"":""eq""},""max_score"":0.2876821,""hits"":[{""_index"":""my-tweet-index"",""_id"":""1"",""_score"":0.2876821,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}]}}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200)).EnableDebugMode()); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200)).EnableDebugMode()); #pragma warning disable format //tag::search-tweet-fluent[] @@ -126,7 +126,7 @@ public async Task SearchingForDocumentsObject() var jsonResponse = @"{""took"":9,""timed_out"":false,""_shards"":{""total"":1,""successful"":1,""skipped"":0,""failed"":0},""hits"":{""total"":{""value"":1,""relation"":""eq""},""max_score"":0.2876821,""hits"":[{""_index"":""my-tweet-index"",""_id"":""1"",""_score"":0.2876821,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}]}}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); #pragma warning disable format //tag::search-tweet-object-initializer[] @@ -155,7 +155,7 @@ public async Task UpdatingADocument() var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":2,""result"":""updated"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":1,""_primary_term"":1}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); var tweet = new Tweet { @@ -188,7 +188,7 @@ public async Task DeletingADocument() var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":3,""result"":""deleted"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":2,""_primary_term"":1}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); #pragma warning disable format //tag::delete-tweet[] diff --git a/tests/Tests/Serialization/DefaultSourceSerializerTests.cs b/tests/Tests/Serialization/DefaultSourceSerializerTests.cs index 9761d50adc3..d9ea73f26d2 100644 --- a/tests/Tests/Serialization/DefaultSourceSerializerTests.cs +++ b/tests/Tests/Serialization/DefaultSourceSerializerTests.cs @@ -17,7 +17,7 @@ namespace Tests.Serialization; public class DefaultSourceSerializerTests : SerializerTestBase { private readonly ElasticsearchClient _client = new( - new ElasticsearchClientSettings(new InMemoryConnection()) + new ElasticsearchClientSettings(new InMemoryTransportClient()) .DefaultMappingFor(m => m.IndexName("index")) .DefaultMappingFor(m => m.IndexName("index")) .DefaultMappingFor(m => m.IndexName("index").RelationName("my_parent")) @@ -78,7 +78,7 @@ public async Task SourceSerialization_WithCustomSerializer_CorrectlySerializes_T var settings = new ElasticsearchClientSettings( nodePool, - new InMemoryConnection(), + new InMemoryTransportClient(), sourceSerializer: (defaultSerializer, settings) => new MyCustomSerializer(settings)) .DisableDirectStreaming() diff --git a/tests/Tests/packages.lock.json b/tests/Tests/packages.lock.json index 93b90a3b9e2..4ed8283d5d4 100644 --- a/tests/Tests/packages.lock.json +++ b/tests/Tests/packages.lock.json @@ -195,8 +195,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.15", - "contentHash": "XSuqHDVZ5Qd2A4g7JUa2zpYJaJgT2/dQUe3UdgcMXZ1NSrVTFHTE9pkTbf60l38JAlW38Ecfzve4H/YY7KG/2A==" + "resolved": "0.4.16", + "contentHash": "O2LHqnQTWAF0+cic9zYkZJ8m95cG9AnkRbwkRZogroWXZHh8oY5ewVsQsF+wwNHs/YWnNIBTq/7yqaFklBB/Wg==" }, "EmptyFiles": { "type": "Transitive", @@ -1478,7 +1478,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.15, )" + "Elastic.Transport": "[0.4.16, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": {